Tuesday, January 28, 2020
36 changes · master
Enhancements to existing features
Updates help text on employee work information fields to better explain who is responsible for coaching, time off approvals, and expense approvals. This helps HR users understand what each responsible person field means and what happens when no approver is set.
Original PR description
Task : https://www.odoo.com/web#id=2168330&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.a8dff92edca2e7c537e89e03eb5dce09 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
The sales invoice creation wizard now has unique identifiers on key buttons and sections. This makes future customizations safer and easier by avoiding fragile references to duplicate or unnamed screen elements.
Original PR description
Description of the issue/feature this PR addresses: Set unique ID's on button and div elements. Current behavior before PR: 1. Before this commit there were two buttons on this wizard with the same name 'create_invoices' that do different things. One creates the invoice and the other one creates and opens the invoices. 2. Before the commit there are two divs without an ID. Desired behavior after PR is merged: 1. By setting an unique ID on both buttons we can do a clean and easy xpath. Something like `<xpath expr="//button[@id='create_invoice_open']" position="replace"/>` instead of having to use indexes or dangerous behaviours 2. By setting an ID on the divs we can easily xpath by name. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The event kanban card layout was adjusted to make room for additional footer information, such as social media statistics. This keeps event cards visually consistent while enabling clearer reporting in related integrations.
Original PR description
Purpose ======= In "Event social Facebook", we want to insert some statistics in the footer of the kanban card. So, we added a div element, to be able to add the fotter bellow the card. Adjust the CSS to keep the same view. Task #1999230
Several business areas now use a simpler and more reliable way to interpret saved filter criteria and domains. This is an internal improvement that should help maintain consistency across reports, imports, subscriptions, planning, marketing automation, and social notifications without changing day-to-day workflows.
Original PR description
To evaluate a domain, it is easier to use ast Goes with odoo/odoo#43831
The help text for the Timesheet responsible field on employee work information was updated to better explain who approves an employee's timesheets. This helps HR and managers understand what happens when no specific approver is assigned.
Original PR description
Task :https://www.odoo.com/web#id=2168330&action=327&model=project.task&view_type=form&menu_id=4720 Pad :https://pad.odoo.com/p/r.a8dff92edca2e7c537e89e03eb5dce09
Resolved issues and error corrections
The event barcode interface now checks invoice payment status using the correct payment field. This prevents registrations from being evaluated against outdated invoice status data after accounting model changes.
Original PR description
…rface PURPOSE There has been a few changes in the accounting module since the version 12.4. The field 'invoice_ids' in the 'sale.order' model is now related to the 'account.move' model instead of the 'account.invoice' model. The field that contain the payment state is now called 'invoice_payment_state'. This field changed name again in master into 'payment_state'. SPECIFICATION Change the call from 'invoice.state' into 'invoice.payment_state'. LINKS Task ID : 2180184 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
The activity view has been modernized behind the scenes using Odoo's newer interface framework. This helps keep the mail activity experience maintainable and ready for future improvements, with little expected change for day-to-day users.
Original PR description
This PR migrates the activity view renderer to owl
Miscellaneous changes
Before this commit, a move can be 'assigned' even if it has no reserved quantity. How to reproduce: * For a tracked product, add some quantities for a LN/SN. Create an another LN/SN with no quantity; * Create a delivery for this product; * Confirm it and check availability; * On the move line, change the SN/LN for the one without quantity. → The move has no reserved quantity but is still marked as `assigned`. task-2171546 Forward-Port-Of: odoo/odoo#43979
Original PR description
Before this commit, a move can be 'assigned' even if it has no reserved quantity. How to reproduce: * For a tracked product, add some quantities for a LN/SN. Create an another LN/SN with no quantity; * Create a delivery for this product; * Confirm it and check availability; * On the move line, change the SN/LN for the one without quantity. → The move has no reserved quantity but is still marked as `assigned`. task-2171546 Forward-Port-Of: odoo/odoo#43979
This fixes a visual issue on website process step blocks where the first and last connecting lines could disappear after editing the page. The change keeps the intended design intact for visitors and editors, avoiding broken-looking website content.
Original PR description
First & last lines are on `i:after`. After editing, the i is replaced by a span, so the line disappeared. See https://github.com/odoo/design-themes/commit/cae0a546cb8e671cc2797bf975413bac746a2b08 which is the original themes commit. opw-2177464
This fixes an issue in the UK Reports module where invalid user view fields could cause installation to fail. The change helps ensure the module can be installed reliably without blocking setup for affected businesses.
Original PR description
Invalid fields cause an installation crash. opw-2093465 X-original-commit: 49f1904797056d54d9909a07ec5c52cb31a7a8e5 Forward-Port-Of: #6418
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change of bbb1a8f151b0 it is now possible to give a load the migrations scripts from a path given in options. The `initialize_sys_path` function has been updated to hooks the new paths or the legacy symlink and to provide aliases to the previous import logic to ensure backward compatibility. `
Original PR description
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change…
**[FIX] module.py: --upgrades-paths dynamic hooks** Migration have long been only accessible thanks to a symlink from `odoo.base.maintenance` to our private migration repository. Thank to the change of bbb1a8f151b0 it is now possible to give a load the migrations scripts from a path given in options. The `initialize_sys_path` function has been updated to hooks the new paths or the legacy symlink and to provide aliases to the previous import logic to ensure backward compatibility. `odoo.upgrades` (`community/odoo/upgrades`) is a new namespace that hook all `--upgrades-paths` directories or the `community/odoo/base/maintenance/migrations` symlink if none is previded. `odoo.addons.base.maintenance.migrations` has been made an alias to `odoo.upgrades`. The `odoo.upgrades` is the desired method for accessing migrations scripts and should be used by all new scripts. **[FIX] config: Error on wrong Upgrade Path** The --upgrades-path option is a coma separated list of folders where to find migration scripts. It should contain python scripts for a specific module and a specific version. The validation verifies there are python programs enclosed by two directories (`module/version/`) within the given path. Task: 2178274 Forward-Port-Of: odoo/odoo#43953 Forward-Port-Of: odoo/odoo#43681
- Create a product A, FIFO and Automated - Create a PO for 50 units - Receive 45 units, no backorder - Create a landed cost for the picking The landed cost is split between the two move lines (45 units and 5 units). This occurs since in v13, there is no canceled picking created for the backorder, but a canceled stock move. We only keep done moves. opw-2179145 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is mer
Original PR description
- Create a product A, FIFO and Automated - Create a PO for 50 units - Receive 45 units, no backorder - Create a landed cost for the picking The landed cost is split between the two move lines (45 units and 5 units). This occurs since in v13, there is no canceled picking created for the backorder, but a canceled stock move. We only keep done moves. opw-2179145 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#44065
When a contract is closed, set the date of the day. Add multi-edit on work_entry list taskId: 2180263 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44007 Forward-Port-Of: odoo/odoo#43904
Original PR description
When a contract is closed, set the date of the day. Add multi-edit on work_entry list taskId: 2180263 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44007 Forward-Port-Of: odoo/odoo#43904
Sponsors' ribbons and agenda tracks filter are broken following the refactoring of website_event. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42165
Original PR description
Sponsors' ribbons and agenda tracks filter are broken following the refactoring of website_event. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#42165
When running the scheduler, either from the cron or from Inventory, _run_scheduler_tasks calls _merge_quants. However, when there were quants to merge, the query from _merge_quants would not be applied from this function. This is because the parameter use_new_cursor was used but a manual commit was missing after calling _merge_quants. For run_scheduler, we use the parameter use_new_cursor except for tests. We add a commit in _run_scheduler_tasks, so that the result of _merge_quants is co
Original PR description
When running the scheduler, either from the cron or from Inventory, _run_scheduler_tasks calls _merge_quants. However, when there were quants to merge, the query from _merge_quants would not be applied from this function. This is because the parameter use_new_cursor was used but a manual commit was missing after calling _merge_quants. For run_scheduler, we use the parameter use_new_cursor except for tests. We add a commit in _run_scheduler_tasks, so that the result of _merge_quants is committed in the database. opw 2155559 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#44073 Forward-Port-Of: odoo/odoo#43896
When we have multiple journal items with the same account in debit or credit, only the last one is taken into account. This could happend if we have a opening entry with lines depending on the partner (receivable, payable for instance) closes https://github.com/odoo/odoo/issues/43736 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43903
Original PR description
When we have multiple journal items with the same account in debit or credit, only the last one is taken into account. This could happend if we have a opening entry with lines depending on the partner (receivable, payable for instance) closes https://github.com/odoo/odoo/issues/43736 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43903
When a move is created through a push rule, the system will first try to find a picking to put it into before creating a new one. It is possible the move is placed into an immediate picking where the reservation fields are hidden and the initial demand is updated according to the qty_done with [0]. As this behaviour is unwanted, do not merge move into immediate transfers (which should be short-lived anyway). [0] 8303b1a69e96807bcb548ef079dcb463e34df36b Forward-Port-Of: odoo/odoo#4406
Original PR description
When a move is created through a push rule, the system will first try to find a picking to put it into before creating a new one. It is possible the move is placed into an immediate picking where the reservation fields are hidden and the initial demand is updated according to the qty_done with [0]. As this behaviour is unwanted, do not merge move into immediate transfers (which should be short-lived anyway). [0] 8303b1a69e96807bcb548ef079dcb463e34df36b Forward-Port-Of: odoo/odoo#44063
Usecase for example A black T-shirt made from a white T-shirt and black color. This behavior was possible in 12.0 and 11.0 and was removed by commit 77a8d92196924075f3e822fd218f57142cf20284 Close #40540 Forward-Port-Of: odoo/odoo#43392
Original PR description
Usecase for example A black T-shirt made from a white T-shirt and black color. This behavior was possible in 12.0 and 11.0 and was removed by commit 77a8d92196924075f3e822fd218f57142cf20284 Close #40540 Forward-Port-Of: odoo/odoo#43392
Steps to reproduce the bug: - Let's consider a company partner P with company_id = A - Let's consider an other partner C which is a child of P - Change the company_id of P to B Bug: The company_id of C was not changed even if the field company_id of C is in readonly as he has a parent. opw:2179632 Forward-Port-Of: odoo/odoo#43774
Original PR description
Steps to reproduce the bug: - Let's consider a company partner P with company_id = A - Let's consider an other partner C which is a child of P - Change the company_id of P to B Bug: The company_id of C was not changed even if the field company_id of C is in readonly as he has a parent. opw:2179632 Forward-Port-Of: odoo/odoo#43774
Description of the issue/feature this PR addresses: Allow overriding and adapting values when making invoices/down payments Current behavior before PR: The current functions to create invoices/down payments was pretty much impossible to override and modify and caused a lot of pains to manage Desired behavior after PR is merged: Since the huge function is split up into sub functions you can now override the smaller functions and modify to your likings. This is way more modular and easier to
Original PR description
Description of the issue/feature this PR addresses: Allow overriding and adapting values when making invoices/down payments Current behavior before PR: The current functions to create invoices/down payments was pretty much impossible to override and modify and caused a lot of pains to manage Desired behavior after PR is merged: Since the huge function is split up into sub functions you can now override the smaller functions and modify to your likings. This is way more modular and easier to manage as an outside dev. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44015 Forward-Port-Of: odoo/odoo#43532
- **[FIX] point_of_sale: Separate order sync from set table** Separate orders synchronization from set table to make the code clearer and enable overriding. - **[FIX] point_of_sale: Split bill** Clean code and make overrides easier. - **[FIX] point_of_sale: Cancel payment when switching to floor plan** Payments that used terminals were not correctly canceled when switching to the floor plan because there was no selected order. If a response was received at that time, a tr
Original PR description
- **[FIX] point_of_sale: Separate order sync from set table** Separate orders synchronization from set table to make the code clearer and enable overriding. - **[FIX] point_of_sale: Split bill** Clean code and make overrides easier. - **[FIX] point_of_sale: Cancel payment when switching to floor plan** Payments that used terminals were not correctly canceled when switching to the floor plan because there was no selected order. If a response was received at that time, a traceback appeared. - **[FIX] pos_restaurant: Auto switch to floor plan** A timeout is setup to go back to the floorplan after the user has been idle for 1 minute to synchronize orders. We now only keep this behaviour on the ProductScreen. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44034 Forward-Port-Of: odoo/odoo#43576
See https://github.com/odoo/odoo/commit/eb4aac3afaceb20c745f3bae0dd5142c1d2a2e1e task-2117636 Forward-Port-Of: odoo/odoo#44028
Original PR description
See https://github.com/odoo/odoo/commit/eb4aac3afaceb20c745f3bae0dd5142c1d2a2e1e task-2117636 Forward-Port-Of: odoo/odoo#44028
Studio customization is an exception, a data module added to ir_module but that is never added to graph since there is no manifest. OPW #2180885 closes #43880 Forward-Port-Of: odoo/odoo#43892
Original PR description
Studio customization is an exception, a data module added to ir_module but that is never added to graph since there is no manifest. OPW #2180885 closes #43880 Forward-Port-Of: odoo/odoo#43892
Sometimes when we try to buy a product that doesn't have any variants, it would result in an error saying there isn't any valid combination for that product. This was happening because `_get_variant_id_for_combination` was considering that the field `combination_indices` would always be equal to `''` (empty string) in such a case. This isn't true as `combination_indices` isn't a required field thus allowing `null` \ `None` to be valid values for that field. This fix will simply inc
Original PR description
Sometimes when we try to buy a product that doesn't have any variants, it would result in an error saying there isn't any valid combination for that product. This was happening because `_get_variant_id_for_combination` was considering that the field `combination_indices` would always be equal to `''` (empty string) in such a case. This isn't true as `combination_indices` isn't a required field thus allowing `null` \ `None` to be valid values for that field. This fix will simply include products with no values set for their `combination_indices` when searching a corresponding variant from the `product_template`. Forward-Port-Of: odoo/odoo#43581
When there are no items in the cart, pressing the print bill button may result in an error due to the translation (_t) module not being imported Description of the issue/feature this PR addresses: Bug fix for print bill button on empty cart Current behavior before PR: May result in an error being thrown Desired behavior after PR is merged: The popup is displayed correctly -- Forward-Port-Of: odoo/odoo#43741
Original PR description
When there are no items in the cart, pressing the print bill button may result in an error due to the translation (_t) module not being imported Description of the issue/feature this PR addresses: Bug fix for print bill button on empty cart Current behavior before PR: May result in an error being thrown Desired behavior after PR is merged: The popup is displayed correctly -- Forward-Port-Of: odoo/odoo#43741
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43713
Original PR description
Two of the UserErrors mentioned 'quantites' instead of 'quantities' before this commit. This commit fixes the terms and the translation file. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43713
**[FIX] account: Fix rounding issue on price_unit with price included tax** Suppose a price_unit of 2300 with a 5.5% price-included tax applied on it. The computed balance will be computed as follow: 2300.0 / 1.055 = 2180.0948 ~ 2180.09. Since accounting / business fields are synchronized, the inverse computation will try to recompute the price_unit based on the balance: 2180.09 * 1.055 = 2299.99495 ~ 2299.99. --issue: 2168073 **[FIX] sale: Fix account.move (invoices) access rights
Original PR description
**[FIX] account: Fix rounding issue on price_unit with price included tax** Suppose a price_unit of 2300 with a 5.5% price-included tax applied on it. The computed balance will be computed as follow: 2300.0 / 1.055 = 2180.0948 ~ 2180.09. Since accounting / business fields are synchronized, the inverse computation will try to recompute the price_unit based on the balance: 2180.09 * 1.055 = 2299.99495 ~ 2299.99. --issue: 2168073 **[FIX] sale: Fix account.move (invoices) access rights** Without any access rights on the 'account' module, a salesperson should be able to create a new invoice from a sale order. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43636
Before when we tried to print the sale report ticket from the front end, there was a traceback. Now use the correct values to prevent the traceback. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44009
Original PR description
Before when we tried to print the sale report ticket from the front end, there was a traceback. Now use the correct values to prevent the traceback. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#44009
opw-2172459 opw-2176591 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#44022
Original PR description
opw-2172459 opw-2176591 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#44022
PostgresSQL TRIM function does not trim line return and other space characters that are not white space. For references having a non trimmed character regexp_split_to_array would create an array with an empty element. Such element could be matched to a counterpart with no numerics in the reference. TRIM(' \n001') => '\n001' regexp_split_to_array('\n001') => {"", "001"} By replacing the TRIM function by a substring using a regexp we also remove the other space characters such as tab
Original PR description
PostgresSQL TRIM function does not trim line return and other space characters that are not white space. For references having a non trimmed character regexp_split_to_array would create an array with…
PostgresSQL TRIM function does not trim line return and other space characters
that are not white space.
For references having a non trimmed character regexp_split_to_array would create an array
with an empty element. Such element could be matched to a counterpart with no numerics in
the reference.
TRIM(' \n001') => '\n001'
regexp_split_to_array('\n001') => {"", "001"}
By replacing the TRIM function by a substring using a regexp we
also remove the other space characters such as tab and line return.
**Description of the issue/feature this PR addresses:**
When clicking on the Reconcile button of a journal if your bank statement lines references have new lines in them or other non whitespace spacing characters (`\n`, `\t`, ...) you will end up with a matching with way to many entries. It will matches with all account.move with `/` in name.
**Current behavior before PR:**
Reference are split after being wrongly trimmed. Which leads to a list of reference that can contain empty string.
**Desired behavior after PR is merged:**
References are trimmed and doesn't try to match with other entries on an empty string.
-----
How to test it in postgres:
Query:
```
SELECT
regexp_split_to_array(TRIM(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_ref_array,
regexp_split_to_array(substring(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_ref_array,
regexp_split_to_array(TRIM(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_move_array,
regexp_split_to_array(substring(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_move_array,
regexp_split_to_array(TRIM(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g')),'\s+')
&& regexp_split_to_array(TRIM(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g')), '\s+')
AS before_matching_rule,
regexp_split_to_array(substring(REGEXP_REPLACE(move_ref, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
&& regexp_split_to_array(substring(REGEXP_REPLACE(st_line_name, '[^0-9|^\s]', '', 'g'), '\S(?:.*\S)*'), '\s+')
AS after_matching_rule
FROM (SELECT '/'::text AS move_ref, 'PAIEMENT PAR CARTE
MSFT *<E999999XYZ> 11/11'::text AS st_line_name) AS example;
```
Note:
This is one example (used in query upper) that we get in some bank statement lines:
```
PAIEMENT PAR CARTE
MSFT *<E999999XYZ> 11/11
```
Result:
```
before_ref_array | after_ref_array | before_move_array | after_move_array | before_matching_rule | after_matching_rule
------------------+-----------------+-------------------+------------------+----------------------+---------------------
{""} | | {"",999999,1111} | {999999,1111} | t |
```
Note that the substring will also return nothing to split when there is not at least one numeric char in this context. While it returns null instead of False it's equivalent.
**Recomended reading about trimming `:space:` class characters in postgreSQL:**
https://stackoverflow.com/questions/22699535/trim-trailing-spaces-with-postgresql/22701212#22701212
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#43604
Forward-Port-Of: odoo/odoo#43425Propagate the analytic tags from the subscription to the invoice. opw-2179633 Forward-Port-Of: odoo/enterprise#7976
Original PR description
Propagate the analytic tags from the subscription to the invoice. opw-2179633 Forward-Port-Of: odoo/enterprise#7976
Fix-multi closed contract without end date Fix time zone issue, now, to generate work entries, we use the tz on the calendar on contract. taskID: 2180263 Forward-Port-Of: odoo/enterprise#7961 Forward-Port-Of: odoo/enterprise#7924
Original PR description
Fix-multi closed contract without end date Fix time zone issue, now, to generate work entries, we use the tz on the calendar on contract. taskID: 2180263 Forward-Port-Of: odoo/enterprise#7961 Forward-Port-Of: odoo/enterprise#7924
When you are trying to perform an international shipping with fedex, you are blocked if you don't have the settings rights, because the code tries to read a system parameter. To avoid this error, we are reading it with as super user. Forward-Port-Of: odoo/enterprise#7977 Forward-Port-Of: odoo/enterprise#7968
Original PR description
When you are trying to perform an international shipping with fedex, you are blocked if you don't have the settings rights, because the code tries to read a system parameter. To avoid this error, we are reading it with as super user. Forward-Port-Of: odoo/enterprise#7977 Forward-Port-Of: odoo/enterprise#7968
…t' product because data was moved to industry_fsm_sale from industry_fsm by commit https://github.com/odoo/enterprise/commit/51bd521a2f95884d8c866a6d323364d6551db9ca#diff-7c6705ac245d17923659b22570af96dc, but data referance did not changed in python file, so 'timesheet product' comes blank due to product unfound. task-2177269 Forward-Port-Of: odoo/enterprise#7857
Original PR description
…t' product because data was moved to industry_fsm_sale from industry_fsm by commit https://github.com/odoo/enterprise/commit/51bd521a2f95884d8c866a6d323364d6551db9ca#diff-7c6705ac245d17923659b22570af96dc, but data referance did not changed in python file, so 'timesheet product' comes blank due to product unfound. task-2177269 Forward-Port-Of: odoo/enterprise#7857
Suppose two invoices of 1000.0 respectively in 2017 & 2018. - Open the Trial Balance in 2018: An initial balance of 1000.0 is reported in the current year earnings account corresponding to the invoice in 2017. - Set a comparison with the previous period. The current year earnings account is reported with 0.0 amount everywhere. Explanation: As the unaffected earnings was computed for each period but reported only for the oldest one, the current year earnings account was involved by
Original PR description
Suppose two invoices of 1000.0 respectively in 2017 & 2018. - Open the Trial Balance in 2018: An initial balance of 1000.0 is reported in the current year earnings account corresponding to the invoice in 2017. - Set a comparison with the previous period. The current year earnings account is reported with 0.0 amount everywhere. Explanation: As the unaffected earnings was computed for each period but reported only for the oldest one, the current year earnings account was involved by 2018 but only the initial balance of 2017 (0.0) was reported. This fix will only computed the unaffected earnings for the oldest period and then, will display the current year earnings account only according this one. Forward-Port-Of: odoo/enterprise#7943
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is the use of a computed One2many field: `bom_change_ids`. The compute methods retrieves the differences between the old and the new BOM, and adds it to the list. However, it's impossible to make sure the compute method will be called only once in a transaction. And this is what causes the is
Original PR description
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is…
- Create a BOM for product A - Create an ECO for the created BOM - Start New Revision - Add a product to the BOM 2 operations 'Add' are recorded on the ECO instead of one. The core of the issue is the use of a computed One2many field: `bom_change_ids`. The compute methods retrieves the differences between the old and the new BOM, and adds it to the list. However, it's impossible to make sure the compute method will be called only once in a transaction. And this is what causes the issue: the compute method is called twice, so the changes are recorded twice. Taking a step back, recording all changes in the BOM is usually not significant. Let's consider the following BOM modifications: - Add a product - Modify the product quantity - Remove the product If the user saves after each step, 3 BOM Changes are recorded. If the user saves only at the end, no change is recorded. Recording all modifications will likely bloat the differences between the two BOMs. Therefore, we clear all computed fields which use the same logic in order to record only the global differences. opw-2178950 Forward-Port-Of: odoo/enterprise#7931