Commit Graph
117156 Commits
Author SHA1 Message Date
Yannick Tivisse db54e0df79 [FIX] l10n_be_hr_payroll: Count spouse deductions if revenue 2017-12-22 16:28:12 +01:00
Alexandre Kühn 262bec6af5 [FIX] l10n_fr_pos_cert: datetime.timedelta
When a user was closing a POS to go into the backend, and click on "Reprendre",
there was an error which prevent him to reopen the POS.

There was a confusion between object <datetime> and <datetime.datetime>, as
the previous code was trying to use the function timedelta() from datetime.datetime
instead of datetime. As a result, the error states that datetime.datetime has no
function timedelta.

opw-801523
2017-12-22 15:48:15 +01:00
Nicolas Martinelli fbaee8b267 [FIX] mrp: WO report
- Activate Work Orders
- Go in MRP > Reporting > Work Orders

The status filters ('Ready', 'Pending'...) do not work.

This is because the action forces the domain to `[('state','=','done')]`
instead of using one of the available filters.

opw-788043
2017-12-22 15:44:59 +01:00
Romain Derie 174cd2aeee [FIX] website: website had incomplete context
Before this commit, website had incomplete context.
It was causing website.menu to not be translated correctly because lang was
not set on website.

Now, since the website has the context correctly binded, menus are translated

opw-787012
2017-12-22 15:44:39 +01:00
Aaron Bohy 4f4e686fb2 [FIX] web: graph: don't lose initial groupby at reload
Before this rev., when a graph view was reloaded (e.g. by clicking
on the graph view switcher), the inital groupby was lost if it
didn't come from the searchview (i.e. if it came from the context
or from the arch). For instance, go to Sales > Reporting > Sales
(the view is grouped by 'date', and there are two groups), reload
by clicking on the graph view switcher: there is only one group
left.

The reload RPC was actually fine. What was wrong is the 'state'
object given to the renderer after the reload, as it didn't contain
the correct groupby, so the view wasn't correctly re-rendered.
2017-12-22 15:43:04 +01:00
Nicolas Martinelli c0769c753c [FIX] account: prevent traceback
When changing the date of an account move, the method
`_onchange_amount_currency` is called manually on a recordset. If the
recordset length is > 1, it crashes.
2017-12-22 13:38:30 +01:00
Nicolas Martinelli a1aed05f8d [FIX] account: change currency in move line
- In an account move, change the date
- All debits and credits of the lines are reset

This is because the recomputation of the credits and debits should only
occur in case of currency rate change.

opw-801030
2017-12-22 13:38:30 +01:00
Florent de Labarre 45015ea7b7 [FIX] stock: start a finished inventory
Avoids launching a canceled/done inventory.

Closes #21697
opw-800347
2017-12-22 12:54:10 +01:00
Nicolas Martinelli ed8fc8f52b [FIX] stock: planned transfer
- Create a product A tracked by lot
- From the Dashboard, create a 'Planned Transfer'
- Add product A, any quantity
- Click on "Mark as TODO"

It's now possible to edit the serial numbers, but it's impossible to set
any quantity in the move lines.

This is due to the remaining context key `planned_picking` which makes
`is_initial_demand_editable = True`. In this case, `qty_done` is
read-only in the view `view_stock_move_line_operation_tree`.

As a workaround, `action_confirm` returns an action and set the context
accordingly.

opw-785332
2017-12-22 11:03:13 +01:00
Florent de Labarre 8836ad5274 [IMP] stock: detail in product error
- Create an inventory 1 with "Product A - Variant 1"
- Start inventory
- Create an inventory 2 with "Product A - Variant 1", "product A -
  Variante 2"...
- Start inventory

An error pops-up because two inventories for the same product
"Product A - Variant 1". However, you don't know which variant is
impacted sincethe message error only shows the product name:
"Product A".

Closes #21687
opw-799583
2017-12-22 11:00:51 +01:00
Laurent Smet 186a19809c [IMP] doc: add guidelines to build localization modules 2017-12-21 18:16:48 +01:00
Nicolas Lempereur a6a6cf8005 [FIX] google_account: typo python3 from 01e35141
The typo caused a traceback instead of an error message.

opw-801237
closes #21790
2017-12-21 15:35:41 +01:00
Denis Ledoux c2a5d6031c [FIX] pad_project: do not write on task description when using pad.
This revision is similar to
6e8faf40bd
but for the opposite case:
When the task is using the pad,
somehow the regular `description` pad
was written as well on save, making both field
being saved together,
and when description is saved
its content is written on the pad.
Therefore, whatever you written in the pad,
the pad was overriden with the current content of
the task regular description field

