Commit Graph
114022 Commits
Author SHA1 Message Date
Aaron Bohy baae272ffd [REF] web: tests: make load_views RPCs go through mockRPC
This allows to inspect those RPCs and the given arguments as well.
2017-11-23 11:00:53 +01:00
Aaron Bohy b4609e3c25 [REF] web: test_utils: handle logging in mockEnvironment
instead of createView. This allows to log info like RPCs or
uncaught Odoo events even if we are not in a view.

Also remove the logLevel param from MockServer as it wasn't really
used.
2017-11-23 11:00:21 +01:00
Aaron Bohy 0670a635ac [REF] base,web: use correct Widget in settings JS tests
... instead of hacking test_utils.
2017-11-23 11:00:21 +01:00
Alexandre Kühn c36209df65 [FIX] stock: typo stock_location_shop0 model (#21165)
Fixed a typo on commit https://github.com/odoo/odoo/commit/491faac5e9f47e4d0573a1eba9579aca44b16752,
in which stock_location_shop0 was wrongfully refered
to stock.picking.type, instead of stock.location.
2017-11-23 10:37:01 +01:00
Yannick Tivisse 3be5611206 [IMP] fleet: Move model,tags and service type data to demo 2017-11-22 13:28:05 +01:00
Yannick Tivisse 491faac5e9 [FIX] stock,mrp: Create ir.model.data with _update, not create
Purpose
=======

As the 'function' tag is re-evaluated on the module update (even when noupdate="1"), the ir.model.data will be created a second time with the function 'create'.

This leads to the record deletion after the update when calling '_process_end'.

Specification
=============

Use '_update' instead of 'create' and '_update_dummy'.

- _update won't create another ir.model.data if it already exists.
- _update already calls _update_dummy to avoid the record deletion.
2017-11-22 12:28:05 +01:00
Moises Lopez - https://www.vauxoo.com/ eb90eb42ce [IMP] translate: export empty translations for empty ones
Instead of use the original string by default.

Currently odoo export a PO translation file using the logic:
"If there is not a translation then use the source."

This generate a false 100% of file translated for tools based on PO
files.

This commit change this logic to:
"If there is not a translation then use empty string."

Odoo import a PO translation file supporting empty string because
if a item is empty string odoo use the original source.

Closes #17925
2017-11-21 17:56:28 +01:00
Thibault Delavallée 2c0ad82d5a [REF] sale: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 15:00:22 +01:00
Thibault Delavallée 1b2d58daec [REF] project: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 15:00:21 +01:00
Thibault Delavallée 5a2d789d1a [REF] crm: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 14:59:15 +01:00
Thibault Delavallée 55edc1c2f3 [REM] mass_mailing: remove void test file
It makes mass mailing tests independent from the mail module without
having to change anything. How lucky.
2017-11-21 14:58:48 +01:00
Adrian Torres 07510cdbf0 [FIX] base_module_uninstall: ondelete cascade
Before this commit, whenever an ir_module_module that had been
installed/uninstalled at least once would be unlinked, an Exception
would be raised since the field module_id references an ir_module_module
and it is a required field.

This commit fixes this by adding an ondelete='cascade' to the field.

Fixes #20720
2017-11-21 10:55:16 +01:00
Thibault Delavallée 52f899aae7 [FIX] odoo: tests: correctly call super
Otherwise inheritance is not always possible because child classes
inheriting from the base class are not called.
2017-11-20 11:08:28 +01:00
Alexandre Kühn 23e6dd36d7 [IMP] web: hide in kanban tag's color (#20815)
New feature:

   - New Transparent tag visual (grey border & text, white bg),
   - By default, newly created kanban tags are transparent,
   - Tag's colorpicker has now a 'Hide in Kanban' checkbox,
     to select the transparent color.

Toggling off 'Hide in Kanban' sets the color of the tag as follow:

   - Previous color, if 'Hide in Kanban' was toggled on on the
     same formview session.
   - Color 1 (dark orange), otherwise.
2017-11-20 10:47:43 +01:00
Richard Mathot 7d2666d020 [IMP] hr_timesheet: desactivate project tour when people install Timesheet app
This change comes from the timesheet onboarding
2017. Since this is done for onboarding, only the
admin is impacted by this change.
2017-11-20 09:28:20 +01:00
Fabien Pinckaers a8dd444bbb [IMP] hr_expense: cleaner/shorter field label 2017-11-18 22:54:38 +08:00
Kishan Gajjar 5b356a732b [IMP] website: add facebook page snippet 2017-11-17 17:59:21 +01:00
Alexandre Kühn 21c4480821 [REF] *: renaming AppSwitcher to HomeMenu
Summary:
   AppSwitcher      => HomeMenu
   AppSwitcherMenu  => HomeStudioMenu

Details:
   application_switcher => home_menu
   application-switcher => home-menu
   AppSwitcher          => HomeMenu
   appswitcher          => home_menu
   AppSwitcherMenu      => HomeStudioMenu
   appswitcher_menu     => home_studio_menu
   app_switcher         => home_menu
   app-switcher         => home-menu
   app_switcher_menu    => home_studio_menu
2017-11-17 16:37:26 +01:00
Martin Geubelle afc0df5b0c [REF] mail: create separate files for includes
The rev. odoo/odoo@ab900bb fixes an issue in mail which needed an include
on BasicModel and FormController. As this rev. has been done in a stable
branch, the includes have been done in an existing file.

This rev. correctly separates the includes in different files.
2017-11-17 16:26:45 +01:00
Christophe Monniez 0fdf291305 [REF] db: simplify list_dbs
When trying to list db's, the db_user is searched and verified before
searching for the databases.
As it's enclosed in a db.cursor context manager, we can assume that
there is a db user at this very moment.
This commit uses a single query to find databases that belongs to this
cursor user.

Also, this commit adds a message in the logs when an exception occurs
to facilitate debugging instead of silently returning an empty list.
2017-11-17 15:23:14 +01:00
Christophe Simonis 21dd24c071 [MERGE] forward port branch 11.0 up to ca3390fd05 2017-11-17 14:22:46 +01:00
Nicolas Lempereur ca3390fd05 [FIX] web_editor: forward-port typo on click
event variable has been renamed to ev in 11.0 and the code was
duplicated.
2017-11-17 14:13:58 +01:00
Christophe Simonis 179abc3c5e [MERGE] forward port branch saas-16 up to 11ff01af9b 2017-11-17 13:40:18 +01:00
Simon Lejeune 49c3f64369 [FIX] mrp: workorder: use the reserved move lines
Rev [1] was intended to be applied when changing the lot of the produced
product on the manufacturing order, somewhere along the line the code
was also called when setting the lot_id on the work order. When used in
this context, it broke the reconciliation between the reserved move
lines and the temporary move lines because a lot_produced_id was wrongly
set.

We fix the issue by only applying the code on prod move. This is done by
checking if the move is a production one through the stock move, because
there we are able to differenciate the raw material and production move,
not on the move line where production_id is always set.

[1] 471115b06a

Fixes #20964
2017-11-17 13:32:04 +01:00
Simon Lejeune 179071bb50 [FIX] stock_account: UOM handling
Error introduced by rev 48f4ce4afa
2017-11-17 13:32:04 +01:00
Alexandre Kühn 11ff01af9b [FIX] web: delete attribute on list view
Before this fix, when adding the attribute delete=0
on a listview, it was still possible to delete records
via the menu 'Delete' in the sidebar.

After this fix, this should not be possible to delete
records when delete=0.

The attribute delete was hard-coded to true, as there was
a traceback when it was set to false. It was simply due
to a misplaced closing brackets that was hiding an
assignment, which resulted to calling a method on undefined.
2017-11-17 12:34:25 +01:00
Alexandre Kühn 056fe805a1 [FIX] web: delete attribute on list view
Before this fix, when adding the attribute delete=0
on a listview, it was still possible to delete records
via the menu 'Delete' in the sidebar.

After this fix, this should not be possible to delete
records when delete=0.

The attribute delete was hard-coded to true, as there was
a traceback when it was set to false. It was simply due
to a misplaced closing brackets that was hiding an
assignment, which resulted to calling a method on undefined.
2017-11-17 12:16:59 +01:00
Jeremy Kersten a0a5443e8f [FIX] auth_signup: properly display the error message
Was "Internal Error 500"

Introduced at c3bf161

This closes #20941
2017-11-17 12:02:05 +01:00
Yannick Tivisse 76e75be02f [FIX] l10n_be_hr_payroll_fleet: Increase max unused car limit 2017-11-17 11:25:25 +01:00
Yannick Tivisse bf7ee31105 [FIX] l10n_be_hr_payroll: Remove ucm_insurance from employer cost
This shouldn't be taken into account when evaluating the employe cost.

Furthermore, this value is stupid and should be removed in master
2017-11-17 11:25:25 +01:00
Yannick Tivisse 8c03616fb8 [FIX] l10n_be_hr_payroll: Put the car ATN after the ONSS cotisation on payslip
Purpose
=======

The ATN for a company car is not subject to the ONSS cotisations.
2017-11-17 11:25:25 +01:00
Yannick Tivisse ed28cbd7ef [IMP] l10n_be_hr_payroll: Add a name on view element to allow xpath 2017-11-17 11:25:25 +01:00
Yannick Tivisse c2acd30413 [FIX] l10n_be_hr_payroll: Set the average working days to 231/year
Purpose
=======

That's the number of work days taken into account by the social secretariat
2017-11-17 11:25:25 +01:00
Yannick Tivisse ecedb77ede [FIX] l10n_be_hr_payroll: Compute the Gross Salary with the correct ATN amounts
Purpose
=======

The ATN values on a payslip are fixed with a forfeit. See: https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/avantages_toute_nature/autres_avantages

Specification
=============

Count the forfeit, not the amount paid by the company.
2017-11-17 11:25:25 +01:00
fwi-odoo 9cbf0c87e2 [FIX] web: allow to reexecute functions using _.throttle in the js tests
Before this commit, it was not possible to reexecute functions using the
_.throttle function in the same test (e.g. drag and drop two elements in the
studio tests).
2017-11-17 10:52:11 +01:00
Martin Geubelle ab900bb62a [FIX] mail: keep model informed of new messages
Do not forward-port this after 11.0

After sending a message, if one switched in edit mode in the form view, the
created message disappeared.

This is because the model is not aware of messages (they are created through
their own routes, message are not handled as other one2many fields with commands)
and the widget was reset with a new datapoint instance when switching in edit mode.

In this rev. we keep the model informed of the new messages by directly writing
the message ids in the datapoint.

Note that the includes on FormController and BasicModel are one in the
form_renderer.js file to fix this issue in existing database without adding
files. Another revision will be done in master to add the correct files.

opw-781353
2017-11-17 10:47:49 +01:00
Kinjal Mehta 6f3608e945 [IMP] purchase: Display PO lines from 'Purchase' button on product form
Purpose
=======

From product stat button (purchase) on click of purchase lines open Purchase line's form view, the view is not correct and it is not intended.

Specification
=============

Stat button of purchase orders in product form view, on click of line do not open form view of purchase order line only list view...not form view (restrict to open form view).
2017-11-17 10:11:18 +01:00
Nicolas Martinelli 54c2c08747 [FIX] account: initial balance
- Create manually an account move
- Add a line with a credit != 0
- Click on "Add a line" => crash

`line_ids` does not contain the credit since it was not filled in.

opw-782980
2017-11-17 10:09:05 +01:00
jem-odoo 7a951d7085 [FIX] sale: to invoice/invoiced amounts for delivered policy
This commits make the computation of amount to invoice
and amout already invoiced on sale order line works
with invoice policy based on delivered quantities.

Before this, the upselling of delivered quantities
was not working: you were seeing the upsell amount
in the amount to invoice (qty delivered > qty ordered).
Notes:
- When a product is not delivered (qty delivered = 0), its
amount to invoice is zero too
- Draft invoice are not take into account really; they are
included at sale order price (discount on draft invoice does
not impact amounts to invoice/invoiced)

Also, when a SO in state 'draft' or 'cancel', its amount
to invoice should be zero, but its invoiced amount should
take all validated invoices into account.

Finally, more correct trigger are set on the compute
method, to trigger recomputation on right moment.

This commit also compute the 2 amount fields as sudo, since
the amount should not be dependent of access right of current
user.

To check those different points, this commit provide some
more tests with ordered and delivered product, SO cancelling,
upselling or delivery, ...
2017-11-17 10:01:00 +01:00
jem-odoo 93aea80cdf [FIX] sale_timesheet: to invoice amount, take discount into account 2017-11-17 10:00:48 +01:00
Nicolas Martinelli 054477113f [FIX] mrp: missing field used in domain
opw-782997
2017-11-17 09:29:59 +01:00
Christophe Simonis 259c2b6130 [MERGE] forward port branch 11.0 up to a33e27b139 2017-11-16 18:22:28 +01:00
Christophe Simonis a33e27b139 [FIX] website_sale: return sale.order object
Always return a `sale.order` object, otherwise calling method may crash
since they expect receiving such an object.

opw-761344

Manual forward-port of 0888602831 which has
been lost during normal one.
2017-11-16 18:22:03 +01:00
Nicolas Martinelli fe674f06c1 [FIX] event: with_context
Using `with_context({'use_babel': True})` overrides completely the
environment context. Therefore, the lang is lost and the date is
formatted in the default language.

opw-779753
2017-11-16 18:01:29 +01:00
Christophe Simonis c703a2a0c3 [MERGE] forward port branch 11.0 up to d279a3e6d5 2017-11-16 17:55:37 +01:00
Arnold Moyaux d279a3e6d5 [FIX] stock: adapt portal rights
After commit 996a817071
The portal report on picking only check if
the user has a 'read' access on picking.
If he can read it, sudo is called and thus
record rule/access right on component objects
are not necessary.

This commit removes useless rights for portal users.
2017-11-16 16:54:42 +01:00
dip-odoo 74d9ff5bd7 [IMP] payment: Add information on Stripe payment acquirer kanban vignette
Purpose
=======

Stripe is now a payment acquirer that can be used to manage subscriptions, just like Authorize and Ingenico.

Specification
=============

For Stripe : add "Subscriptions" and "Save Cards" as features on the payment acquirer selection screen
2017-11-16 16:09:30 +01:00
Yannick Tivisse 55a3eaae88 [FIX] stock: Target the correct model when creating ir.model.data 2017-11-16 15:21:39 +01:00
Yannick Tivisse cf853a785b [MERGE] Convert remaining yml files and remove yml import engine 2017-11-16 14:50:31 +01:00
Yannick Tivisse 77eb1f82d9 [REM] tools: Remove the yml import engine 2017-11-16 14:49:06 +01:00