Thursday, March 11, 2021
28 changes · master
Enhancements to existing features
This update removes outdated checkout code from the website sales module. It helps keep the checkout area easier to maintain and reduces the risk of future issues without changing the customer-facing shopping flow.
Original PR description
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
This update replaces a confusing error message shown when users accidentally combine records from different areas of the system. The new wording makes the problem easier to understand, helping users and support teams identify what went wrong faster.
Original PR description
The "TypeError: Mixing apples and oranges" error message is raised when users are using recordsets from different models together. The error message was confusing some users thus have been reworded to be more explicit. The initial proposal was to replace "apples" and "oranges" by "torchons" and "serviettes" but it was rejected because the French are not capable not to mixup the two. They suggested to instead replace "apples" and "oranges" by "pain au chocolat" and "chocolatine", this was rejected because none of us understood the difference between the two, they both are couques. Task: 2366612 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
Resolved issues and error corrections
The Accounting dashboard now displays action links more cleanly on mobile screens by moving them below the card content. This makes the interface easier to read and reduces confusion when users access Accounting from a phone.
Original PR description
Before this commit, on mobile in the Accounting app, the link in a
kanban card was not well placed.
After this commit, in mobile we consider a link as a block so he is
moved below.
Steps to reproduce:
* Open Odoo on Mobile
* Go to Accounting => Bug ("Create Manually" is in a strange position)
Task ID : 2200168 (4.a)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prMiscellaneous changes
Steps: - Create a second company - Go to Website > Products > Products - Create a product for all companies - Click the "Go to Website" smart button - Click "Edit in Backend" in the top-right corner - Change the product's company to the one you're not on - Go to Visitors > Visitors Bug: Access Error: The requested operation ("read" on "Product" (product.product)) was rejected because of the following rules: (Records: Two prod (id=42), User: Mitchell Admin (id=2)) Explanation:
Original PR description
Steps:
- Create a second company
- Go to Website > Products > Products
- Create a product for all companies
- Click the "Go to Website" smart button
- Click "Edit in Backend" in the top-right corner
- Change the product's company to the one you're not on
- Go to Visitors > Visitors
Bug:
Access Error:
The requested operation ("read" on "Product" (product.product)) was
rejected because of the following rules:
(Records: Two prod (id=42), User: Mitchell Admin (id=2))
Explanation:
It happens because of the rule `product_comp_rule` which prevents
reading a product from a different company.
This commit filters the visited products on the current companies.
opw:2467138
Forward-Port-Of: odoo/odoo#67577The command-line help text for internationalisation options now displays with correct punctuation. This minor cleanup makes the help output look more polished and easier to read, with no expected change to product behavior.
Original PR description
This fixes small typo in the CLI odoo-bin before: ``` Internationalisation options. : ``` is now ``` Internationalisation options: ``` -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change avoids loading unnecessary stock operation types when purchase stock logic only needs one match. It reduces internal overhead and can make related purchase workflows slightly more efficient without changing user-facing behavior.
Original PR description
Don't need to put in cache all picking_type. Use limit = 1 @mart-e -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Previously, when clicking on an illustration in the editor, the image options would be unavailable with a message saying that it was due to technical limitations, and that the user should reselect the image in the media-dialog for quality options to become available. This was caused by the fact that in order to support more than one customizable color in illustrations, they are now saved inside the database with an url containing which colors are customizable inside the url's query parame
Original PR description
Previously, when clicking on an illustration in the editor, the image options would be unavailable with a message saying that it was due to technical limitations, and that the user should reselect the image in the media-dialog for quality options to become available. This was caused by the fact that in order to support more than one customizable color in illustrations, they are now saved inside the database with an url containing which colors are customizable inside the url's query parameters. Since the endpoint that finds which attachment corresponds to which image src was looking for an exact URL match, but query params are trimmed on the client side before talking to the endpoint, they were no longer matching. This commit fixes that by searching for attachments whose URL matches the provided one with or without any extra query parameters. Forward-Port-Of: odoo/odoo#67584
When table name is long enough, the foreign key constraint name computed by odoo and the one by PostgreSQL are different, for the same table, column and definition. As an example, base_partner_merge_automatic_wizard_res_partner_rel(partner_id) foreign key is named base_partner_merge_automatic_wizard_res_partner_rel_res_partner_id_fkey in Odoo while it's base_partner_merge_automatic_wizard_res_par_res_partner_id_fkey in PostgreSQL. This difference trigger a useless foreign key drop/
Original PR description
When table name is long enough, the foreign key constraint name computed by odoo and the one by PostgreSQL are different, for the same table, column and definition. As an example, base_partner_merge_automatic_wizard_res_partner_rel(partner_id) foreign key is named base_partner_merge_automatic_wizard_res_partner_rel_res_partner_id_fkey in Odoo while it's base_partner_merge_automatic_wizard_res_par_res_partner_id_fkey in PostgreSQL. This difference trigger a useless foreign key drop/create. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66609
When an index have as name 'tablename_fieldname_index', this index is dropped if the field have index=False. This lead to dropping user-created index when performing a module update, or dropping/recreating an index during update when index=True is set in a sub-module. A warning is logged instead. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66700
Original PR description
When an index have as name 'tablename_fieldname_index', this index is dropped if the field have index=False. This lead to dropping user-created index when performing a module update, or dropping/recreating an index during update when index=True is set in a sub-module. A warning is logged instead. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66700
… on account.partial.reconcile Since https://github.com/odoo/odoo/commit/beccf82e09d536255d9d9cb9bfe58ebae2559843, 'amount_currency' is now 'debit_amount_currency' / 'credit_amount_currency'. opw: 2444189 Forward-Port-Of: odoo/odoo#67588 Forward-Port-Of: odoo/odoo#67164
Original PR description
… on account.partial.reconcile Since https://github.com/odoo/odoo/commit/beccf82e09d536255d9d9cb9bfe58ebae2559843, 'amount_currency' is now 'debit_amount_currency' / 'credit_amount_currency'. opw: 2444189 Forward-Port-Of: odoo/odoo#67588 Forward-Port-Of: odoo/odoo#67164
Steps to follow to reproduce the bug: -Go to the Contact app -Choose any contact -In the contact form> go to the "sales & purchase" tab and try to assign a user in the "salesperson" fields Problem: You can choose any user regardless of their type. While normally we can only choose internal users Solution: Add a domain to the "user_id" fields to only see users of the kind "internal type" opw-2468819 Description of the issue/feature this PR addresses: Current behavior before PR
Original PR description
Steps to follow to reproduce the bug: -Go to the Contact app -Choose any contact -In the contact form> go to the "sales & purchase" tab and try to assign a user in the "salesperson" fields Problem: You can choose any user regardless of their type. While normally we can only choose internal users Solution: Add a domain to the "user_id" fields to only see users of the kind "internal type" opw-2468819 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#67433
Steps to reproduce the bug: - Create an Expense E - Create a report R from E in the journal J (type=purchase) - Generate the journal entry JE from R - Go to Accounting Dashboard and click on J in the kanban view Bug: JE was not displayed in the entries filtered for J PS: When creating a journal entry from an expense sheet, the move_type of the entry is 'entry'. opw:2474729 Forward-Port-Of: odoo/odoo#67612
Original PR description
Steps to reproduce the bug: - Create an Expense E - Create a report R from E in the journal J (type=purchase) - Generate the journal entry JE from R - Go to Accounting Dashboard and click on J in the kanban view Bug: JE was not displayed in the entries filtered for J PS: When creating a journal entry from an expense sheet, the move_type of the entry is 'entry'. opw:2474729 Forward-Port-Of: odoo/odoo#67612
### Description of the issue/feature this PR addresses: Identification type was always been overwrite by the _onchange_country even when just opening the contact form, this was always setting the is_vat identification type as default without taking into account if the user has defined their own default.: * If Identification type is set and it is compatible with the country then we leave it as it is (this is the case the identification type has been set by a default). * If Identification ty
Original PR description
### Description of the issue/feature this PR addresses: Identification type was always been overwrite by the _onchange_country even when just opening the contact form, this was always setting the…
### Description of the issue/feature this PR addresses: Identification type was always been overwrite by the _onchange_country even when just opening the contact form, this was always setting the is_vat identification type as default without taking into account if the user has defined their own default.: * If Identification type is set and it is compatible with the country then we leave it as it is (this is the case the identification type has been set by a default). * If Identification type is set but is not compatible with the country then compute and set the Identification type that is is_vat True for the country Where country is the one set in the partner record, if not set will use the country of the move's company, if not defined then will use the country of the environment company Follow this steps: 1. create default for identification type field using DNI record (need to install l10n_ar just for test purpose) 2. create a new user ### Current behavior before PR: The contact will have CUIT as identification type ### Desired behavior after PR is merged: The contact will have DNI as identification type, which is the one defined by the user defaults -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67191
Description of the issue/feature this PR addresses: Adding the spanish translation for l10n_pe and the POT for later translations. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66963
Original PR description
Description of the issue/feature this PR addresses: Adding the spanish translation for l10n_pe and the POT for later translations. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#66963
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67596 Forward-Port-Of: odoo/odoo#67526
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#67596 Forward-Port-Of: odoo/odoo#67526
According to last runbot state. Should probably be removed someday as actually there is not much gain with those tests. Forward-Port-Of: odoo/odoo#67652
Original PR description
According to last runbot state. Should probably be removed someday as actually there is not much gain with those tests. Forward-Port-Of: odoo/odoo#67652
Steps to reproduce the bug: - Let's consider an included tax T (10%) and a product P (11€) with invoicing policy based on delivery - Create a sale order SO with one line L with 2 P and T - Confirm SO Bug: The untaxed_amount_to_invoice was 20€ on L instead 0€ The untaxed_amount_to_invoice must be 20€ when the delivery is processed opw:2457660 Forward-Port-Of: odoo/odoo#67638
Original PR description
Steps to reproduce the bug: - Let's consider an included tax T (10%) and a product P (11€) with invoicing policy based on delivery - Create a sale order SO with one line L with 2 P and T - Confirm SO Bug: The untaxed_amount_to_invoice was 20€ on L instead 0€ The untaxed_amount_to_invoice must be 20€ when the delivery is processed opw:2457660 Forward-Port-Of: odoo/odoo#67638
Description of the issue/feature this PR addresses: fix type to invoice_type Current behavior before PR: exception because when attempted to forward port, 'type' remained as is instead of changing to 'invoice_type' Desired behavior after PR is merged: do not have an exception -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67569
Original PR description
Description of the issue/feature this PR addresses: fix type to invoice_type Current behavior before PR: exception because when attempted to forward port, 'type' remained as is instead of changing to 'invoice_type' Desired behavior after PR is merged: do not have an exception -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#67569
Forward-Port-Of: odoo/odoo#67683
Original PR description
Forward-Port-Of: odoo/odoo#67683
…ument We also set a country_id for e.g. foreign which we should not. 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#67159
Original PR description
…ument We also set a country_id for e.g. foreign which we should not. 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#67159
Add report name and document prefix on l10n_ar data for the following documents: - (60) CUENTAS DE VENTA Y LIQUIDO PRODUCTO A - (61) CUENTAS DE VENTA Y LIQUIDO PRODUCTO B 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#67052 Forward-Port-Of: odoo/odoo#66696
Original PR description
Add report name and document prefix on l10n_ar data for the following documents: - (60) CUENTAS DE VENTA Y LIQUIDO PRODUCTO A - (61) CUENTAS DE VENTA Y LIQUIDO PRODUCTO B 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#67052 Forward-Port-Of: odoo/odoo#66696
Issue - Install 'Accounting' module - Go Accounting -> Configuration -> Chart of Accounts - Rename `Current Assets` to `Current " Assets` - Create some assets in the above account - Open Assets Report (Depreciation Schedule in v14.0) Traceback raised. Cause Using line_id with `"` inside it while wrapping it with `"` to match attribute with '$el.find'. ex: `$el.find('tr[data-parent-id="101000 Current " Assets"]')` ^ Solution Escape `"` in line_id.
Original PR description
Issue
- Install 'Accounting' module
- Go Accounting -> Configuration -> Chart of Accounts
- Rename `Current Assets` to `Current " Assets`
- Create some assets in the above account
- Open Assets Report (Depreciation Schedule in v14.0)
Traceback raised.
Cause
Using line_id with `"` inside it while wrapping it with `"`
to match attribute with '$el.find'.
ex: `$el.find('tr[data-parent-id="101000 Current " Assets"]')`
^
Solution
Escape `"` in line_id.
opw-2469955
Forward-Port-Of: odoo/enterprise#16957Bug === In the test of "Format Facebook Message", we create a social stream. But during the creation, we will try to fetch the stream posts, and so which can not be done during the tests. So we need to mock the social stream model to not fetch the posts on the Facebook API. Forward-Port-Of: odoo/enterprise#16989
Original PR description
Bug === In the test of "Format Facebook Message", we create a social stream. But during the creation, we will try to fetch the stream posts, and so which can not be done during the tests. So we need to mock the social stream model to not fetch the posts on the Facebook API. Forward-Port-Of: odoo/enterprise#16989
This adds the possibility to have lines with 0 amount in the invoice XML Forward-Port-Of: odoo/enterprise#16766 Forward-Port-Of: odoo/enterprise#16620
Original PR description
This adds the possibility to have lines with 0 amount in the invoice XML Forward-Port-Of: odoo/enterprise#16766 Forward-Port-Of: odoo/enterprise#16620
…e lock date When a lock date has been set, it could prevent the extraction system from updating. There is now a warning displayed and the date is set to the next day following the lock date. This required a modification to the way the warnings are represented. As multiple warnings could occur at the same time on an invoice, simple codes for each of them was insufficient. Instead, they're now represented by power of 2's so that they can be combined by summing them. Analyzing the bits
Original PR description
…e lock date When a lock date has been set, it could prevent the extraction system from updating. There is now a warning displayed and the date is set to the next day following the lock date. This required a modification to the way the warnings are represented. As multiple warnings could occur at the same time on an invoice, simple codes for each of them was insufficient. Instead, they're now represented by power of 2's so that they can be combined by summing them. Analyzing the bits of the resulting number allows to retrieve which warning are active. Forward-Port-Of: odoo/enterprise#16242
When a user wants to upload a customer invoice, he receives an error telling him that he can't put a Sale journal for a `move_type` corresponding to a Vendor Bill. This problem is caused by the fact that we always put the `default_move_type` equal to `in_invoice`. This is not necessary because the `default_move_type` is already defined, both in the kanban view and in the tree view. Therefore, this commit removes the default value of `default_move_type` which is always set to `in_invoice`. **
Original PR description
When a user wants to upload a customer invoice, he receives an error telling him that he can't put a Sale journal for a `move_type` corresponding to a Vendor Bill. This problem is caused by the fact that we always put the `default_move_type` equal to `in_invoice`. This is not necessary because the `default_move_type` is already defined, both in the kanban view and in the tree view. Therefore, this commit removes the default value of `default_move_type` which is always set to `in_invoice`. **opw-2460029** Forward-Port-Of: odoo/enterprise#16953
…lation Purpose ======= The bonus is reduced accoding to the unpaid hours on the payslip. Enable the employment bonus is not worked days are defined if we are on a salary simulation (Salary Package) Forward-Port-Of: odoo/enterprise#16972
Original PR description
…lation Purpose ======= The bonus is reduced accoding to the unpaid hours on the payslip. Enable the employment bonus is not worked days are defined if we are on a salary simulation (Salary Package) Forward-Port-Of: odoo/enterprise#16972
For an unknown reason, this test has been skipped in the hurry, and it has never been unskipped. The test passes now, modulo an minor adaptation due to an rpc API changed that occurred meanwhile. Forward-Port-Of: odoo/enterprise#16965
Original PR description
For an unknown reason, this test has been skipped in the hurry, and it has never been unskipped. The test passes now, modulo an minor adaptation due to an rpc API changed that occurred meanwhile. Forward-Port-Of: odoo/enterprise#16965