opw-787773
2017-12-21 14:45:40 +01:00
Nicolas Martinelli 2aa3132d09 [FIX] base: prevent App Switcher as home action
This reverts commit 1ffe85f1cb and replaces the domain with a
constrain.
2017-12-21 13:47:24 +01:00
Raphael Collet 2511d77936 [FIX] base: module category exclusivity (#21729)
Suppose that modules M1 and M2 belong to a subcategory of some exclusive
category.  Then M1 and M2 may not be both installed, unless one of them
transitively depends on the other.

OPW 785434
2017-12-21 10:14:07 +01:00
Nicolas Lempereur f771a9d945 [FIX] stock_account: stock_history slow read_group
The stock_history view is generated from by grouping of move from
sources and move to destinations which depending on the request and
number of request can be rather slow.

This fix replace a possibly high number of request by a slower number.

On a production instance, doing an inventory at a choosen date:

- with 300 stock moves, went from 4 minutes to 4 seconds,
- with 130 000 stock moves, went from 66 minutes to 10 minutes

opw-765793
closes #19594
2017-12-21 09:59:51 +01:00
Nicolas Lempereur 7a4cea96b2 [FIX] web_planner: use user language on frontend
The web planner specified no language for frontend.

This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.

opw-781727
fixes #20829
closes #21006
2017-12-20 18:01:20 +01:00
Nicolas Lempereur be5950e429 [FIX] web_planner: use user language on frontend
The web planner specified no language for frontend so the website
planner on the frontend was never translated.

This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.

The code is the same that get_context from web_editor.base but requiring
that would possibly adds delays (for dom_ready) that we don't want.

note: this is for 9.0 up to not including 11.0, in 11.0 another solution
is used and in master a bigger change is being worked on.

opw-781727
fixes #20829
closes #21004
2017-12-20 18:01:09 +01:00
Lucas Perais (lpe) 1ffe85f1cb [FIX] base: prevent App Switcher action to be selected as home action on user
Before this commit, one could choose the App Switcher as his Home action.
and arriving on /web would trigger an infinite loop at startup

After this commit it is not possible to choose the App Switcher as Home action anymore

OPW 800323
2017-12-20 15:08:53 +01:00
Nicolas Lempereur a1da9eec41 [FIX] payment: reload on kanban acquirer install
When installing a payment acquirer from the kanban view, this would by
luck display the form view correctly.

But if we go back to the listing then forward to the form view, things
go awry.

This is because the listing action views have not been updated after the
module installed, this worked at install because we loaded a new action.

This commit change the action so when installing a payment acquirer from
the kanban view, the view is simply reloaded.

opw-786454
closes #21757
2017-12-20 14:14:43 +01:00
Arnold Moyaux 0322f6e51f [FIX] stock: return with a different uom.
Usecase to reproduce:
- Create a new unit of measure "Pack of 6" of UoM Categ = units
- Create a new product: Coca cola can, sell in unit, purchase in packs
- Create a PO, buy 1 pack of this product
- Receive the pack from the delivery order
- On the picking you just received, click on return
-> If you validate the wizard by clicking on "return", you get 6 packs, so you multiply by 6 the amounts of what you send as the system changed the quantity but not the Uom

It happens because the system compute the quanity to returns in terms of quant uom but when creating the return move it copies the origin move uom.

This commit uses the quant uom on the return move and also adds the uom in the view in order to be less confusing for the end user.

opw-800566
2017-12-20 13:39:36 +01:00
Nicolas Martinelli 8b69b2f732 [REF] account: hook for currency rate
Commit 74e4130f5f makes sure to make the accounting date prevail on
the invoice date when it comes to currency conversion.

However, the choice of date is not universally recognized. Softwares
(and accountants) might use either the accounting date or the invoice
date.

Therefore, we provide a hook se the behavior of the software can easily
be changed if necessary.

opw-783372
2017-12-20 13:35:43 +01:00
Martin Trigaux d8f1935068 [I18N] fetch missing languages
Some new languages were skipped and had no files.
Import all files for all languages
2017-12-20 13:02:37 +01:00
qsm-odoo 16065f3ee2 [FIX] website_sale: hide checkout btn on emptied cart in all languages
When an user goes to its cart and removes all the items, the checkout
button is hidden so that the user cannot start an order with no product.
This behavior was not working in languages which are not the default
language of the website, as the button was found in JS relying on the
fact it started by "/shop/checkout", while it can be something like
"/fr_FR/shop/checkout".

Closes https://github.com/odoo/odoo/issues/21722
2017-12-20 12:25:53 +01:00
Yannick Tivisse 8af1f9b54c [FIX] point_of_sale: Avoid using unicode in views
Purpose
=======

There's a lot of occurence in Odoo with unicode in views (or models).

But this one is special because it breaks the functional documentation build when loading the fields on the model pos.config with:

.. demo:fields:: point_of_sale.action_pos_config_pos
2017-12-20 11:25:19 +01:00
Guillaume Masson d8846e8e64 [FIX] l10n_fr_pos_cert: bad import
Closes #21735
2017-12-20 10:57:42 +01:00
Guillaume Masson 5651f28cd7 [CLA] add metaminux to TecLib CCLA
Done at #21735
2017-12-20 10:56:49 +01:00
Florent de Labarre 06ccccdb75 [FIX] account: check ACL and ir.rules upon account.move cancellation
Was PR #21732. Was OPW 800611. Courtesy of Florent de Labarre
2017-12-19 17:52:18 +01:00
Stéphane Bidoul (ACSONE) a8e444bea8 [FIX] l10n_lu: bad line breaks in CSV data
This was causing the creation of weird records when installing this module
2017-12-19 16:48:35 +01:00
Richard Mathot bfaab1e7aa [FIX] l10n_ch: bad description syntax in manifest
As the module description is processed by `docutils`, it should be
syntaxically valid to avoid warnings like:

    `Bullet list ends without a blank line; unexpected unindent.`
2017-12-19 16:47:12 +01:00
Pierre Masereel f1fdb97eed [FIX] mrp_sale: compute unit price of kit
When the unit price of a kit is computed in anglo saxon accounting, the
average price of kit parts is not multiplied by the quantity of this
parts in the bom.

E.g.: a kit of 2 prod1 and 1 prod2, when the price is computed, it only
take into account the cost of 1 prod1 and 1 prod2 to compute the kit
cost instead of 2 prod1 and 1 prod2

opw-786268
2017-12-19 16:27:44 +01:00
Martin Trigaux 4af12acc80 [I18N] es_ cleaning translations
The regional variations are not published on Transifex and hsould be translated
manually.

The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).

