Tuesday, January 18, 2022
35 changes · master
Enhancements to existing features
This update makes image processing more reliable when images are used across website, portal, and content features. It helps reduce errors when resizing or serving images, improving consistency for users managing online pages and media.
The SMS composer warning message was simplified by removing the record count and adjusting the wording. This makes the message easier for users to understand without changing the underlying SMS sending behavior.
Original PR description
removed the first line from header warning of sms composer and done some wording changes in header warning. Task-ID-2728556
Odoo now supports country-specific rules for when commercial invoices are required for deliveries. For Indian localization, commercial invoices are always generated for shipments from India, helping businesses meet local shipping documentation requirements even for domestic deliveries.
Original PR description
Usually we want to create commercial invoices in case the warehouse is in a different country than the recipient. However, some countries like India need those documents for internal shipping as well. The added function can easily be overriden in a dedicated module for the countries that require such a commercial invoice. When the method `_should_generate_commercial_invoice` is called and the Indian localisation is active, the function should return True. When using delivery providers, with the ship_from country is IN, the commercial invoice information is mandatory. The indian law demands a commercial invoice when using shipping methods: https://cleartax.in/s/commercial-invoice/#:~:text=Shipping%20bill-,Time%20Limit%20for%20Raising%20a%20Commercial%20Invoice%20Under%20Indian%20Law,additional%20information%20may%20be%20necessary. related PR: https://github.com/odoo/enterprise/pull/23124 task-2701428
This update removes an unused internal reference from the mail composer screen. It does not change how users compose messages, but it helps keep the code simpler and easier to maintain.
This update modernizes internal parts of Odoo's Mail interface, including chats, messages, dialogs, attachments, emojis, and autocomplete inputs. It helps keep the messaging experience reliable and easier to maintain, with minimal direct change for end users.
Original PR description
Task-2694206
Odoo Sign now handles automatically filled fields linked to multiple related records without causing an error. It selects the most relevant related record and adds validation to catch incorrect field setup earlier, reducing configuration mistakes and signing disruptions.
Original PR description
In sign it is possible to link sign items to partner fields by setting the auto_field field in sign.item.type. However when linking x2many fields, a traceback occurs since it tries to access one field on a recordset with many records. This PR prevents the traceback by filtering the highest priority record from the recordset (defined by active and id values as defined in the spec) and using it to return the property. task-2658338
Additional checks were added to ensure spreadsheets continue to display correctly inside the document composer. This helps prevent unwanted layout issues such as extra scrollbars, keeping the user experience smooth when working with spreadsheets in Odoo Documents.
Original PR description
This commit adds some test to be sure the composer is still behaving correctly when spreadsheet is added to Odoo. typically it veryfies no scrollbars are added around the sheet. task-id: 2643873
Resolved issues and error corrections
Fixed a display issue in activities where an outdated styling rule could cause details to appear incorrectly. This helps keep activity information readable and properly arranged for users.
Original PR description
Prior to this commit the 'o_Activity_details' element was using a discontinued bootstrap class, causing the layout to brake. task#2731819. required by: https://github.com/odoo/odoo/pull/82590 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
This update simplifies internal web interface code and related tests ahead of a future framework upgrade. It should not change day-to-day user behavior, but helps make the platform easier to maintain and modernize.
Miscellaneous changes
American Express CVC code are 4-digit numbers Current Behaviour: Authorize currently only accept numbers up to 999. Behaviour after PR: Authorize accept number up to 9999 opw-2727511 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82626
Original PR description
American Express CVC code are 4-digit numbers Current Behaviour: Authorize currently only accept numbers up to 999. Behaviour after PR: Authorize accept number up to 9999 opw-2727511 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82626
The web enterprise navigation bar now makes the home menu icon title available for translation, improving usability for multilingual users. The change also updates how the menu brand is shown or hidden to avoid flickering and prepare the interface for future framework changes.
Documents now handle image processing more reliably, avoiding attempts to process unsupported PDF content as images. This improves document workflows by reducing errors when users work with files in Documents and spreadsheet-related document features.
Delivery providers can now rely on common package and commodity information prepared in the base delivery module. This reduces duplicated provider-specific work and helps make shipping and commercial invoice data more consistent across carriers.
Original PR description
Each delivery provider, requires some information about the packages that need to be sent as well as about the commodities (for commecial invoices). Since this is needed by each provider, and the required values are very similar, these packages and commodities can be done one step ahead: in the base delivery module. These new `_get` functions return a list of custom objects containing the most important values concerning packages and commodities, and can be called directly from the child classes.
Description of the issue/feature this PR addresses: While posting an invoice, if the transactions linked with the invoice are failed due to valid reason from the payment acquirer, forcing reconciliation on transactions' payment will raise an error because such payment isn't posted. Current behavior before PR: - If there is a failed transaction linked with an invoice, posting that invoice will raise an error because of not posted payment Desired behavior after PR is merged: - If
Original PR description
Description of the issue/feature this PR addresses: While posting an invoice, if the transactions linked with the invoice are failed due to valid reason from the payment acquirer, forcing reconciliation on transactions' payment will raise an error because such payment isn't posted. Current behavior before PR: - If there is a failed transaction linked with an invoice, posting that invoice will raise an error because of not posted payment Desired behavior after PR is merged: - If there is a failed transaction linked with an invoice, posting that invoice will not reconcile the invoice with the transaction's payment if payment isn't posted -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82527 Forward-Port-Of: odoo/odoo#82320
…E-FFF EDI) AdditionalDocumentReference is currently injected right after DocumentCurrencyCode. However, in 15.0, OrderReference is implemented and then, AdditionalDocumentReference is no longer injected at the right place. To fix this, we inject now this field just before AccountingSupplierReference that must be always there and Signature is not implemented. See: http://www.datypic.com/sc/ubl20/e-ns19_Invoice.html -- I confirm I have signed the CLA and read the PR guidelines at www
Original PR description
…E-FFF EDI) AdditionalDocumentReference is currently injected right after DocumentCurrencyCode. However, in 15.0, OrderReference is implemented and then, AdditionalDocumentReference is no longer injected at the right place. To fix this, we inject now this field just before AccountingSupplierReference that must be always there and Signature is not implemented. See: http://www.datypic.com/sc/ubl20/e-ns19_Invoice.html -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82817 Forward-Port-Of: odoo/odoo#82788
Step to reproduce: - Create a lead - go on the smart button meeting - create a new meeting and edit it - save Current behaviour: - Validation Error - It seems the default_get apply command in onchange instead of passing the value which lead to missformed argument for meeting Behaviour after PR: - Take advantage of the automatic generation of attendee in to avoid passing attendee command and get default partner in create for quick_create - Automatic generation of attendee is more r
Original PR description
Step to reproduce: - Create a lead - go on the smart button meeting - create a new meeting and edit it - save Current behaviour: - Validation Error - It seems the default_get apply command in onchange instead of passing the value which lead to missformed argument for meeting Behaviour after PR: - Take advantage of the automatic generation of attendee in to avoid passing attendee command and get default partner in create for quick_create - Automatic generation of attendee is more robust and also apply when the list is empty to accomodate for the default get setting the value to [] opw-2724372 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82760 Forward-Port-Of: odoo/odoo#82286
In some cases, the SM description is incorrect To reproduce the issue: 1. Create a product P 2. Create a receipt with 1 x P Error: The description of the SM is incorrect: `<p><br></p>`. It should be the name of P Another example: 1. Create a product P: - Internal Notes: "Lorem Ipsum" 2. Create a receipt with 1 x P Error: The description of the SM is incorrect: `<p>Lorem ipsum<br></p>`. It should be "Lorem Ipsum" Since [1], `product_template.description` is a HTML field.
Original PR description
In some cases, the SM description is incorrect
To reproduce the issue:
1. Create a product P
2. Create a receipt with 1 x P
Error: The description of the SM is incorrect: `<p><br></p>`. It should
be the name of P
Another example:
1. Create a product P:
- Internal Notes: "Lorem Ipsum"
2. Create a receipt with 1 x P
Error: The description of the SM is incorrect: `<p>Lorem ipsum<br></p>`.
It should be "Lorem Ipsum"
Since [1], `product_template.description` is a HTML field.
[1] bea5790713020209e0527840b7dbc1ea4806b762
OPW-2732208
Forward-Port-Of: odoo/odoo#82686The store_fname is calculated based on the checksum, as for file_size and checksum, skip during create/write Avoid replacing in place the attachments in base as this breaks some tests reusing the vals_list content (e.g. test_complete_message_post running twice because of `@warmup` share the same self.vals) Forward-Port-Of: odoo/odoo#82882 Forward-Port-Of: odoo/odoo#82860
Original PR description
The store_fname is calculated based on the checksum, as for file_size and checksum, skip during create/write Avoid replacing in place the attachments in base as this breaks some tests reusing the vals_list content (e.g. test_complete_message_post running twice because of `@warmup` share the same self.vals) Forward-Port-Of: odoo/odoo#82882 Forward-Port-Of: odoo/odoo#82860
Description of the issue/feature this PR addresses: - create an SO with dropshipping, confirm. It create a PO 1 - copy PO 1 --> Issue PO 2 is linked with the SO @amoyaux -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82605
Original PR description
Description of the issue/feature this PR addresses: - create an SO with dropshipping, confirm. It create a PO 1 - copy PO 1 --> Issue PO 2 is linked with the SO @amoyaux -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82605
Before this commit, users returning from Buckaroo to Odoo after payment could see their session renewed, depending on their browser's implementation of the `SameSite` cookie attribute. This prevented Odoo from retrieving the transaction from the users' session. This commit flags the return route of Buckaroo with `save_session=False`, hence allowing all users to immediately post-process their transactions when they return to Odoo. Forward-Port-Of: odoo/odoo#82929
Original PR description
Before this commit, users returning from Buckaroo to Odoo after payment could see their session renewed, depending on their browser's implementation of the `SameSite` cookie attribute. This prevented Odoo from retrieving the transaction from the users' session. This commit flags the return route of Buckaroo with `save_session=False`, hence allowing all users to immediately post-process their transactions when they return to Odoo. Forward-Port-Of: odoo/odoo#82929
Forward-Port-Of: odoo/odoo#82927
Original PR description
Forward-Port-Of: odoo/odoo#82927
Some aggressive cache invalidation in the middle of method write() where the model has children models (in the _inherits sense) causes very nasty errors that are hard to fix. Consider two models A and B, where B inherits from A. Also consider two fields a1 and a2 on A, which are thus both inherited by B. Now take a record from model B, and update both fields as: record.write({'a1': ..., 'a2': ...}) As both fields appear as related fields on model B, the method write() puts al
Original PR description
Some aggressive cache invalidation in the middle of method write() where the model has children models (in the _inherits sense) causes very nasty errors that are hard to fix. Consider two models A…
Some aggressive cache invalidation in the middle of method write() where
the model has children models (in the _inherits sense) causes very nasty
errors that are hard to fix.
Consider two models A and B, where B inherits from A. Also consider two
fields a1 and a2 on A, which are thus both inherited by B. Now take a
record from model B, and update both fields as:
record.write({'a1': ..., 'a2': ...})
As both fields appear as related fields on model B, the method write()
puts all values in cache, then it proceeds to call the inverse method of
both fields. The inverse method of a1 is called, and this writes on the
parent record. Now imagine that some override on A invalidates the
whole cache. When the inverse method of a2 is called, the field's value
on B has been invalidated, and this therefore writes the value False on
the record's parent.
This patch removes and adapt such cache invalidations:
- Since 4b1cb41cf7a3f936a1e6d00a2bb6a6a29e82d711, the cache invalidation
in method write() of product.product is no longer necessary.
- The cache invalidation in method write() of product.pricelist.item
has been made more specific: it only invalidates the field that needs
to be recomputed.
Fixes #76946, #77042
OPW: 2657461
Forward-Port-Of: odoo/odoo#82935
Forward-Port-Of: odoo/odoo#82901Steps : - In mobile, go to Task Issue : - "Sales Order" stat button is not displayed. Cause : - This button's classe are : - d-md-inline = displayed when size is medium+. - d-none = or else not displayed - In the past, there was a field SO in the form, which made this button unnecessary and taking space. Fix : - Now that this field isn't present anymore, delete d-none part. opw-2722535 Description of the issue/feature this PR addresses: Current behavior before PR:
Original PR description
Steps : - In mobile, go to Task Issue : - "Sales Order" stat button is not displayed. Cause : - This button's classe are : - d-md-inline = displayed when size is medium+. - d-none = or else not displayed - In the past, there was a field SO in the form, which made this button unnecessary and taking space. Fix : - Now that this field isn't present anymore, delete d-none part. opw-2722535 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#82889 Forward-Port-Of: odoo/odoo#82708
Steps to reproduce: Have a 0% Tax Make an invoice with it Open tax report The 0% tax is not present in the report because there is no tax lines generated for them because the resulting balance is zero. Since the tax details is making a mapping between tax lines and base lines and the tax report is using them to compute the report, the tax report is not able to compute the tax base amount for such taxes. Explanation: Until now, the tax line with a zero amount wasn't generated becau
Original PR description
Steps to reproduce: Have a 0% Tax Make an invoice with it Open tax report The 0% tax is not present in the report because there is no tax lines generated for them because the resulting balance is…
Steps to reproduce: Have a 0% Tax Make an invoice with it Open tax report The 0% tax is not present in the report because there is no tax lines generated for them because the resulting balance is zero. Since the tax details is making a mapping between tax lines and base lines and the tax report is using them to compute the report, the tax report is not able to compute the tax base amount for such taxes. Explanation: Until now, the tax line with a zero amount wasn't generated because considered as noisy journal items. Now we must be able to groupby on the base tax account on the tax report, we are forced to use the tax details. Injecting dynamically the 0% tax on the tax details sub-queries is really complicated and leads to a huge performance drop. For that reason, we start to generate the tax lines for 0% tax even the balance is zero. However, since there is nothing creating the missing lines in the past, it should be fixed case by case if needed. opw-2711432 Forward-Port-Of: odoo/odoo#82370
As this test is always red, notably because of the qunit asset bundle, the threshold is raised for some bundles based on runbot builds observations. Forward-Port-Of: odoo/odoo#82954
Original PR description
As this test is always red, notably because of the qunit asset bundle, the threshold is raised for some bundles based on runbot builds observations. Forward-Port-Of: odoo/odoo#82954
before this commit, there was a gap in the placeholder description when we create a new course. so this commit fixes the issue by removing the gap from the description Task Id: 2734524 Forward-Port-Of: odoo/odoo#82871
Original PR description
before this commit, there was a gap in the placeholder description when we create a new course. so this commit fixes the issue by removing the gap from the description Task Id: 2734524 Forward-Port-Of: odoo/odoo#82871
now:  before:  -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82967
Original PR description
now:  before:  -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82967
…ery printer The letterRendering setting was only properly set for the `Printer` class but not for the `EpsonPrinter`. Forward-Port-Of: odoo/odoo#82789 Forward-Port-Of: odoo/odoo#82656
Original PR description
…ery printer The letterRendering setting was only properly set for the `Printer` class but not for the `EpsonPrinter`. Forward-Port-Of: odoo/odoo#82789 Forward-Port-Of: odoo/odoo#82656
When reversing an invoice line, the new anglo-saxon lines do not have a correct unit price. The latter is computed as a standard invoice while it should instead consider the original anglo-saxon line or the returned product. Otherwise, it leads to inconsistencies in account journals. Two cases: - Without any sale order: _[FIX] stock_account: base reversed anglo-saxon AML on original one_ - With a sale order: _[FIX] stock_account, sale_stock: reverse AML using the returned SM value_ Details
Original PR description
When reversing an invoice line, the new anglo-saxon lines do not have a correct unit price. The latter is computed as a standard invoice while it should instead consider the original anglo-saxon line or the returned product. Otherwise, it leads to inconsistencies in account journals. Two cases: - Without any sale order: _[FIX] stock_account: base reversed anglo-saxon AML on original one_ - With a sale order: _[FIX] stock_account, sale_stock: reverse AML using the returned SM value_ Details about the use cases and the issues are explained in each commit OPW-2646926 OPW-2628215 Forward-Port-Of: odoo/odoo#82961 Forward-Port-Of: odoo/odoo#82446
…he company has the right country 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#82232
Original PR description
…he company has the right country 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#82232
Steps to reproduce: 1) Create an invoice 1000 with a tax 21% 2) refund the invoice completely 3) Open the tax report: the base amount is -1000 instead of zero Explanation: The tax is using a different repartition line for invoice and for refund. So, the tax report is getting 2 tax details: (-1000, -210) & (1000, 210) due to the groupby on tax_repartition_line.id. The idea is to sum the base only once to avoid summing multiple times the same base amount when a tax has multiple repartitio
Original PR description
Steps to reproduce: 1) Create an invoice 1000 with a tax 21% 2) refund the invoice completely 3) Open the tax report: the base amount is -1000 instead of zero Explanation: The tax is using a different repartition line for invoice and for refund. So, the tax report is getting 2 tax details: (-1000, -210) & (1000, 210) due to the groupby on tax_repartition_line.id. The idea is to sum the base only once to avoid summing multiple times the same base amount when a tax has multiple repartition lines. In our case, we need to consider the type of repartition line when grouping in order to count -1000+1000 = 0 as base amount. Forward-Port-Of: odoo/enterprise#23595
is_in_conflict_or_force def was inconsistent. Fortunately the arguments passed were also inverted which leaded to a working code. This commit purpose is to clean the code. Forward-Port-Of: odoo/enterprise#23593
Original PR description
is_in_conflict_or_force def was inconsistent. Fortunately the arguments passed were also inverted which leaded to a working code. This commit purpose is to clean the code. Forward-Port-Of: odoo/enterprise#23593
Bugfix for: - Overlapped text in the receipt - Empty value in the receipt - Cannot close POS session due to name having more than 50 characters Forward-Port-Of: odoo/enterprise#23509 Forward-Port-Of: odoo/enterprise#23451
Original PR description
Bugfix for: - Overlapped text in the receipt - Empty value in the receipt - Cannot close POS session due to name having more than 50 characters Forward-Port-Of: odoo/enterprise#23509 Forward-Port-Of: odoo/enterprise#23451
`line_ids` of an account move are dynamically updated. On an invoice, when there is no tax amount for a given tax the tax line is deleted. This is what happens here where all quantities are set to 0 and this dynamic behavior leads to an index error, because the lines are getting deleted within the loop. Anyway quantity is a business field only available for `invoice_line_ids`, so we should set quantity to 0 only for invoice lines and let standard accounting manage dynamic lines. opw-273463
Original PR description
`line_ids` of an account move are dynamically updated. On an invoice, when there is no tax amount for a given tax the tax line is deleted. This is what happens here where all quantities are set to 0 and this dynamic behavior leads to an index error, because the lines are getting deleted within the loop. Anyway quantity is a business field only available for `invoice_line_ids`, so we should set quantity to 0 only for invoice lines and let standard accounting manage dynamic lines. opw-2734637 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#23552
### Issue Sometimes, an invoice can have been correctly registered with SUNAT but Odoo may not have correctly understood this. This can happen, for example, if the cron which sends the payment complement crashes because of a concurrent access error. When this happens, the Odoo user does not have access to the CDR (the receipt from SUNAT). This is an issue because they need to send it to their customer. If the user retries sending the invoice, the IAP service returns an error because th
Original PR description
### Issue Sometimes, an invoice can have been correctly registered with SUNAT but Odoo may not have correctly understood this. This can happen, for example, if the cron which sends the payment…
### Issue Sometimes, an invoice can have been correctly registered with SUNAT but Odoo may not have correctly understood this. This can happen, for example, if the cron which sends the payment complement crashes because of a concurrent access error. When this happens, the Odoo user does not have access to the CDR (the receipt from SUNAT). This is an issue because they need to send it to their customer. If the user retries sending the invoice, the IAP service returns an error because the invoice is already registered. It does not return the CDR, either. As a result, the user has no way of obtaining the CDR. Furthermore, the state in Odoo is not aligned with the state in SUNAT, and the user is not presented with the relevant buttons e.g. to request the invoice's cancellation. ### Solution When sending the invoice via the IAP service, if the IAP service returns an error because the invoice is already registered, re-request the CDR from the IAP service and advance the state in Odoo accordingly. ### Does it work? See [this video demonstration](https://drive.google.com/file/d/1_sH_hf9AxHfvg-bH1dC4NCxxgNWTQGqV/view?usp=sharing) @jco-odoo thank you so much for your brilliant help :smile: Related to support tickets 2714559 and 2663502. Forward-Port-Of: odoo/enterprise#23171