Tuesday, November 10, 2020
13 changes · master
Miscellaneous changes
TLDR: float_round in backend works differently with POS roundings in case of negative amounts (refunds) STEPS: * setup rounding for POS, e.g. 0.1 DOWN * make refund via POS for an amount with cents, e.g. -129.33 * proceed to POS payment * BEFORE: is shows -129.40 * AFTER: is shows -129.30 WHY: * This follows rule ``round(-x) = -round(x)`` -- this way we don't have difference in absolute values for order and refund. * See also https://github.com/odoo/odoo/commit/ea2c80cad01
Original PR description
TLDR: float_round in backend works differently with POS roundings in case of negative amounts (refunds) STEPS: * setup rounding for POS, e.g. 0.1 DOWN * make refund via POS for an amount with cents, e.g. -129.33 * proceed to POS payment * BEFORE: is shows -129.40 * AFTER: is shows -129.30 WHY: * This follows rule ``round(-x) = -round(x)`` -- this way we don't have difference in absolute values for order and refund. * See also https://github.com/odoo/odoo/commit/ea2c80cad018da6390ea9d116733de691907e1e4 --- opw-2357917 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#61526 Forward-Port-Of: odoo/odoo#61480
…se tests Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#61558
Original PR description
…se tests Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#61558
[FIX] stock: fix picking_type_id of stock move. The picking_type_id of a stock move can differ of the related picking: - Create and save a draft transfer with a stock move - Change the picking_type_id and save - The picking_type of moves won't be the same than the one on the stock picking. Fix force the picking_type_id of moves_lines in the picking `onchange_picking_type` method. Same issue can appear in multi company situation, fix it too. [FIX] stock: fix creation of picking type
Original PR description
[FIX] stock: fix picking_type_id of stock move. The picking_type_id of a stock move can differ of the related picking: - Create and save a draft transfer with a stock move - Change the…
[FIX] stock: fix picking_type_id of stock move. The picking_type_id of a stock move can differ of the related picking: - Create and save a draft transfer with a stock move - Change the picking_type_id and save - The picking_type of moves won't be the same than the one on the stock picking. Fix force the picking_type_id of moves_lines in the picking `onchange_picking_type` method. Same issue can appear in multi company situation, fix it too. [FIX] stock: fix creation of picking type for a other company In multi company (company A and B), - Select the company A as main one, and select B too. - Create a picking type and change the company to B. - Don't select any warehouse. - We can't save, because the company ir.sequence is set to A instead of B. Fix by apply the company_id of the picking type. [FIX] mrp: date_planned_start readonly when done change the unexciting `close` state in `done` in the attrs of `date_planned_start` [FIX-IMP] stock: fix and batch push_apply - Fix the issue of the added test. - Also batch the `push_apply` + `_action_confirm` by doing confirm in BFS instead of DFS. Improve a lot the performance when the _action_confirm is on batch. WIP [FIX] mrp: company BoM form Add to `check_company` on `bom_id` of operation, to avoid company issue after in MO when we create `mrp.workcenter.productivity.loss`. Also remove the readonly on `company_id` to get the possibility of modify it if the company_id of BoM change. task-2372196 Forward-Port-Of: odoo/odoo#60914
This commit will add a new group in the payment view with the list of the edi documents for this payment. The group will only be visible in debug mode. This is done to help the debugging and the error finding when there is a problem with an edi document. Related to 2e01da4713f9ee68813b248a8b88f367785fc937 Forward-Port-Of: odoo/odoo#61543
Original PR description
This commit will add a new group in the payment view with the list of the edi documents for this payment. The group will only be visible in debug mode. This is done to help the debugging and the error finding when there is a problem with an edi document. Related to 2e01da4713f9ee68813b248a8b88f367785fc937 Forward-Port-Of: odoo/odoo#61543
- Create a sale tax T1, 0% included in price - Create a sale tax T2, 15% - Create a product PROD1 with a sale price of 10 and T1 - Create a fiscal position FPOS and map T1 to T2 - Go to POS - Select PROD1: - Without FPOS the price should be 10 and tax 0 - With FPOS, price should be 10 and tax 1.5 POS calculate the tax twice, makeing the price 11,50 and an extra tax of 15% to 13,23. This is a fine tuning of 1baa774bc7a1d6cabcb3d61ff19ec2d6010fbd6a to distinguish between inc
Original PR description
- Create a sale tax T1, 0% included in price
- Create a sale tax T2, 15%
- Create a product PROD1 with a sale price of 10 and T1
- Create a fiscal position FPOS and map T1 to T2
- Go to POS
- Select PROD1:
- Without FPOS the price should be 10 and tax 0
- With FPOS, price should be 10 and tax 1.5
POS calculate the tax twice, makeing the price 11,50 and an extra tax of
15% to 13,23.
This is a fine tuning of 1baa774bc7a1d6cabcb3d61ff19ec2d6010fbd6a
to distinguish between included-excluded tax after mapping and avoid the
double computation.
opw-2374247
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#61579The `action_name` was taken from the context and needs sanity checks. Ensure only actions from the account module can be read. Forward-Port-Of: odoo/odoo#61365
Original PR description
The `action_name` was taken from the context and needs sanity checks. Ensure only actions from the account module can be read. Forward-Port-Of: odoo/odoo#61365
Previously, when flipping some shapes vertically on chrome, and vertically or horizontally on firefox, there was a gap of 1px or less at some screen widths. This is caused by the way these browsers render backgrounds on transformed elements. It seems like firefox will round the size of the element to render the background image on it if the element is transformed, while chrome will always render the background at the correct size (or render it at a larger size and clip it to the correct s
Original PR description
Previously, when flipping some shapes vertically on chrome, and vertically or horizontally on firefox, there was a gap of 1px or less at some screen widths. This is caused by the way these browsers render backgrounds on transformed elements. It seems like firefox will round the size of the element to render the background image on it if the element is transformed, while chrome will always render the background at the correct size (or render it at a larger size and clip it to the correct size after the fact), but will round the coordinates of the symmetry point, causing only the vertical flip to have this issue, and only if the background image would not extend beyond the bounds of the element (on firefox, even shapes that would extend beyond the bounds of the element would showcase a gap, eg origins 1) This commit fixes that by applying the transform to the SVG rather than to the element, by use of the shapes controller. task-2369560 Forward-Port-Of: odoo/odoo#61114
Use the helper `_for_xml_id` or `clean_action` when needing to read the content of an action. The helper uses sudo and keeps only required fields. account_reports access arbitrary action based on action_id of the account.financial.html.report.line record so it's no better than `/web/action/load` at the moment. Enterprise version of odoo/odoo#61365 Forward-Port-Of: odoo/enterprise#14682
Original PR description
Use the helper `_for_xml_id` or `clean_action` when needing to read the content of an action. The helper uses sudo and keeps only required fields. account_reports access arbitrary action based on action_id of the account.financial.html.report.line record so it's no better than `/web/action/load` at the moment. Enterprise version of odoo/odoo#61365 Forward-Port-Of: odoo/enterprise#14682
The home menu was refactored in version 14.0 to handle all keyboard events when searching, while keeping the focus on the search box. This allows to input text natively on the text box, while being able to move over search results at the same time, and the currently-selected result is highlighted by toggling classes. However, since the focus is always on the search box, screen reader users are not able anymore to know what result is being selected (in previous versions, the focus actua
Original PR description
The home menu was refactored in version 14.0 to handle all keyboard events when searching, while keeping the focus on the search box. This allows to input text natively on the text box, while being able to move over search results at the same time, and the currently-selected result is highlighted by toggling classes. However, since the focus is always on the search box, screen reader users are not able anymore to know what result is being selected (in previous versions, the focus actually moved to the selected element). The above is fixed by labeling the currently-selected result using the `aria-activedescendant` attribute, as well as adding required IDs and roles for that attribute to work. Forward-Port-Of: odoo/enterprise#14511
On accounting reports, on the normal trial balance, the name of the lines are gotten using account's name_get method as shown. https://github.com/odoo/enterprise/blob/2d4daa98e56b3425491777311279af8d819b06a0/account_reports/models/account_report_coa.py#L111 The trial balance for Mexico defined on l10n_mx_reports is using a direct string concatenation with the account's code and name. https://github.com/odoo/enterprise/blob/2d4daa98e56b3425491777311279af8d819b06a0/l10n_mx_reports/models/tr
Original PR description
On accounting reports, on the normal trial balance, the name of the lines are gotten using account's name_get method as shown. https://github.com/odoo/enterprise/blob/2d4daa98e56b3425491777311279af8d819b06a0/account_reports/models/account_report_coa.py#L111 The trial balance for Mexico defined on l10n_mx_reports is using a direct string concatenation with the account's code and name. https://github.com/odoo/enterprise/blob/2d4daa98e56b3425491777311279af8d819b06a0/l10n_mx_reports/models/trial_balance.py#L216 To be more consistent within the code, now trial balance for Mexico use name_get too. This also allows to inherit name_get to change what the report is showing on lines names if it was necessary. Also the name_get makes the same concatenation, so the final behavior is not going to change https://github.com/odoo/odoo/blob/14.0/addons/account/models/account_account.py#L349 OPW#2375382 Forward-Port-Of: odoo/enterprise#14672
Issue - Install 'Timesheets' module - Go to Timesheets and group by 'project' - Click on key 'a' to start the timer (JS) Traceback raised. Also, error raised if grouped by 'task' and timer started. Cause No task provided. Solution - On keydown event, check if can show timer button, if not, skip keydown. - When grouped by project, tasks are not visible anymore and so no task is provided on start timer keydown event. Therefore, check if task provided before ca
Original PR description
Issue - Install 'Timesheets' module - Go to Timesheets and group by 'project' - Click on key 'a' to start the timer (JS) Traceback raised. Also, error raised if grouped by 'task' and timer started. Cause No task provided. Solution - On keydown event, check if can show timer button, if not, skip keydown. - When grouped by project, tasks are not visible anymore and so no task is provided on start timer keydown event. Therefore, check if task provided before call _onClickLineButton. opw-2374843 Forward-Port-Of: odoo/enterprise#14658
Issue - Install 'Manufacturing' module - Go to 'Manufacturing -> Configuration -> Settings' - Activate 'Work Orders' feature then save - Go 'Manufacturing -> Configuration -> Operations' - On the `Assembly` record, click on the list icon in the "Steps" column - Create a new one and try to select a product. No product displayed. Cause BOMs are linked to the `product.template` instead of a `product.product` Solution - Check on the `p.product_tmpl_id.bom_ids` instead
Original PR description
Issue - Install 'Manufacturing' module - Go to 'Manufacturing -> Configuration -> Settings' - Activate 'Work Orders' feature then save - Go 'Manufacturing -> Configuration -> Operations' - On the `Assembly` record, click on the list icon in the "Steps" column - Create a new one and try to select a product. No product displayed. Cause BOMs are linked to the `product.template` instead of a `product.product` Solution - Check on the `p.product_tmpl_id.bom_ids` instead of `p.variant_bom_ids`. - Display only products that are related to the current operation_id. - Add api.depends decorator with fields `operation_id` and `company_id` on the available_product_ids compute func so the products list is more accurate with the context. opw-2377140 Forward-Port-Of: odoo/enterprise#14635
Forward-Port-Of: odoo/enterprise#14629
Original PR description
Forward-Port-Of: odoo/enterprise#14629