Clean based on the .pot and delete the empty files

Fixes #21733
2017-12-19 16:22:17 +01:00
Olivier Colson 3415a8712f [FIX] l10n_ch: the ISR number was missing a mod10r check character in its last position 2017-12-19 15:06:42 +01:00
Nicolas Lempereur 46cf7f17a3 [FIX] web: resequence Undefined column w/ 12048bd6
There is a drawback in 12048bd6, if a kanban view with an
"Undefined" column (exist when a kanban view grouped on a relational
field and some record have this field unset) had a column resequenced a
traceback would happen if more than one column was displayed.

This happen because before we had a "undefined" ID for the "Undefined"
column and after 12048bd6 we get a framework unique ID which was not
managed.

note: this commit also adds `left`/`right` values in the dragAndDrop
test utility function so an element can be dropped at the right/left of
another element.

related to opw-782433
closes #21708
2017-12-19 14:51:40 +01:00
Goffin Simon 0e0c320944 [FIX] account: Changing name Sale/purchase journal
As the domain for this report has been removed, all the types of
journals can be printed. Now the name of this report is "Journals Audit".

opw:787781
2017-12-19 14:04:04 +01:00
Nicolas Martinelli e5f61fa10c [FIX] mrp: real duration
- Create a MO which generates WOs
- User 1 starts working on it
- User 2 starts working on it

The field 'Real Duration' only displays the time spent by the user
connected. It means that there will be an inconsistency between the
field 'Real Duration' and the list of durations shown in the `time_ids`
field.

We want to keep 'Real Duration' limited to the current user, because it
should represent the duration updated in real time (done in widget
`mrp_time_counter`). However, we also want to see the total real
drations for all users. Thereofe, we simply update the view to show the
total in the list view.

opw-784456
2017-12-19 13:38:11 +01:00
Christophe Matthieu fdf0f014bf [FIX] web: avoid race condition in the website
Depending on the speed of the runbot, errors may appear if one tries to
use a template that is not yet loaded. Templates are being
loaded and we add new template to read, the ready function does not
take into account new additions.
2017-12-19 13:35:36 +01:00
Géry Debongnie 102e838473 [FIX] web: prevent double translation in kanban view
The kanban view uses a template which comes from the server, already
translated.  Before this commit, it tried to retranslate again the
template in qweb.js, which may be a problem (in addition to the useless
work): if some english string A is translated in B (french), but B is
also a valid english string which is translated into C in french, then
we will have a wrong result.

