Thursday, December 26, 2024
7 changes · saas-17.2
Miscellaneous changes
We delete a constraint that requires to have an accepted original document in order to be able to generate CN or DN. This is not actually needed: 1. if there is a problem with the original document then DGI response will let us know and will reject our DN/CN 2. In the case I create an invoice, and immediately found an error we can now generate the credit note: not need to wait the invoices has been process. They will process together by the cron. 3. For the case that we need to generate DN
Original PR description
We delete a constraint that requires to have an accepted original document in order to be able to generate CN or DN. This is not actually needed: 1. if there is a problem with the original document then DGI response will let us know and will reject our DN/CN 2. In the case I create an invoice, and immediately found an error we can now generate the credit note: not need to wait the invoices has been process. They will process together by the cron. 3. For the case that we need to generate DN and CN where the original related document was generate with other sofware (for example a DN or CN from an old invoice genrated in previos sofware provider) without this constraint is possible. LATAM 1301 / ADHOC Ticket 46212 Forward-Port-Of: odoo/enterprise#75789
…ing taxes Steps to reproduce ================== - Create a company in Canada with the canadian fiscal localization - Configure the avatax sandbox credentials - Create a new fiscal position in the USA that uses the avatax API - Create a USD pricelist - Create a warehouse in Cleveland Ohio - Create a salesorder with an Ohio based customer and the USD pricelist - Select a storable product with an invoicing policy on delivered quantity - Set the avatax category of the product to "H
Original PR description
…ing taxes Steps to reproduce ================== - Create a company in Canada with the canadian fiscal localization - Configure the avatax sandbox credentials - Create a new fiscal position in the…
…ing taxes Steps to reproduce ================== - Create a company in Canada with the canadian fiscal localization - Configure the avatax sandbox credentials - Create a new fiscal position in the USA that uses the avatax API - Create a USD pricelist - Create a warehouse in Cleveland Ohio - Create a salesorder with an Ohio based customer and the USD pricelist - Select a storable product with an invoicing policy on delivered quantity - Set the avatax category of the product to "Hand tools" - Select the warehouse just created on the sales order - Click on the "Compute taxes" button => The tax is set to 1% - Confirm the sales order => The tax is still set to 1% - Validate the delivery and create + confirm a new invoice => The tax is now 2.25% Cause of the issue ================== When computing the addresses to send to Avatax, the stock move addresse was used, but at this point, they have not yet been created Solution ======== We now use the warehouse from the sales order. This is only a best-effort estimation of where the products will ship from. It's possible products ship from a different warehouse than warehouse_id. For example, you can change the default delivery route to pull from a source location in a different warehouse. However, this is probably not a common configuration. In the end, the only way to know for sure is to run the inventory-related code, which we want to avoid just for tax computation. Finally, it's also possible for users to change the warehouse manually after the order is confirmed. This can also potentially change taxes, and there's no way to anticipate this. The account.move code will continue to pull the warehouse from the stock.move, because we know it will be created before the invoice. Note that even on account.move the shipping address remains an estimation for products with an “invoice on ordered” invoicing policy. opw-4073701 Forward-Port-Of: odoo/enterprise#75655
The 2 exports have the same name, which is impractical. Let's differentiate them task-4414223 Forward-Port-Of: odoo/enterprise#75957 Forward-Port-Of: odoo/enterprise#75907
Original PR description
The 2 exports have the same name, which is impractical. Let's differentiate them task-4414223 Forward-Port-Of: odoo/enterprise#75957 Forward-Port-Of: odoo/enterprise#75907
Currently a `ParseError` is arising when user installs the 'website_livechat' module after deleting the 'YourWebsite.com' channel from 'im_livechat' module. To reproduce this error: - Install 'im_livechat' module. - Open the application and delete 'YourWebsite.com' channel by going to 'Configure Channel' - Now try to install the 'website_livechat' module. - The error appears in the log. Error: `ParseError while parsing /home/odoo/src/odoo/18.0/addons/website_livechat/data/ website_li
Original PR description
Currently a `ParseError` is arising when user installs the 'website_livechat' module after deleting the 'YourWebsite.com' channel from 'im_livechat' module.
To reproduce this error:
- Install 'im_livechat' module.
- Open the application and delete 'YourWebsite.com' channel by going to 'Configure Channel'
- Now try to install the 'website_livechat' module.
- The error appears in the log.
Error: `ParseError
while parsing /home/odoo/src/odoo/18.0/addons/website_livechat/data/ website_livechat_data.xml:4, somewhere inside
<record id="website.default_website" model="website">
<field name="channel_id" ref="im_livechat.im_livechat_channel_data"/>
</record>`
This commit solves the above issue by using `forcecreate='False'` to bypass
record creation if it violates checks.
sentry-6107471185
Forward-Port-Of: odoo/odoo#189566**Problem**: The function `_getColumnSize` returns the size of the columns. When `gridIndex = columnSize;` is assigned and `columnSize` equals 12, it causes an overflow in the `grid` array. This leads to invalid elements being passed to `_applyColspan`. **Solution**: Ensure `_applyColspan` is only called when `gridIndex` is within valid bounds. **Steps to reproduce**: 1. Open an email marketing template. 2. Extend the "Centered Logo" snippet to the maximum size (`col-12`). 3. Observe
Original PR description
**Problem**: The function `_getColumnSize` returns the size of the columns. When `gridIndex = columnSize;` is assigned and `columnSize` equals 12, it causes an overflow in the `grid` array. This leads to invalid elements being passed to `_applyColspan`. **Solution**: Ensure `_applyColspan` is only called when `gridIndex` is within valid bounds. **Steps to reproduce**: 1. Open an email marketing template. 2. Extend the "Centered Logo" snippet to the maximum size (`col-12`). 3. Observe a traceback error. opw-4381159 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190677
Current behavior before PR: - currently, we directly set the excluded property to 'true', which do not check for 'undefined' values, which are possible in certain cases. This fix ensure to set the property only if it is present. Desired behavior after PR is merged: - excluded property will set only for defined objects. ## steps to reproduce: - create two product, `main` & `optional` - for `main`, add two attribute values : eg height: 20, 30 - for `optional`, add attribute values : e
Original PR description
Current behavior before PR: - currently, we directly set the excluded property to 'true', which do not check for 'undefined' values, which are possible in certain cases. This fix ensure to set the…
Current behavior before PR:
- currently, we directly set the excluded property to 'true', which do not check for 'undefined' values, which are possible in certain cases. This fix ensure to set the property only if it is present.
Desired behavior after PR is merged:
- excluded property will set only for defined objects.
## steps to reproduce:
- create two product, `main` & `optional`
- for `main`, add two attribute values : eg height: 20, 30
- for `optional`, add attribute values : eg width : 100, 200, 300
- set `optional` as optional product for main product
- configure height values for `main` product-> for value 20: exclude `optional` product of attribute 200,300
- create a sale order with `optional` product and attribute 200. ( confirm the SO)
- now remove the attribute value 200 from `optional` product.
- try to create new quotation for main product.(traceback will appear)
## Traceback
```py
TypeError: Cannot set properties of undefined (setting 'excluded')
at ProductConfiguratorDialog._checkExclusions (http://localhost:9000/web/assets/00d1566/web.assets_web_dark.min.js:16288:175)
at ProductConfiguratorDialog._checkExclusions (http://localhost:9000/web/assets/00d1566/web.assets_web_dark.min.js:16291:181)
at ProductConfiguratorDialog._updateProductTemplateSelectedPTAV (http://localhost:9000/web/assets/00d1566/web.assets_web_dark.min.js:16283:100)
at ProductTemplateAttributeLine.updateSelectedPTAV (http://localhost:9000/web/assets/00d1566/web.assets_web_dark.min.js:16310:1317)
at Object.mainEventHandler
```
## Description
the moment we removed 200 attribute from optinal product, it went for check to be [unlink or become archived](https://github.com/odoo/odoo/blob/17.0/addons/product/models/product_template_attribute_value.py#L140-L147).
as it is linked to a SO, it cannot be deleted and simply left to archive.
due to this flow, the related record from product.template.attribute.exclusion still remains,
and when we fetch the list of ids of parent_exclusion, it [return](https://github.com/odoo/odoo/blob/17.0/addons/product/models/product_template.py#L974-L976) the archived value too, which is not present in ptavlist
We cannot simple delete the value from the relation table, as when the ptav 300 is again added, it is reused ( ptav_active sets to true) , and old relation starts to work together
## solution:
ignore the archived ptavs.
opw-4365068
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#190608Three commits are included in this PR. - One adds a base module for all Nilvera modules - One adds a module to handle sending and receiving E-Invoices and E-Archives to and from Nilvera. - One adds general improvements to UBL. task-3952234 Forward-Port-Of: odoo/odoo#180283
Original PR description
Three commits are included in this PR. - One adds a base module for all Nilvera modules - One adds a module to handle sending and receiving E-Invoices and E-Archives to and from Nilvera. - One adds general improvements to UBL. task-3952234 Forward-Port-Of: odoo/odoo#180283