Search
Navigate
Branch
Sunday, October 6, 2024
7 changes
2 changes
Miscellaneous changes
Steps to reproduce ================== 1) Create a Bill of Materials 2) Select a product 3) Add an operation 4) Save 5) Click on the Show Instructions button 6) Create three instructions [A, B, C] 7) Go back to the instructions list 8) The order is [A, B, C] 9) Swap the last two instructions (move the third one before the second one) 10) The order should now be [A, C, B] 11) Create a new instruction D 12) Go back to the instructions list 13) The order should be [A, C, B, D] 14) M
Original PR description
Steps to reproduce ================== 1) Create a Bill of Materials 2) Select a product 3) Add an operation 4) Save 5) Click on the Show Instructions button 6) Create three instructions [A, B, C] 7)…
Steps to reproduce ================== 1) Create a Bill of Materials 2) Select a product 3) Add an operation 4) Save 5) Click on the Show Instructions button 6) Create three instructions [A, B, C] 7) Go back to the instructions list 8) The order is [A, B, C] 9) Swap the last two instructions (move the third one before the second one) 10) The order should now be [A, C, B] 11) Create a new instruction D 12) Go back to the instructions list 13) The order should be [A, C, B, D] 14) Move the fourth one one slot up 15) The order should be [A, C, D, B] 16) Go back to the BOM 17) Click again on the Show Instructions button 18) The order has now changed and is [A, D, C, B] Cause of the issue ================== The quality.point model has no default value for the sequence field. Instructions are created from a form view -> There is no context as to which sequence we should choose the be the last one. We pass no value for the sequence field when creating a record -> NULL is what's actually saved in the database. When the webclient reads the records, it receives 0 instead of NULL for the sequence value. Here are the ordered values by sequence at step 8: ``` +------+----------+ | name | sequence | |------+----------| | A | <null> | | B | <null> | | C | <null> | +------+----------+ ``` Step 9: The webclient reorders [A, C, B] with no offset Step 10: ``` +------+----------+ | name | sequence | |------+----------| | A | 0 | | C | 1 | | B | 2 | +------+----------+ ``` Step 13: ``` +------+----------+ | name | sequence | |------+----------| | A | 0 | | C | 1 | | B | 2 | | D | <null> | +------+----------+ ``` Step 14: The webclient reorders [D, B] with no offset Step 15: ``` +------+----------+ | name | sequence | |------+----------| | A | 0 | | D | 0 | | B | 1 | | C | 1 | +------+----------+ ``` Currently these are the cases where we reorder every record: - If the sections outside the edited range are not sorted - If we are inside the modified range and adjacent records have the same sequence Since the webclient has no idea if a value is null or not, we don't reorder every record in step 14 Solution ======== Since there is no easy way to guess if a record has a NULL value, we reorder every record if the initial list is not strictly ordered. Limitations =========== This doesn't properly handle cases were there are multiple pages, or if there is a domain applied. This is already the case without NULLs. Alternate solutions =================== Return the record from the server ordered as if NULL was equal to 0 ------------------------------------------------------------------- A lot of usecases actually depends on this behaviour and we can't change that. Set a default on the field -------------------------- We can't choose a default value that would always result in new records being the latest one. With Int.MAX, we can't resequence as this simply increments the existing sequence. This doesn't handle existing records having a NULL value. A new field type fields.Sequence() ---------------------------------- This can't be done in stable and we would need to migrate existing data opw-4032273 Forward-Port-Of: odoo/odoo#181380
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good. The traceback: 2024-04-29 11:43:01,356 29 ERROR odoo odoo.addons.base.models.ir_cron: Call from cron EDI : Perform web services operations for server action #282 failed in Job #15 Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 383, in safe_eval return unsafe_eval(c, globals_dict, lo
Original PR description
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good. The traceback: 2024-04-29 11:43:01,356 29 ERROR odoo…
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good.
The traceback:
2024-04-29 11:43:01,356 29 ERROR odoo odoo.addons.base.models.ir_cron: Call from cron EDI : Perform web services operations for server action #282 failed in Job #15
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 383, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(282,)", line 1, in <module>
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 276, in _cron_process_documents_web_services
nb_remaining_jobs = edi_documents._process_documents_web_services(job_count=job_count)
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 263, in _process_documents_web_services
self._process_job(job)
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 217, in _process_job
edi_result = method_to_call(moves)
File "/opt/odoo/auto/addons/l10n_es_edi_sii/models/account_edi_format.py", line 660, in _l10n_es_edi_sii_post_invoices
info_list = self._l10n_es_edi_get_invoices_info(invoices)
File "/opt/odoo/auto/addons/l10n_es_edi_sii/models/account_edi_format.py", line 291, in _l10n_es_edi_get_invoices_info
info['IDFactura']['NumSerieFacturaEmisor'] = invoice.ref[:60]
TypeError: 'bool' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_cron.py", line 391, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions.py", line 674, in run
res = runner(run_self, eval_context=eval_context)
File "/opt/odoo/auto/addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions.py", line 544, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 397, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'TypeError'>: "'bool' object is not subscriptable" while evaluating
'model._cron_process_documents_web_services(job_count=20)'
@moduon MT-5819
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#1637922 changes
Miscellaneous changes
Steps to reproduce ================== - Go to contacts - Open any record - Open studio - Click on the "More" button at the top right next to other buttons - A dropdown is displayed containing more buttons - Try clicking on one of them => Nothing happens Cause of the issue ================== The dropdown is outside `this.viewRenderer.el`. Clicks on it are ignored. This also causes studio specific styling to not be applied. Solution ======== The ButtonBox component from
Original PR description
Steps to reproduce ================== - Go to contacts - Open any record - Open studio - Click on the "More" button at the top right next to other buttons - A dropdown is displayed containing more buttons - Try clicking on one of them => Nothing happens Cause of the issue ================== The dropdown is outside `this.viewRenderer.el`. Clicks on it are ignored. This also causes studio specific styling to not be applied. Solution ======== The ButtonBox component from web displays maximum number of buttons outside the dropdown. Then remaining buttons are displayed inside the dropdown. We can copy this approach, but instead of rendering extra buttons inside the dropdown, we can show them on the following line. opw-4164661 Forward-Port-Of: odoo/enterprise#70504
2 changes
Miscellaneous changes
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good. The traceback: 2024-04-29 11:43:01,356 29 ERROR odoo odoo.addons.base.models.ir_cron: Call from cron EDI : Perform web services operations for server action #282 failed in Job #15 Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 383, in safe_eval return unsafe_eval(c, globals_dict, lo
Original PR description
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good. The traceback: 2024-04-29 11:43:01,356 29 ERROR odoo…
1 change
Resolved issues and error corrections
This update fixes the account reports module to properly support custom implementations that extend its functionality. By returning the parent method result, the system now allows third-party modules to add features like wizards and other custom behaviors without breaking the core functionality. This enables better integration with community extensions.
Original PR description
…n return wizards etc. Example implementation account_financial_risk from OCA
When 'Show reserved lots/SN' is unticked on the operation type, we don't want to show the lot/serial name when there's only a single line and it's not picked/scanned yet. Forward-Port-Of: odoo/enterprise#71257 Forward-Port-Of: odoo/enterprise#70917
Original PR description
When 'Show reserved lots/SN' is unticked on the operation type, we don't want to show the lot/serial name when there's only a single line and it's not picked/scanned yet. Forward-Port-Of: odoo/enterprise#71257 Forward-Port-Of: odoo/enterprise#70917
This field isn't required. However, if not supplied, Odoo fails to notify *all* invoices in a cron run, without speaking about it. Not good.
The traceback:
2024-04-29 11:43:01,356 29 ERROR odoo odoo.addons.base.models.ir_cron: Call from cron EDI : Perform web services operations for server action #282 failed in Job #15
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 383, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(282,)", line 1, in <module>
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 276, in _cron_process_documents_web_services
nb_remaining_jobs = edi_documents._process_documents_web_services(job_count=job_count)
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 263, in _process_documents_web_services
self._process_job(job)
File "/opt/odoo/auto/addons/account_edi/models/account_edi_document.py", line 217, in _process_job
edi_result = method_to_call(moves)
File "/opt/odoo/auto/addons/l10n_es_edi_sii/models/account_edi_format.py", line 660, in _l10n_es_edi_sii_post_invoices
info_list = self._l10n_es_edi_get_invoices_info(invoices)
File "/opt/odoo/auto/addons/l10n_es_edi_sii/models/account_edi_format.py", line 291, in _l10n_es_edi_get_invoices_info
info['IDFactura']['NumSerieFacturaEmisor'] = invoice.ref[:60]
TypeError: 'bool' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_cron.py", line 391, in _callback
self.env['ir.actions.server'].browse(server_action_id).run()
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions.py", line 674, in run
res = runner(run_self, eval_context=eval_context)
File "/opt/odoo/auto/addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions.py", line 544, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "/opt/odoo/custom/src/odoo/odoo/tools/safe_eval.py", line 397, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'TypeError'>: "'bool' object is not subscriptable" while evaluating
'model._cron_process_documents_web_services(job_count=20)'
@moduon MT-5819
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#163792Steps to reproduce ================== - Go to contacts - Open any record - Open studio - Click on the "More" button at the top right next to other buttons - A dropdown is displayed containing more buttons - Try clicking on one of them => Nothing happens Cause of the issue ================== The dropdown is outside `this.viewRenderer.el`. Clicks on it are ignored. This also causes studio specific styling to not be applied. Solution ======== The ButtonBox component from
Original PR description
Steps to reproduce ================== - Go to contacts - Open any record - Open studio - Click on the "More" button at the top right next to other buttons - A dropdown is displayed containing more buttons - Try clicking on one of them => Nothing happens Cause of the issue ================== The dropdown is outside `this.viewRenderer.el`. Clicks on it are ignored. This also causes studio specific styling to not be applied. Solution ======== The ButtonBox component from web displays maximum number of buttons outside the dropdown. Then remaining buttons are displayed inside the dropdown. We can copy this approach, but instead of rendering extra buttons inside the dropdown, we can show them on the following line. opw-4164661 Forward-Port-Of: odoo/enterprise#70504