In this commit, we simply add a flag to disable the translation process, which
should also slightly improve the kanban view rendering performance.
2017-12-19 13:35:36 +01:00
Christophe Matthieu 7dfdfa0103 [FIX] web_editor: Avoid twice translated for static xml
Avoid texts to be translated twice if some modules have the translated
value corresponding to the English source term.

To reproduce: create a translation for static xml (comment 'openerp-web')
with 'Modifier' translated by 'Tadaaa'. In french context, the 'Edit'
button in forms is translated by 'Tadaaa'.

Don't translate template in web_editor if we are in the backend because
the translations of all the modules have already been loaded and applied.
2017-12-19 13:35:36 +01:00
Yannick Tivisse b72240e3c9 [FIX] fleet: Don't copy driver_id on vehicle duplication
Purpose
=======

There's an unicity constraint on the fleet.vehicle model.

It's thus impossible to duplicate a car if the driver is set.
Y
2017-12-19 12:47:42 +01:00
Yannick Tivisse 4288b5b6fb [FIX] l10n_be_hr_payroll_fleet: Add missing dependency on compute method 2017-12-19 12:45:38 +01:00
Nicolas Martinelli ad8e1118c1 [FIX] web: action url never call on_close method
On a tree view:
- Add a button returning an `act_url` action; e.g.:
```
@api.multi
def open_google(self):
    return {
        'type': 'ir.actions.act_url',
        'url': 'https://google.fr/',
        'target': 'new',
    }

```
- Click on a button

The action call works only once because the button is never re-enabled.

The button is actually enabled only at view rendering. Therefore, we
call `on_close` in order to reload the view.

opw-784587
2017-12-19 11:18:12 +01:00
Yannick Tivisse 1f7a9281fa [FIX] l10n_be_hr_payroll_fleet: Hide car model if transport mode not set 2017-12-19 10:51:22 +01:00
Yannick Tivisse 867f44a235 [FIX] l10n_be_hr_payroll: Store existing field company_car_total_depreciated_cost
Purpose
=======

In l10n_be_hr_payroll, the field is a simple Float field, it implied `store=True`
In l10n_be_hr_payroll_fleet, a compute method is added, and becomes `store=False`

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

Keep this field `store=True`. This could only be done because the column already exists in the database.

PS: Same reason for car_atn
2017-12-19 10:51:22 +01:00
Yannick Tivisse 3694b02604 [FIX] l10n_be_hr_payroll: Round the car value to 2 decimals in name_get 2017-12-19 10:51:22 +01:00
Yannick Tivisse 0b85adc691 [FIX] l10n_be_hr_payroll_fleet: Compute correclty car names 2017-12-19 10:51:21 +01:00
qsm-odoo 506e45e73f [FIX] payment: consider the "Save my payment data" option
Before this commit, the option was ignored. Indeed "checked" is a
DOMElement property, not a jQueryElement's one.

See https://github.com/odoo/odoo/issues/21321
2017-12-19 10:46:22 +01:00
qsm-odoo 91b3a4fa8c [FIX] payment: properly allow PaymentForm extensions
Commit https://github.com/odoo/odoo/commit/be650c5979d6d427ad79bc23f0edc1d10290f881#diff-b448c1be5e302f4819079161e4fe3de9L369
added a `require` in the middle of a file, making the whole file
require the DOM to be ready.

This was not really a problem as the module did not return anything...
until https://github.com/odoo/odoo/commit/d2815c474d7ab24a06f5365d967a602119252b95

Proper way to fix this would be to split the module in two parts, one
requiring the DOM to be ready and not the other one. However, this
commit chose to do a fix as stable as possible.

See https://github.com/odoo/odoo/issues/21702
(and https://github.com/odoo/odoo/issues/21321)
2017-12-19 10:46:22 +01:00
Olivier Dony f65f065901 [FIX] web tests: correct wrong route visibility 2017-12-19 10:12:34 +01:00
Denis Ledoux f3da958fa1 [FIX] product: price computation with dated pricelist rules and tz
Take account of the user timezone to compute the price for
pricelist rules with start / end date.

Before this revision, the date used to compare to
the dated pricelist rule is always the date of today
in UTC.

For instance:
- If a user is in timezone UTC +12
- The 10% discount on the pricelist starts on December 19
- It's currently December 18 13:00

The user did not have the discount,
because it was consdiered December 18,
while the user was already in December 19.

With this revision, we take account of the context
and its timezone to compute the date of today
and return the correct price according to the
dated start and end datetime.

opw-785203
2017-12-18 18:23:22 +01:00