Thursday, September 19, 2024
17 changes · saas-17.2
Resolved issues and error corrections
The employee appraisal screen now handles archived appraisals without showing an error. This prevents users from hitting a traceback when opening the Ongoing Appraisal button after an appraisal has been archived.
Original PR description
When the Appraisal of employee is archived and a user clicks on the Ongoing Appraisal button, a traceback will appear. Steps to reproduce the error: - Install ```hr_appraisal``` module - Create new…
When the Appraisal of employee is archived and a user clicks on
the Ongoing Appraisal button, a traceback will appear.
Steps to reproduce the error:
- Install ```hr_appraisal``` module
- Create new employee > Click Request Appraisal > Save Appraisal >
Archive that Appraisal
- Go back to employee > Click on ```Ongoing Appraisal``` button
Traceback:
```
Traceback (most recent call last):
File "/home/odoo/odoo/community/odoo/http.py", line 2267, in __call__
response = request._serve_db()
File "/home/odoo/odoo/community/odoo/http.py", line 1842, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "/home/odoo/odoo/community/odoo/http.py", line 1862, in _transactioning
return service_model.retrying(func, env=self.env)
File "/home/odoo/odoo/community/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/odoo/community/odoo/http.py", line 1840, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "/home/odoo/odoo/community/odoo/http.py", line 1847, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/odoo/community/odoo/http.py", line 2072, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/odoo/community/odoo/addons/base/models/ir_http.py", line 220, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/odoo/community/odoo/http.py", line 774, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/odoo/community/addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/odoo/community/addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/odoo/community/odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/home/odoo/odoo/enterprise/hr_appraisal/models/hr_employee_base.py", line 39, in action_open_last_appraisal
if len(relevant_appraisals) == 1:
UnboundLocalError: local variable 'relevant_appraisals' referenced before assignment
```
https://github.com/odoo/enterprise/blob/a9a3ece5c8ae5fa0b2fa117acb5dbedc69689478/hr_appraisal/models/hr_employee_base.py#L30-L37
When appraisal is archived, ```employee_appraisals``` will be empty,
So, eventually ```relevant_appraisals``` will be Empty.
So, it will lead to the above traceback.
sentry-5830582533This fixes an issue where loading Argentine localization demo data after database setup could fail because some sample products received duplicate default taxes. The affected demo products are now tied to the correct company, preventing errors when sample invoices or accounting entries are created.
Original PR description
### Steps to reproduce: - Create a db with `l10n_ar` but without demo data - In dev move at the bottom of the settings page: Load Demo data #### > UserError > load aborted. ### Cause of the issue:…
### Steps to reproduce: - Create a db with `l10n_ar` but without demo data - In dev move at the bottom of the settings page: Load Demo data #### > UserError > load aborted. ### Cause of the issue: Since commit 051d43dbef390de171307fe0e493d651c9ad7b4b (17.0), during the create of products, if the product is not associated to a given company, we add a default tax for each company that is not in the context (and hence should not have defined a tax yet): https://github.com/odoo/odoo/blob/b32fc0f715e41f6795972f2f8a2c3e4826357aa1/addons/account/models/product.py#L138-L146 However, if you were to create a DB without demo data and if you were loading the demo data from the UI, you will create demo datas product for companies that had already set a tax for that product (e.g. `company_ri` on the product `product_product_telefonia`) and since the current company is in the context the override of the create will add a second tax on these products for that companies. As such, if the product is later used in account moves it will raise a user error: https://github.com/odoo/odoo/blob/b32fc0f715e41f6795972f2f8a2c3e4826357aa1/addons/l10n_ar/models/account_move.py#L141-L144 and the installation of the all the demo datas will then be aborted. ### Fix: Since the demo data's products used in the account moves raising user errors are only expected to be used in the the company for which we have associated a tax eg: https://github.com/odoo/odoo/blob/b32fc0f715e41f6795972f2f8a2c3e4826357aa1/addons/l10n_ar/demo/account_supplier_invoice_demo.xml#L136 we simply add a company_id on these products. Note that the test datas had to be updated in somewhat a similar way in commit 051d43dbef390de171307fe0e493d651c9ad7b4b. opw-4180872 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Issue ---- When clicking an account report cell with the cash basis filter on, `account_reports_cash_basis.account_report.action_audit_cell` adds a domain to filter out `account.move.line`s that don't belong to the cash basis criteria. However, the model is not always an `account.move.line`. If an analytic account column is added with the "Analytic Group By" option, the model is `account.analytic.line`, which results in a field not found error. Steps ---- - Go to Accounting -> Report
Original PR description
Issue ---- When clicking an account report cell with the cash basis filter on, `account_reports_cash_basis.account_report.action_audit_cell` adds a domain to filter out `account.move.line`s that don't belong to the cash basis criteria. However, the model is not always an `account.move.line`. If an analytic account column is added with the "Analytic Group By" option, the model is `account.analytic.line`, which results in a field not found error. Steps ---- - Go to Accounting -> Reporting -> Profit and Loss. - From the Options button above, select "Cash Basis Method". - From the Analytic Group By button, add an analytic account in the "Accounts" filter. - Click on a cell under the analytic account's column. - An error is thrown. Cause ---- Domain is applied on the wrong model. opw-4034786 Forward-Port-Of: odoo/enterprise#66890
When a corporation's annual net profits exceeds a certain limit, a corporate tax has to be paid. This commit implements the calculation and accounting of this corporate tax. task: 3690934 Forward-Port-Of: odoo/enterprise#67187
Original PR description
When a corporation's annual net profits exceeds a certain limit, a corporate tax has to be paid. This commit implements the calculation and accounting of this corporate tax. task: 3690934 Forward-Port-Of: odoo/enterprise#67187
The `Accounting` dashboard was using very naive formulas to compute deltas between years. Namely, the formulas were based on the assumpution that we'd only compare values year by year but the filters allow to work with quarters or months as well. This revision updates the dashboard file to take the months/quarters into account. task-3957037 Forward-Port-Of: odoo/enterprise#69286
Original PR description
The `Accounting` dashboard was using very naive formulas to compute deltas between years. Namely, the formulas were based on the assumpution that we'd only compare values year by year but the filters allow to work with quarters or months as well. This revision updates the dashboard file to take the months/quarters into account. task-3957037 Forward-Port-Of: odoo/enterprise#69286
Steps to Reproduce the Bug: - Create two storable products, "P1" and "P2". - Create a Quality Point: - Product: P1 - Type: Manufacturing - Create a Quality Check: - Product: P2 - Select the Quality Point of P1 Problem: The product is updated to P1 instead of triggering a user error. opw-4030133 Forward-Port-Of: odoo/enterprise#69362
Original PR description
Steps to Reproduce the Bug: - Create two storable products, "P1" and "P2". - Create a Quality Point: - Product: P1 - Type: Manufacturing - Create a Quality Check: - Product: P2 - Select the Quality Point of P1 Problem: The product is updated to P1 instead of triggering a user error. opw-4030133 Forward-Port-Of: odoo/enterprise#69362
Have a button in a form view of type="action" and name="some.xml_id" Before this commit, it was not possible to set approval rules on it. This was due to code in general expecting an int, which is only part of the API for viewButtons (see `action_service.js:doActionButton`) After this commit, it is possible to set approval rules on such button. backport of odoo/enterprise#69399 opw-3925360 Forward-Port-Of: odoo/enterprise#69509
Original PR description
Have a button in a form view of type="action" and name="some.xml_id" Before this commit, it was not possible to set approval rules on it. This was due to code in general expecting an int, which is only part of the API for viewButtons (see `action_service.js:doActionButton`) After this commit, it is possible to set approval rules on such button. backport of odoo/enterprise#69399 opw-3925360 Forward-Port-Of: odoo/enterprise#69509
**Steps to reproduce:** - Install Accounting and l10n_mx_edi_extended - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Configure external trade according to: https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/mexico.html#external-trade - Make sure that USD has up-to-date rates - Create an external trade invoice: * Customer: [a US customer] (e.g. Deco Addict) * Currency: USD * Usage: Without fiscal effects * Incoterm: EX WORKS * Exter
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_mx_edi_extended - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Configure external trade according to: https://www.odoo.com/documentation/17.0/applications/finance/fiscal_localizations/mexico.html#external-trade - Make sure that USD has up-to-date rates - Create an external trade invoice: * Customer: [a US customer] (e.g. Deco Addict) * Currency: USD * Usage: Without fiscal effects * Incoterm: EX WORKS * External Trade: Definitive - Confirm the invoice - Print the invoice **Issue:** In the external trade section of the invoice, there are 2 empty cells: "Operation Type" and "Subdivision". According to https://facture.com.mx/nuevo-complemento-comercio-exterior-2-0/ they both have been removed. opw-4078535 Forward-Port-Of: odoo/enterprise#70206 Forward-Port-Of: odoo/enterprise#70178
In Factur-X, it is sometimes required to specify the SIRET (using the node `SpecifiedLegalOrganization`). The SIRET is a field appearing when l10n_fr is installed. In addition, in 17.0, it only appears if the current company has the French CoA installed. Hence, it is not possible to specify a SIRET on a French partner if the company is Belgian, for instance. To fix this, we also use the company_registry to fill the SIRET node in the xml. In master, we intend to remove the SIRET field, as w
Original PR description
In Factur-X, it is sometimes required to specify the SIRET (using the node `SpecifiedLegalOrganization`). The SIRET is a field appearing when l10n_fr is installed. In addition, in 17.0, it only appears if the current company has the French CoA installed. Hence, it is not possible to specify a SIRET on a French partner if the company is Belgian, for instance. To fix this, we also use the company_registry to fill the SIRET node in the xml. In master, we intend to remove the SIRET field, as we should have used the company_registry from the beginning instead. opw-4174309 Forward-Port-Of: odoo/odoo#180321
Forward-Port-Of: odoo/odoo#180663
Original PR description
Forward-Port-Of: odoo/odoo#180663
This error occurs when attempting to add a payment using the ``Quick Add`` feature in the Kanban view. Steps to reproduce: - Install the ``pos_online_payment`` module - Point of Sale > Orders > Payments > Go to Kanban view - Click on the ``Quick Add`` button and ``Add`` Traceback: ``KeyError: 'payment_method_id'`` The error in [1] occurred because the ``payment_method_id`` was not found in the vals. This commit will fix the above error by removing the Kanban view from payments be
Original PR description
This error occurs when attempting to add a payment using the ``Quick Add`` feature in the Kanban view. Steps to reproduce: - Install the ``pos_online_payment`` module - Point of Sale > Orders > Payments > Go to Kanban view - Click on the ``Quick Add`` button and ``Add`` Traceback: ``KeyError: 'payment_method_id'`` The error in [1] occurred because the ``payment_method_id`` was not found in the vals. This commit will fix the above error by removing the Kanban view from payments because we never allow payment creation. [1]- https://github.com/odoo/odoo/blob/42ab53925b140508e2aa837ce09c914b8f243b21/addons/pos_online_payment/models/pos_payment.py#L20 sentry-5750182450 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180557
* PROPBLEM: When duplicating a picking, the creation date is not updated to latest date (fields.datetime.now) instead it was taken from the copy value. This will be a problem if user try to search for it, they do not know 'creation_date' actually is because it is not present on picking view * SOLUTION: this commit add copy=False to update 'creation_date' when duplicating picking Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is
Original PR description
* PROPBLEM: When duplicating a picking, the creation date is not updated to latest date (fields.datetime.now) instead it was taken from the copy value. This will be a problem if user try to search for it, they do not know 'creation_date' actually is because it is not present on picking view * SOLUTION: this commit add copy=False to update 'creation_date' when duplicating picking 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#180580 Forward-Port-Of: odoo/odoo#179718
This commit adds default fiscal positions for the UK, and postponed / reverse charge VAT. The (sales) reverse charge tax is labeled "Reverse Charge 20%" because of a legal requirement (Chapter 7.6.1 on the gov website: https://www.gov.uk/guidance/the-vat-domestic-reverse-charge-procedure-notice-735) Two purchase reverse charge taxes are added, one for the domestic reverse charge scheme, and one for the international reverse charge scheme. (More details on the gov website: https://www.go
Original PR description
This commit adds default fiscal positions for the UK, and postponed / reverse charge VAT. The (sales) reverse charge tax is labeled "Reverse Charge 20%" because of a legal requirement (Chapter 7.6.1…
This commit adds default fiscal positions for the UK, and postponed / reverse charge VAT. The (sales) reverse charge tax is labeled "Reverse Charge 20%" because of a legal requirement (Chapter 7.6.1 on the gov website: https://www.gov.uk/guidance/the-vat-domestic-reverse-charge-procedure-notice-735) Two purchase reverse charge taxes are added, one for the domestic reverse charge scheme, and one for the international reverse charge scheme. (More details on the gov website: https://www.gov.uk/guidance/how-to-fill-in-and-submit-your-vat-return-vat-notice-70012) The existing 20% purchase VAT is split into two new taxes, one for services and one for goods. This is so that they may be appropriately mapped in the "Rest of the World" fiscal position. If the company is situated in Northern Ireland, certain taxes and fiscal positions should be activated. This commit sets the (by default) inactive Northern Irish taxes and fiscal position to active after loading the chart template when the company has a state_id set as one belonging to Northern Ireland. task-id: 3260002 Forward-Port-Of: odoo/odoo#178185
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180639
Original PR description
--- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180639
In this commit, we fix undeterministic bugs in tour add_to_cart_snippet_tour. To fix this behavior, we add few additionnal steps to check the state of DOM before continuing the tour. Forward-Port-Of: odoo/odoo#179360 Forward-Port-Of: odoo/odoo#178788
Original PR description
In this commit, we fix undeterministic bugs in tour add_to_cart_snippet_tour. To fix this behavior, we add few additionnal steps to check the state of DOM before continuing the tour. Forward-Port-Of: odoo/odoo#179360 Forward-Port-Of: odoo/odoo#178788
You should not be able to archive a journal used in a payment method. Steps to reproduce: ------------------- * Go on any journal used in a payment method (e.g. Cash) * Archive the journal > Observation: You are still able to use the payment method without the journal being active Note: --------------- Similar fix was done for the point of sale here : https://github.com/odoo/odoo/pull/177751 opw-4070620 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo
Original PR description
You should not be able to archive a journal used in a payment method. Steps to reproduce: ------------------- * Go on any journal used in a payment method (e.g. Cash) * Archive the journal > Observation: You are still able to use the payment method without the journal being active Note: --------------- Similar fix was done for the point of sale here : https://github.com/odoo/odoo/pull/177751 opw-4070620 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180689 Forward-Port-Of: odoo/odoo#180487
Version: 16.0+ Issue: A vendor bill paid with an existing check remains paid although the check has been removed. This is because the vendor payment is made with the check and the payment is still reconciled with the vendor bill. This will lead to inconsistent/erroneous display of the payment status of the vendor bill. Purpose of this PR: Prevent the check payments with other operations from being reset to draft or removed. Instead raise an error to notify the user that the payment is us
Original PR description
Version: 16.0+ Issue: A vendor bill paid with an existing check remains paid although the check has been removed. This is because the vendor payment is made with the check and the payment is still reconciled with the vendor bill. This will lead to inconsistent/erroneous display of the payment status of the vendor bill. Purpose of this PR: Prevent the check payments with other operations from being reset to draft or removed. Instead raise an error to notify the user that the payment is used for other account moves. Steps to reproduce in runbot: 1) set up latam checks in database 2) make an invoice and use a check as payment 3) make a bill and use the existing check to pay for the bill 4) go back to the invoice and reset the payment to draft and delete the payment 5) the vendor payment will remain and be marked as paid/partial paid opw-4189731 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180522