Friday, September 8, 2023
17 changes
Enhancements to existing features
This update removes or simplifies older compatibility code used by several interface components, reducing maintenance complexity. It should make future updates safer and easier without changing day-to-day user workflows.
Original PR description
task 3439226 community: https://github.com/odoo/odoo/pull/134295
When users are sent to a simplified user form from the employee contract signing flow, the system now avoids carrying over unnecessary background settings. This helps make the redirected form behave more predictably and reduces confusion during contract signing setup.
Original PR description
*: hr_contract_sign task - 3334739
Resolved issues and error corrections
This update fixes the startup order for Luxembourg reporting components so required company information is available when reports load. It helps prevent errors when using Luxembourg-specific accounting reports without changing user workflows.
Original PR description
Before this commit, the model account_sales_report was imported in the init file before the res_company model while it calls the value of a field ecdf_prefix that is defined in that file. This commit reorders the file import order.
Code cleanup and technical improvements
This update adapts several Odoo Enterprise apps to use the newer shared utility framework after older utilities were removed. It helps keep features such as salary contracts, Knowledge, point of sale compliance, and YouTube social uploads working consistently with the updated platform.
Original PR description
This commit is the counterpart of odoo/odoo#134620 which removes the legacy utils. We thus adapt usecases to use the wowl utils instead. Part of task~3439226
Miscellaneous changes
Steps to reproduce: - Install Accounting - Create a vendor bill: * Bill Date; 01/01/2023 * Invoice Lines: - Label: [anything] - Account: 600000 Expenses - Analytic Distribution: [anything, but not empty] - Start Date: 01/01/2023 - End Date: 31/12/2023 - Price: 1200 - Confirm the bill The lines of the created deferred entries don't have any analytic distribution. They should have the analytic distribution of the bill that has generated them. Solution: 1) Simply propagate th
Original PR description
Steps to reproduce:
- Install Accounting
- Create a vendor bill:
* Bill Date; 01/01/2023
* Invoice Lines:
- Label: [anything]
- Account: 600000 Expenses - Analytic Distribution: [anything, but not empty] - Start Date: 01/01/2023 - End Date: 31/12/2023 - Price: 1200
- Confirm the bill The lines of the created deferred entries don't have any analytic distribution. They should have the analytic distribution of the bill that has generated them.
Solution:
1) Simply propagate the analytic distribution from the account move line to its deferred lines if they are generated on invoice/bill validation.
2) Compute the proportion of each analytic distribution depending on all the amounts and accounts of the deferred expenses/revenues when the deferred lines are grouped and generated manually from "Deferred Expense/Revenue" report.
opw-3470215
Forward-Port-Of: odoo/enterprise#46233Forward-Port-Of: odoo/enterprise#46869
Original PR description
Forward-Port-Of: odoo/enterprise#46869
Forward-Port-Of: odoo/enterprise#46922 Forward-Port-Of: odoo/enterprise#46574
Original PR description
Forward-Port-Of: odoo/enterprise#46922 Forward-Port-Of: odoo/enterprise#46574
Currently, error occurs when users try to add the first field in empty group by column. Step to produce: - Create an app with studio - Switch to the search editor - Drag a field to the empty group by column Exception in sentry ``` TypeError: Argument must be bytes or unicode, got 'bool' File "odoo/http.py", line 2134, in __call__ response = request._serve_db() File "odoo/http.py", line 1710, in _serve_db return service_model.retrying(self._serve_ir_http, self.env)
Original PR description
Currently, error occurs when users try to add the first field in empty group by column. Step to produce: - Create an app with studio - Switch to the search editor - Drag a field to the empty group by…
Currently, error occurs when users try to add the first field in empty group by column.
Step to produce:
- Create an app with studio
- Switch to the search editor
- Drag a field to the empty group by column
Exception in sentry
```
TypeError: Argument must be bytes or unicode, got 'bool'
File "odoo/http.py", line 2134, in __call__
response = request._serve_db()
File "odoo/http.py", line 1710, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1737, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1938, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "home/odoo/src/enterprise/saas-16.4/web_studio/controllers/main.py", line 648, in edit_view
getattr(self, '_operation_%s' % (op['type']))(arch, op, model)
File "home/odoo/src/enterprise/saas-16.4/web_studio/controllers/main.py", line 878, in _operation_add
xml_node = etree.Element(node['tag'], node.get('attrs'))
File "src/lxml/etree.pyx", line 3040, in lxml.etree.Element
File "src/lxml/apihelpers.pxi", line 131, in lxml.etree._makeElement
File "src/lxml/apihelpers.pxi", line 119, in lxml.etree._makeElement
File "src/lxml/apihelpers.pxi", line 323, in lxml.etree._initNodeAttributes
File "src/lxml/apihelpers.pxi", line 334, in lxml.etree._addAttributeToNode
File "src/lxml/apihelpers.pxi", line 1538, in lxml.etree._utf8
```
This is because we received `'create_group: True'` at `"node.get('attrs')"` at [Line](https://github.com/odoo/enterprise/blob/204a90955b016ea347336214f03d2b6afee38025/web_studio/controllers/main.py#L835).
Before the owl refactor, [Line](https://github.com/odoo/enterprise/blob/204a90955b016ea347336214f03d2b6afee38025/web_studio/controllers/main.py#L581 ) removes (pop) `'create_group: True'` from the node attrs
because the condition (op['target']['tag'] == 'group') is satisfied at [Line](https://github.com/odoo/enterprise/blob/204a90955b016ea347336214f03d2b6afee38025/web_studio/controllers/main.py#L580 ), [Line](https://github.com/odoo/enterprise/blob/596145d19c968791580ac3131ea9b9a26de3cba8/web_studio/static/src/legacy/js/views/view_editors/search_editor.js#L125) adds the node tag 'group' in the target path.
This commit solves this issue by removing the `op['target']['tag'] == 'group'` condition from
[Line](https://github.com/odoo/enterprise/blob/596145d19c968791580ac3131ea9b9a26de3cba8/web_studio/static/src/legacy/js/views/view_editors/search_editor.js#L125) because we always execute [Line](https://github.com/odoo/enterprise/blob/204a90955b016ea347336214f03d2b6afee38025/web_studio/controllers/main.py#L581 ) when 'create_group' is available in the node attribute.
sentry-4244801243
Forward-Port-Of: odoo/enterprise#47078
Forward-Port-Of: odoo/enterprise#46210Increase the number of max characters of ellipsis. Going from 32 to 50 characters. Forward-Port-Of: odoo/enterprise#46974
Original PR description
Increase the number of max characters of ellipsis. Going from 32 to 50 characters. Forward-Port-Of: odoo/enterprise#46974
Change the vertical align of header columns to middle. Forward-Port-Of: odoo/enterprise#46680
Original PR description
Change the vertical align of header columns to middle. Forward-Port-Of: odoo/enterprise#46680
'btn_more' on the check register was missing the 'btn' class Forward-Port-Of: odoo/enterprise#46645
Original PR description
'btn_more' on the check register was missing the 'btn' class Forward-Port-Of: odoo/enterprise#46645
Forward-Port-Of: odoo/enterprise#43650 Forward-Port-Of: odoo/enterprise#43564
Original PR description
Forward-Port-Of: odoo/enterprise#43650 Forward-Port-Of: odoo/enterprise#43564
When having an asset created from a credit note, the acquisition date and the depreciation moves should reflect the asset created from the reversed move. Steps: - Have an account that create an asset/deferred revenue - Create an invoice with the account set on the invoice line - Confirm and make a credit note -> A deferred revenue is created from the credit note, but the acquisition date is set to the credit note date, therefore the depreciation moves have a wrong date too.
Original PR description
When having an asset created from a credit note, the acquisition date and the depreciation moves should reflect the asset created from the reversed move. Steps: - Have an account that create an asset/deferred revenue - Create an invoice with the account set on the invoice line - Confirm and make a credit note -> A deferred revenue is created from the credit note, but the acquisition date is set to the credit note date, therefore the depreciation moves have a wrong date too. With this commit, we set the acquisition date regarding the original move, we also remove the use of `_delete_reversed_entry_assets` to avoid deleting the asset from the invoice when it's in draft. opw-3382294 Forward-Port-Of: odoo/enterprise#47098 Forward-Port-Of: odoo/enterprise#46243
When generating CFDI, the company to consider in the hierarchy is the one having a certificate to validate the document. task: 3483509 Forward-Port-Of: odoo/enterprise#46793
Original PR description
When generating CFDI, the company to consider in the hierarchy is the one having a certificate to validate the document. task: 3483509 Forward-Port-Of: odoo/enterprise#46793
It can be that the name field on the account_move_line is an empty string (as opposed to NULL). This can happen, for instance, when generating the payment term line for Switzerland without the appropriate fields on the company. Since there are instances when the payment term's name is an empty string, we can retrieve these lines and automatically match them with payments from the bank reconciliation model. This can happen automatically, with exact matches between a payment with a near-empty
Original PR description
It can be that the name field on the account_move_line is an empty string (as opposed to NULL). This can happen, for instance, when generating the payment term line for Switzerland without the…
It can be that the name field on the account_move_line is an empty string (as opposed to NULL). This can happen, for instance, when generating the payment term line for Switzerland without the appropriate fields on the company. Since there are instances when the payment term's name is an empty string, we can retrieve these lines and automatically match them with payments from the bank reconciliation model. This can happen automatically, with exact matches between a payment with a near-empty reference (when the payment ref is just "/" or "?", this is sanitized and ends up as an empty string for the purposes of comparison), and these empty string payment term invoice lines. The query that fetches the candidate lines for exact matches already excludes those lines with a NULL move_line name, move ref, move name. The natural extension of this behaviour is just to exclude the empty string in these queries also. This is a continuation of another PR (https://github.com/odoo/odoo/pull/134176). This code used to be in community, and becomes enterprise code in saas-16.1. task-id: None Forward-Port-Of: odoo/enterprise#46870
To reproduce: - Modify a 'Fixed Asset' account, create asset in draft, without model - Go on the dashboard of accounting - Click on 'Vendor Bill' - Create a new bill, with the account from above. - Confirm it => The asset has the purchase journal which should never happen To solve, we just clean the context when creating the asset Forward-Port-Of: odoo/enterprise#47063
Original PR description
To reproduce: - Modify a 'Fixed Asset' account, create asset in draft, without model - Go on the dashboard of accounting - Click on 'Vendor Bill' - Create a new bill, with the account from above. - Confirm it => The asset has the purchase journal which should never happen To solve, we just clean the context when creating the asset Forward-Port-Of: odoo/enterprise#47063
In previous versions the `/my/subscription/transaction/<int:order_id>` controller set `order_sudo.amount_total` as the amount on the payment.transaction. Now the amount is being set from the invoice created by `_create_invoices()`. This ensures taxes are computed on it before it is used. opw-3490180 Forward-Port-Of: odoo/enterprise#47031 Forward-Port-Of: odoo/enterprise#46760
Original PR description
In previous versions the `/my/subscription/transaction/<int:order_id>` controller set `order_sudo.amount_total` as the amount on the payment.transaction. Now the amount is being set from the invoice created by `_create_invoices()`. This ensures taxes are computed on it before it is used. opw-3490180 Forward-Port-Of: odoo/enterprise#47031 Forward-Port-Of: odoo/enterprise#46760