Wednesday, September 25, 2024
16 changes · saas-17.2
Miscellaneous changes
With an MX company setup Create a branch Change the fiscal regime of the branch to Arrendamiento (606). With the branch create an invoice and generate the CFDI Issues: - Regimen Fiscal in CFDI is set to the one of the parent company while it should be the one of the branch - When a PAC certificate is registered in the branch, company name in CFDI will be the branch name while it should always be the root company name opw-4097669 Forward-Port-Of: odoo/enterprise#69411
Original PR description
With an MX company setup Create a branch Change the fiscal regime of the branch to Arrendamiento (606). With the branch create an invoice and generate the CFDI Issues: - Regimen Fiscal in CFDI is set to the one of the parent company while it should be the one of the branch - When a PAC certificate is registered in the branch, company name in CFDI will be the branch name while it should always be the root company name opw-4097669 Forward-Port-Of: odoo/enterprise#69411
### Steps to reproduce issue: 1. Install Mexican localization 2. Make sure Demo User has no administration right 3. As Demo User, create and confirm Invoice for Mexican customer - Make sure Products of the Invoice have an UNSPSC Category (Accounting tab) 5. Send and print Invoice for CFDI 6. An Access Error is raised: > You are not allowed to access 'SAT Digital Sail' (l10n_mx_edi.certificate) records. > > This operation is allowed for the floowing groups: > - Adm
Original PR description
### Steps to reproduce issue: 1. Install Mexican localization 2. Make sure Demo User has no administration right 3. As Demo User, create and confirm Invoice for Mexican customer - Make sure Products of the Invoice have an UNSPSC Category (Accounting tab) 5. Send and print Invoice for CFDI 6. An Access Error is raised: > You are not allowed to access 'SAT Digital Sail' (l10n_mx_edi.certificate) records. > > This operation is allowed for the floowing groups: > - Administration/Settings ### Explanation: During the operation, the user will retrieve the certificates of the company in `_send_api`. Those certificates can only be accessed by people with `group_system` access rights. ### Fix reasoning: Since the issue only concerns the retrieval of the certificates, we will enter superuser mode when executing this operation. opw-4205612 Forward-Port-Of: odoo/enterprise#70587
To reproduce: Be in multicompany, with several companies selected. Create an asset Click on the Expense Account field Select accounts from a different company than the asset's We should not show these. Even worse, in ulterior version, you can save the asset. (computing depreciations would still be prevented) The issue is that we define a custom domain, so it should include it. no-task Forward-Port-Of: odoo/enterprise#68699
Original PR description
To reproduce: Be in multicompany, with several companies selected. Create an asset Click on the Expense Account field Select accounts from a different company than the asset's We should not show these. Even worse, in ulterior version, you can save the asset. (computing depreciations would still be prevented) The issue is that we define a custom domain, so it should include it. no-task Forward-Port-Of: odoo/enterprise#68699
The PR https://github.com/odoo/enterprise/pull/67874 wrongly removed a group parameter on a sensitive field. This adds it back. Forward-Port-Of: odoo/enterprise#70575
Original PR description
The PR https://github.com/odoo/enterprise/pull/67874 wrongly removed a group parameter on a sensitive field. This adds it back. Forward-Port-Of: odoo/enterprise#70575
For readability; so that the name of the line the carryover is made is more distinguishable from the text around it. Forward-Port-Of: odoo/enterprise#70474
Original PR description
For readability; so that the name of the line the carryover is made is more distinguishable from the text around it. Forward-Port-Of: odoo/enterprise#70474
Problem: The UNSPSC codes for "Square meter" and "Square foot" were not created for the corresponding units of measure. Steps to reproduce: - Navigate to Purchase > Configuration > UoM Categories > Surface. - There is no UNSPSC category assigned by default for these units of measure. opw-4103838 Forward-Port-Of: odoo/enterprise#70102
Original PR description
Problem: The UNSPSC codes for "Square meter" and "Square foot" were not created for the corresponding units of measure. Steps to reproduce: - Navigate to Purchase > Configuration > UoM Categories > Surface. - There is no UNSPSC category assigned by default for these units of measure. opw-4103838 Forward-Port-Of: odoo/enterprise#70102
Currently, an exception was generated when the user deleted all website pages and tried to search for anything on the website. error: ``` SyntaxError: syntax error at or near ")" LINE 7: AND "website_page".id IN () ^ File "odoo/http.py", line 2383, in __call__ response = request._serve_db() File "odoo/http.py", line 1913, in _serve_db return self._transactioning( File "odoo/http.py", line 1976, in _tra
Original PR description
Currently, an exception was generated when the user deleted all website pages and tried to search for anything on the website. error: ``` SyntaxError: syntax error at or near ")" LINE 7: AND…
Currently, an exception was generated when the user deleted all website pages and tried to search for anything on the website.
error:
```
SyntaxError: syntax error at or near ")"
LINE 7: AND "website_page".id IN ()
^
File "odoo/http.py", line 2383, in __call__
response = request._serve_db()
File "odoo/http.py", line 1913, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1976, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1943, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2100, in dispatch
return self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 227, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/website/controllers/main.py", line 606, in hybrid_list
data = self.autocomplete(search_type=search_type, term=search, order='name asc', limit=500, max_nb_chars=200, options=options)
File "odoo/http.py", line 757, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/website/controllers/main.py", line 487, in autocomplete
results_count, search_results, fuzzy_term = request.website._search_with_fuzzy(search_type, term, limit, order, options)
File "addons/website/models/website.py", line 1711, in _search_with_fuzzy
count, results = self._search_exact(search_details, fuzzy_term, limit, order)
File "addons/website/models/website.py", line 1740, in _search_exact
results, count = model._search_fetch(search_detail, search, limit, order)
File "addons/website/models/website_page.py", line 259, in _search_fetch
self.env.cr.execute(SQL(
File "odoo/sql_db.py", line 347, in execute
res = self._obj.execute(query, params)
```
This is because the user deleted all pages, and we got an empty list on `most_specific_pages`.
This commit will fix the above issue by preventing the execution of the query when most_specific_pages is empty.
sentry-5449704973
Forward-Port-Of: odoo/odoo#179619Steps to reproduce the issue : - Open web editor - Drag and drop the Tab building block - Rename the first tab "email@gmail.com" or "example.com" - Switch to the second tab and switch back to the first one. Issue: The content of the first tab don't appears anymore when switching tabs. In 17.2 and above the same problem appears with the tel protocol, so '123' is converted to tel://123. Cause: The href attribute of the tab link is incorrectly converted to a mail protocol (mailto:email
Original PR description
Steps to reproduce the issue : - Open web editor - Drag and drop the Tab building block - Rename the first tab "email@gmail.com" or "example.com" - Switch to the second tab and switch back to the…
Steps to reproduce the issue : - Open web editor - Drag and drop the Tab building block - Rename the first tab "email@gmail.com" or "example.com" - Switch to the second tab and switch back to the first one. Issue: The content of the first tab don't appears anymore when switching tabs. In 17.2 and above the same problem appears with the tel protocol, so '123' is converted to tel://123. Cause: The href attribute of the tab link is incorrectly converted to a mail protocol (mailto:email@gmail.com), an http protocol (https://example.com/) or since 17.2, a tel protocol due to the deduceURLfromLabel() function introduced in [1]. This commit addresses the issue by disabling the conversion of URL, mail, and tel protocols when an anchor tag includes a role="tab" attribute, ensuring that the tab functionality remains intact. Only anchor links (href="#...") are allowed for tabs. [1]: https://github.com/odoo/odoo/commit/a903a3114b335fcd9c69b1c74a68838f2cef3e36 opw-4165676 Forward-Port-Of: odoo/odoo#181212 Forward-Port-Of: odoo/odoo#179931
With new Type 1 font constraints and the fonts-urw-base35 package, the 'Courier' font may not be available and we have to use the substitution font. However, the delivered afm files lack the required Ascender/Descender for reportlab to correctly position the human readable part of barcodes. task: 4179663 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180994
Original PR description
With new Type 1 font constraints and the fonts-urw-base35 package, the 'Courier' font may not be available and we have to use the substitution font. However, the delivered afm files lack the required Ascender/Descender for reportlab to correctly position the human readable part of barcodes. task: 4179663 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180994
**Current behavior:** Attempting to test the import of a new CoA on a fresh DB will result in a query actually getting executed and an error propagated up to the UI, however if you were to instead actually do the import, it would work and everything would be correct. **Expected behavior:** If the actual import would work, the 'Test' button should indicate the same. **Steps to reproduce:** *From a fresh DB with account_accountant* 1. Go to the Chart of Accounts view 2. Import a n
Original PR description
**Current behavior:** Attempting to test the import of a new CoA on a fresh DB will result in a query actually getting executed and an error propagated up to the UI, however if you were to instead actually do the import, it would work and everything would be correct. **Expected behavior:** If the actual import would work, the 'Test' button should indicate the same. **Steps to reproduce:** *From a fresh DB with account_accountant* 1. Go to the Chart of Accounts view 2. Import a new CoA 3. Download the template offerred, upload it 4. Click 'Test' -> see the FKEY error **Cause of the issue:** The precommit hook for updating a company's opening move is expected to flush its changes, which is currently not happening. **Fix:** Flush the changes made in the precommit hook at the end of the method. opw-4103686 Forward-Port-Of: odoo/odoo#180708
**Current behavior:** If a kit component is packaged, it will only appear once on a delivery slip for the kit product under the package section. **Expected behavior:** It should always (also) be shown under the kit section. **Steps to reproduce:** 1. Create a product with a kit bom with 2 components 2. Create on-hand quantities for the components, where one is in a package and the other is not 3. Create a delivery for the kit product, validate, print the delivery slip **Cause o
Original PR description
**Current behavior:** If a kit component is packaged, it will only appear once on a delivery slip for the kit product under the package section. **Expected behavior:** It should always (also) be shown under the kit section. **Steps to reproduce:** 1. Create a product with a kit bom with 2 components 2. Create on-hand quantities for the components, where one is in a package and the other is not 3. Create a delivery for the kit product, validate, print the delivery slip **Cause of the issue:** These move lines were intentionally separated. **Fix:** Remove the template logic where the lines that previously displayed such lines one time, prioritizing the package. opw-4148795 Forward-Port-Of: odoo/odoo#180859
**Current behavior:** An invoice with offsetting lines (total == 0.00) with 0% tax will prevent the invoice from being processed by the SII Llevanza de libros registro (ES). **Expected behavior:** The invoice can be processed. **Steps to reproduce:** 1. Create an invoice from a Spanish company to, e.g., a Belgian company 2. Create 2 invoice lines for the same product, one for positive 10 euros, the other for negative 10 euros 3. Add the `0% EU S (Services)` tax to both invoice lin
Original PR description
**Current behavior:** An invoice with offsetting lines (total == 0.00) with 0% tax will prevent the invoice from being processed by the SII Llevanza de libros registro (ES). **Expected behavior:**…
**Current behavior:** An invoice with offsetting lines (total == 0.00) with 0% tax will prevent the invoice from being processed by the SII Llevanza de libros registro (ES). **Expected behavior:** The invoice can be processed. **Steps to reproduce:** 1. Create an invoice from a Spanish company to, e.g., a Belgian company 2. Create 2 invoice lines for the same product, one for positive 10 euros, the other for negative 10 euros 3. Add the `0% EU S (Services)` tax to both invoice lines 4. Confirm the invoice, then try to process the document 5. Observe the error about not having a tax scope set, even though the scope is set in the tax settings **Cause of the issue:** When an invoice in in this state, it goes through the `_l10n_es_edi_get_invoices_tax_details_info()` method without a value for the `TipoDesglose` EDI node, causing the exception. **Fix:** If there are taxes present but no values for the `TipoDesglose` node filled at the end of the method, add them (respectively, based on the tax type) with a value == 0. opw-4083107 Forward-Port-Of: odoo/odoo#180333
On accounting reports you can set the availability based on various conditions. The `availability_condition` field is a stored computed one that depends on `country_id` since [this commit]. Since the field also has an `onchange` registered that empties the `country_id` field when the `availability_condition` is not `country`, setting the field to anything else than `country` triggers a recomputation of the `availability_condition`. This `compute` function defaults to setting the `availability
Original PR description
On accounting reports you can set the availability based on various conditions. The `availability_condition` field is a stored computed one that depends on `country_id` since [this commit]. Since the field also has an `onchange` registered that empties the `country_id` field when the `availability_condition` is not `country`, setting the field to anything else than `country` triggers a recomputation of the `availability_condition`. This `compute` function defaults to setting the `availability_condition` to `always`. Thus you can never choose the option `coa` again. This commit only sets the default `always` value in the `compute` function when there is no value set yet. That way the field doesn't reset itself to `always` on every computation of the field. [this commit]: https://github.com/odoo/odoo/commit/73a8098f7c5247b4620170f90513b50672f9a776 Forward-Port-Of: odoo/odoo#181195
Steps to reproduce: - Create 2 websites and give them a different domain - Go to any product page (shared between all websites) - Check the source code with https://validator.schema.org/: the URL and image microdata start with the wrong domain. => Case 1: if no company_id was set on the product, the URL returns `web.base.url`. => Case 2: if a company_id is set and that company has a website_id set, both websites return the company's website domain. This commit makes sure to return the cu
Original PR description
Steps to reproduce: - Create 2 websites and give them a different domain - Go to any product page (shared between all websites) - Check the source code with https://validator.schema.org/: the URL and image microdata start with the wrong domain. => Case 1: if no company_id was set on the product, the URL returns `web.base.url`. => Case 2: if a company_id is set and that company has a website_id set, both websites return the company's website domain. This commit makes sure to return the current website domain. opw-4113559 Forward-Port-Of: odoo/odoo#179455
**Steps to reproduce the bug:** - Create a storable product “P1”: - Vendor: Azure Interior - Reordering rule: - Trigger: Auto - Route: Buy - Go to the user settings and give Marc Demo access only to Sales. - Log in as Marc. - Create a sales order: - Product: 1 unit of P1. - Confirm the SO. - A purchase order is created. - Create a second SO with another 1 unit of P1. - Confirm it. **Problem:** An error is triggered: `odoo.exceptions.AccessError: You are not al
Original PR description
**Steps to reproduce the bug:** - Create a storable product “P1”: - Vendor: Azure Interior - Reordering rule: - Trigger: Auto - Route: Buy - Go to the user settings and give Marc Demo access only to…
**Steps to reproduce the bug:**
- Create a storable product “P1”:
- Vendor: Azure Interior
- Reordering rule:
- Trigger: Auto
- Route: Buy
- Go to the user settings and give Marc Demo access only to Sales.
- Log in as Marc.
- Create a sales order:
- Product: 1 unit of P1.
- Confirm the SO.
- A purchase order is created.
- Create a second SO with another 1 unit of P1.
- Confirm it.
**Problem:**
An error is triggered:
`odoo.exceptions.AccessError: You are not allowed to access 'Purchase Order Line' (purchase.order.line) records.`
When the second SO is confirmed, a quantity request is made, triggering the "buy" rule. A check is made if there is a candidate “purchase order line” with the same specifications to update its quantity instead of creating a new one:
https://github.com/odoo/odoo/blob/a9cbd2a2ae2e21f1ba14379aecd908c44497b8ab/addons/purchase_stock/models/stock_rule.py#L130-L136
The function `_update_purchase_order_line` is called, where access to the taxes associated with the purchase order line is attempted: https://github.com/odoo/odoo/blob/a9cbd2a2ae2e21f1ba14379aecd908c44497b8ab/addons/purchase_stock/models/stock_rule.py#L248
Since it’s a Many2Many field, a query is made to fetch all the records. However, because the user does not have access to the `account.tax` model, an error is triggered.
opw-4193125
Forward-Port-Of: odoo/odoo#181073The taxes on Peru localization no not have the percentage added by default on the invoice_label field. Currently, the tax name is simply IGV (for the 18% tax) which makes the invoice PDF feel incomplete. This Pr adds the percentage on the invoice label. task: 4114767 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#179132
Original PR description
The taxes on Peru localization no not have the percentage added by default on the invoice_label field. Currently, the tax name is simply IGV (for the 18% tax) which makes the invoice PDF feel incomplete. This Pr adds the percentage on the invoice label. task: 4114767 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#179132