Tuesday, May 4, 2021
17 changes · master
Enhancements to existing features
Work orders now show whether they are ready or waiting based on component availability, making production priorities easier to understand. Ready and waiting statuses are visually distinguished, while users can still proceed with work orders when needed.
Original PR description
- The work order state changes based on the availability of the components - So if all BOM components are ``available`` the state of the first WO is set to ``ready`` - The color of ``ready`` in the WO tree editable view will stay blue as long as ``done`` reserves the green color - If one or multiple components are not available, the state of the first WO is set to ``waiting`` - The color of ``waiting`` in the WO tree editable view is set to orange - By default ``To launch`` takes ``workorder_ready_count`` so it counts only ``ready`` WOs - The user can always process the WO without restrictions even if the WO state is ``waiting`` Task ID: 2426773
Resolved issues and error corrections
Changing a product's costing method no longer posts neutral valuation adjustments to the expense account when there are no stock valuation layers. The adjustment now uses the stock input account, keeping the accounting impact balanced and preventing misleading expense entries.
Original PR description
Previously when changing cost method, we always add debit to Expense account when empty svl. This results in an unneutral change for process that should be neutral. In this commit, we change to use stock input account to make it neutral. Task 2481563 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Features or functions removed from Odoo
The developer documentation has been removed from the main Odoo code repository because it is now maintained together with user documentation in a dedicated documentation repository. This keeps the main product repository more focused and removes a related internal test module that only checked documentation examples.
Original PR description
In odoo/documentation-user#945, the developer documentation is merged with the user documentation in a single repository and build config. This commit then removes source files for the developer documentation from the odoo/odoo repository. DOC PR: odoo/documentation-user#945 In order to not miss a newly merged doc commit during the forward-port, this PR will only targets master.
Miscellaneous changes
The key that should be used to check the signature of incoming (Ogone to Odoo) communication should be `ogone_shakey_out`. For an outgoing communication, the signature should be generated with `ogone_shakey_in`. This commit swaps the IN key with the OUT key in signature calculations to use the appropriate key for a given communication. The opportunity is also taken to go back to using SHA1 for signature computation rather than SHA256 that was introduced with 61a02a73 in order to ease
Original PR description
The key that should be used to check the signature of incoming (Ogone to Odoo) communication should be `ogone_shakey_out`. For an outgoing communication, the signature should be generated with `ogone_shakey_in`. This commit swaps the IN key with the OUT key in signature calculations to use the appropriate key for a given communication. The opportunity is also taken to go back to using SHA1 for signature computation rather than SHA256 that was introduced with 61a02a73 in order to ease the migration of existing users. Keeping SHA256 would have required users to make the switch on Ogone's backend. task-2494916 Forward-Port-Of: odoo/odoo#70266
Belgian payroll contracts without an assigned employee will no longer trigger salary scale validation. This prevents unnecessary warnings or blockers when draft or incomplete contracts are being prepared.
Original PR description
Purpose ======= No need to check if the salary is high enough if no employee is set on the contract.
When the same sequence is used in different journals (i.e. BNK1 in two different companies), a clash might happen in the grouping optimization of the `_compute_name` -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70132 Forward-Port-Of: odoo/odoo#70085
Original PR description
When the same sequence is used in different journals (i.e. BNK1 in two different companies), a clash might happen in the grouping optimization of the `_compute_name` -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70132 Forward-Port-Of: odoo/odoo#70085
Before this commit, when quants where automatically unlinked, all empty quants were took. Now, quants with a defined `user_id` will not be unlinked because they can legitimately be to 0 and we should wait inventory was processed before empty quants were unlinked (as once the inventory is processed, the `user_id` on quant is removed). Forward-Port-Of: odoo/odoo#70259
Original PR description
Before this commit, when quants where automatically unlinked, all empty quants were took. Now, quants with a defined `user_id` will not be unlinked because they can legitimately be to 0 and we should wait inventory was processed before empty quants were unlinked (as once the inventory is processed, the `user_id` on quant is removed). Forward-Port-Of: odoo/odoo#70259
- Create an invoice with an empty fiscal position - Create a line with a product having 100.0 as sale price and 21.0% price-included tax => price_unit equals 99.99 This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0. The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/od
Original PR description
- Create an invoice with an empty fiscal position - Create a line with a product having 100.0 as sale price and 21.0% price-included tax => price_unit equals 99.99 This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0. The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#69836 Forward-Port-Of: odoo/odoo#69522
In eg. 13.0 when refreshing sales analysis action of a product, we would get an error because we have a single active_ids which is not expected by the code. With this commit, we use .toString() on the jQuery BBQ parsed active_ids as it was done before 32b8cec refactoring (january 2018). The added test with the fix fails with an error: TypeError: state.active_ids.split is not a function at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js) opw-2471982 Fo
Original PR description
In eg. 13.0 when refreshing sales analysis action of a product, we would get an error because we have a single active_ids which is not expected by the code. With this commit, we use .toString() on the jQuery BBQ parsed active_ids as it was done before 32b8cec refactoring (january 2018). The added test with the fix fails with an error: TypeError: state.active_ids.split is not a function at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js) opw-2471982 Forward-Port-Of: odoo/odoo#70226 Forward-Port-Of: odoo/odoo#68943
Updating a completed survey will raise an error with a traceback. To reproduce the error: (Use demo data) 1. Survey > Participations 2. Select a completed form 3. Change one answer, Save Error: A traceback appears "[...] ValueError: Computing score requires a question in arguments." Here is an extract from the method concerned: ```python @api.model def _get_answer_score_values(self, vals, compute_speed_score=True): """ [...] """ user_input_id = vals.get('
Original PR description
Updating a completed survey will raise an error with a traceback.
To reproduce the error:
(Use demo data)
1. Survey > Participations
2. Select a completed form
3. Change one answer, Save
Error: A traceback appears "[...] ValueError: Computing score requires a
question in arguments."
Here is an extract from the method concerned:
```python
@api.model
def _get_answer_score_values(self, vals, compute_speed_score=True):
"""
[...]
"""
user_input_id = vals.get('user_input_id')
answer_type = vals.get('answer_type')
question_id = vals.get('question_id')
if not question_id:
raise ValueError(_('Computing score requires a question in
arguments.'))
```
This method needs some information to work properly.
OPW-2488974
Forward-Port-Of: odoo/odoo#69842What are the steps to reproduce your issue ? 1. Create a record and add two attachments 2. Navigate quickly between these attachments You can use the original ticket to try, I added two images in the chatter https://www.odoo.com/web#id=2521901&action=3531&model=project.task&view_type=form&cids=1&menu_id=4720 What is currently happening ? Traceback TypeError: Cannot read property 'complete' of undefined at AttachmentViewer._handleImageLoad (https://www.o
Original PR description
What are the steps to reproduce your issue ?
1. Create a record and add two attachments
2. Navigate quickly between these attachments
You can use the original ticket to try, I added two images in the chatter
https://www.odoo.com/web#id=2521901&action=3531&model=project.task&view_type=form&cids=1&menu_id=4720
What is currently happening ?
Traceback
TypeError: Cannot read property 'complete' of undefined
at AttachmentViewer._handleImageLoad (https://www.odoo.com/mail/static/src/components/attachment_viewer/attachment_viewer.js:163:20)
opw-2521901
Forward-Port-Of: odoo/odoo#70309When importing data via a file with only one company selected, if there is no mapped account for a consolidation account in the file the system will empty the mapped account for all the companies and not just the one selected. Now the import does not take actions when empty mapped accounts. opw-2449108 Forward-Port-Of: odoo/enterprise#18039
Original PR description
When importing data via a file with only one company selected, if there is no mapped account for a consolidation account in the file the system will empty the mapped account for all the companies and not just the one selected. Now the import does not take actions when empty mapped accounts. opw-2449108 Forward-Port-Of: odoo/enterprise#18039
The computation of the monthly recurring revenue does not consider the difference between an invoice and a refund. To reproduce the error: 1. Create a SO with a monthly subscription 2. Confirm 3. Create Invoice, Post it 4. Add Credit Note, Post it 5. Subscriptions > Reporting > Revenue KPIs - Include current date in dates interval Error: The value of MRR is $400. The module summed up the invoice and the credit note without considering that the sign of the note should be negati
Original PR description
The computation of the monthly recurring revenue does not consider the
difference between an invoice and a refund.
To reproduce the error:
1. Create a SO with a monthly subscription
2. Confirm
3. Create Invoice, Post it
4. Add Credit Note, Post it
5. Subscriptions > Reporting > Revenue KPIs
- Include current date in dates interval
Error: The value of MRR is $400. The module summed up the invoice and
the credit note without considering that the sign of the note should be
negative.
OPW-2487560
Forward-Port-Of: odoo/enterprise#18111
Forward-Port-Of: odoo/enterprise#17937Duplicates and errors in the Luxemburgish Balance Sheet with cash at bank and in hand. Forward-Port-Of: odoo/enterprise#18078 Forward-Port-Of: odoo/enterprise#18066
Original PR description
Duplicates and errors in the Luxemburgish Balance Sheet with cash at bank and in hand. Forward-Port-Of: odoo/enterprise#18078 Forward-Port-Of: odoo/enterprise#18066
Any concurrent access error during the creation of a SO in amazon's app will prevent the SO to create. As the last_sync_date will still update, this order won't be sync except if you backtrack the date manually. By raising an exception of the `PG_CONCURRENCY_ERRORS_TO_RETRY` kind, we let the default Odoo's behavior happen, which is: - If it is in an action (button "Sync order" in Amazon's setting, manually run the schedule action), it will retry the request. The entire request cursor is r
Original PR description
Any concurrent access error during the creation of a SO in amazon's app will prevent the SO to create. As the last_sync_date will still update, this order won't be sync except if you backtrack the…
Any concurrent access error during the creation of a SO in amazon's app will prevent the SO to create. As the last_sync_date will still update, this order won't be sync except if you backtrack the date manually. By raising an exception of the `PG_CONCURRENCY_ERRORS_TO_RETRY` kind, we let the default Odoo's behavior happen, which is: - If it is in an action (button "Sync order" in Amazon's setting, manually run the schedule action), it will retry the request. The entire request cursor is rollback then re-run after some delay. - It it is the scheduled action, it will raise the error (with a traceback) and rollback the current cursor Technical note: When the cursor do a rollback, it does discard what wasn't committed yet. As Amazon's module does commit the cursor frequently, it shouldn't have a big impact on Amazon's API calls. On the ticket [2488349](https://www.odoo.com/web?#id=2488349&action=3531&model=project.task&view_type=form&cids=1&menu_id=4720), the concurrent access happened because the "Inter-Company Transactions" was enabled. As such, PO were created/edited while the SO cursor was closing. If anything during this process edit the PO line a concurrency will happen. This was the case as a (custom) Scheduled action was editing PO lines. As they are on odoo.sh, sometime this scheduled action ran alongside the amazon's one. OPW-2488349 Forward-Port-Of: odoo/enterprise#17918
…und and fix the amounts of the expected DTES Forward-Port-Of: odoo/enterprise#17978
Original PR description
…und and fix the amounts of the expected DTES Forward-Port-Of: odoo/enterprise#17978
Task: <a href="https://www.odoo.com/web#action=4043&cids=2&id=2391988&menu_id=4720&model=project.task&view_type=form">2391988</a> Related: odoo/odoo#62711 Forward-Port-Of: odoo/enterprise#17706 Forward-Port-Of: odoo/enterprise#15079
Original PR description
Task: <a href="https://www.odoo.com/web#action=4043&cids=2&id=2391988&menu_id=4720&model=project.task&view_type=form">2391988</a> Related: odoo/odoo#62711 Forward-Port-Of: odoo/enterprise#17706 Forward-Port-Of: odoo/enterprise#15079