Thursday, July 16, 2020
30 changes · master
Enhancements to existing features
The error shown when creating a model with a duplicate name has been rewritten to be clearer. Users will now understand that each model needs a unique name, reducing confusion when correcting the issue.
Original PR description
Purpose Make the unique model name constraint clearer by specifying name of the model needs to be unique. Specification -Update the constraint error message to the following 'Each model must have a unique name.' Task-2254964 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 improves internal test reliability by reducing shared accounting test dependencies across accounting, payments, membership, repair, product margin, and purchasing stock tests. It ensures test companies use the correct chart-of-accounts currency and helps localization test runs avoid failures caused by incomplete or inconsistent accounting setup.
Original PR description
This update adjusts a CRM field label so it uses more generic wording consistent with the rest of Odoo. It helps users see clearer, more familiar terminology when working with CRM lead-to-opportunity actions.
Original PR description
In this commit, we are making Improving field's string to make it Generic like all other places in Odoo. 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 improves the internal accounting test setup across several finance-related modules by replacing a shared test dependency that caused localization builds to fail. It helps ensure tests run in a more realistic, isolated environment for currencies, companies, users, and chart of accounts configuration.
Resolved issues and error corrections
The inventory action label is adjusted so it stays accurate across different menus, not just when updating quantities from a product page. This reduces confusion for users viewing inventory reports while preserving the specific update wording where it makes sense. Test-only imports were also corrected so they do not affect normal module use.
Original PR description
At bee938e (following task-id 2042303), the label of the action was changed globaly. The action is however shared with multiple menus like Inventory Report. The Update Quantity label only makes sense when coming from the product where the quantity will be updated. Closes odoo/odoo#50523
Miscellaneous changes
filtered(lambda c: c.channel_message_ids) take more than 2 minutes to get executed with a regular user due to access_right check for every single message. Solution: use the previous read_group with the domain channel_message_ids != False which is equivalent -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53734
Original PR description
filtered(lambda c: c.channel_message_ids) take more than 2 minutes to get executed with a regular user due to access_right check for every single message. Solution: use the previous read_group with the domain channel_message_ids != False which is equivalent -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53734
-- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This corrects a recent internal database query update that could fail in uncommon system operations. The fix helps keep administrative and core database tasks working reliably without changing everyday user workflows.
Original PR description
odoo/odoo#53938 improved the SQL linter and used psycopg2.sql to silence the linter where that still made sense. However I forgot to mark table names (pretty much exclusively) as `sql.Identifier` in a few somewhat rare callsites, which consequently break when invoked as a simple string is not a Composable and psycopg2 therefore rejects it when composing the query.
This fix ensures several Enterprise modules only load their test code when tests are actually being run. It prevents unnecessary test-related requirements from affecting normal module startup, reducing the risk of runtime issues for users.
Original PR description
The tests must be only imported in a test context, not in a running context. Since odoo/odoo@92a7f8c a new test requirement was added but it should not be necessary to run a module, only to execute the tests. Enterprise part of odoo/odoo#53628 (two fixes) Making a master version of odoo/odoo#54554 as there are more of them in master.
The layout of the split bill screen is broken after the responsive pos ui. This fixes the split bill screen and make it also responsive. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53893
Original PR description
The layout of the split bill screen is broken after the responsive pos ui. This fixes the split bill screen and make it also responsive. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#53893
An onchange method can remove an existing line from a one2many field of a new record with command 2, such as: move.line_ids = [(2, <NewId origin=42>), ...] The processing of the command 2 above incorrectly tries to remove the new line from the origin record, instead of the new record. Forward-Port-Of: odoo/odoo#54514
Original PR description
An onchange method can remove an existing line from a one2many field of
a new record with command 2, such as:
move.line_ids = [(2, <NewId origin=42>), ...]
The processing of the command 2 above incorrectly tries to remove the
new line from the origin record, instead of the new record.
Forward-Port-Of: odoo/odoo#54514Once global "Accept" button is clicked, the accepted messages were not unchecked causing the button to stay hidden until next page reload. task-2285430 Forward-Port-Of: odoo/odoo#54436
Original PR description
Once global "Accept" button is clicked, the accepted messages were not unchecked causing the button to stay hidden until next page reload. task-2285430 Forward-Port-Of: odoo/odoo#54436
Before this commit, only the users with timesheet 'Administrator' rights can see the Timesheet button in the employees view. Now, the users with timesheet 'See all Timesheet' rights can see the Timesheet button in the employees view. This is the behaviour in version 12. opw-2285695 Forward-Port-Of: odoo/odoo#54263
Original PR description
Before this commit, only the users with timesheet 'Administrator' rights can see the Timesheet button in the employees view. Now, the users with timesheet 'See all Timesheet' rights can see the Timesheet button in the employees view. This is the behaviour in version 12. opw-2285695 Forward-Port-Of: odoo/odoo#54263
[REF] mail: extract the compute of date deadline to be used in hr opw-2265631 ----------------------------------------------------------------- [FIX] hr: activity type configuration on hr plans revert of 0f4ec36 and bf8a9af - Employees > Configuration > Planning Types and ensure the activity type "To Do" is set to scheduled date several days after previous activity (default should be 5 days); - Check that onboarding Plan has at least 2 activities with activity type
Original PR description
[REF] mail: extract the compute of date deadline to be used in hr opw-2265631 ----------------------------------------------------------------- [FIX] hr: activity type configuration on hr plans…
[REF] mail: extract the compute of date deadline to be used in hr
opw-2265631
-----------------------------------------------------------------
[FIX] hr: activity type configuration on hr plans
revert of 0f4ec36 and bf8a9af
- Employees > Configuration > Planning Types and ensure the activity
type "To Do" is set to scheduled date several days after previous
activity (default should be 5 days);
- Check that onboarding Plan has at least 2 activities with activity
type "To Do";
- Click launch plan.
Before this commit, the activity type configuration is ignored and all
activities are due tomorrow. The previous commit uses the function
_onchange_activity_type_id which changes the responsible, the notes and
the summary to set it to the default value.
Now, the activities are due taking into account the activity type
configuration without modifying the already set responsible, notes and
summary.
opw-2265631
Forward-Port-Of: odoo/odoo#54445
Forward-Port-Of: odoo/odoo#54326Before this commit, calling `mapped()` on a relational field of a single record inside a for loop (e.g. `[rec.line_ids.mapped('name') for rec in self]`) would not correctly propagate the `_prefetch_ids` from the bigger recordset down to the record inside the loop. To be more precise, `records` correctly propagates the `_prefetch_ids` down to `rec` but the `mapped()` function would not pass it along correctly. This resulted in one query per record in the `line_ids` recordset, so if `
Original PR description
Before this commit, calling `mapped()` on a relational field of a
single record inside a for loop
(e.g. `[rec.line_ids.mapped('name') for rec in self]`) would not
correctly propagate the `_prefetch_ids` from the bigger recordset down
to the record inside the loop.
To be more precise, `records` correctly propagates the `_prefetch_ids`
down to `rec` but the `mapped()` function would not pass it along
correctly.
This resulted in one query per record in the `line_ids` recordset, so if
`line_ids` were a 1000 record recordset, 1000 queries would be executed!
With this commit, the `mapped()` function correctly propagates the
`_prefetch_ids` of the larger recordset so that prefetching can work
properly and the 1000 queries are brought down to 1.
This commit is a followup on #42611
PS: now it's even more blazing fast
Forward-Port-Of: odoo/odoo#54551Before this commit: If a template_id is put on the first stage, a partner is automatically created at the creation of the applicant. And if the applicant had a phone or a mobile, they are removed. After this commit: The phone and mobile are saved on partner and not removed from applicant. taskId 2299970 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54562
Original PR description
Before this commit: If a template_id is put on the first stage, a partner is automatically created at the creation of the applicant. And if the applicant had a phone or a mobile, they are removed. After this commit: The phone and mobile are saved on partner and not removed from applicant. taskId 2299970 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54562
Since recordsets are self-recursive, they should be treated like strings (where iterating a string yields a string, infinitely) in case somebody happens to return a non-downgraded recordset from a method. Forward-Port-Of: odoo/odoo#54477
Original PR description
Since recordsets are self-recursive, they should be treated like strings (where iterating a string yields a string, infinitely) in case somebody happens to return a non-downgraded recordset from a method. Forward-Port-Of: odoo/odoo#54477
The tests must be only imported in a test context, not in a running context. Since 92a7f8c13fa6bc84 a new test requirement was added but it should not be necessary to run a module, only to execute the tests. Forward-Port-Of: odoo/odoo#54554
Original PR description
The tests must be only imported in a test context, not in a running context. Since 92a7f8c13fa6bc84 a new test requirement was added but it should not be necessary to run a module, only to execute the tests. Forward-Port-Of: odoo/odoo#54554
On a MO which product_id has a serial tracking, some components and 2 or more WO: The method _set_qty_producing of a WO will call the MO _set_qty_producing method even if no changes is made on qty_producing which can produce an undesired aditional move line when creating the MO. On a MO which product_id has a serial tracking and some components: Changing the qty_producing on a MO was adding a line on the component move. Since the _set_qty_producing method is called when creating a WO
Original PR description
On a MO which product_id has a serial tracking, some components and 2 or more WO: The method _set_qty_producing of a WO will call the MO _set_qty_producing method even if no changes is made on qty_producing which can produce an undesired aditional move line when creating the MO. On a MO which product_id has a serial tracking and some components: Changing the qty_producing on a MO was adding a line on the component move. Since the _set_qty_producing method is called when creating a WO it sets the qty_producing of the MO to 0. As it does not make sense to have a WO set the qty_producing of a MO to 0 we will not replicate it. task-2278147 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54313
As additional component are, by definition, not linked to a theoretical quantity on the bom. Triggering the consumption wizard for those product makes no sense. This commit bypass thos product in the flexible consumtpion check. Task : 2278147 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
Original PR description
As additional component are, by definition, not linked to a theoretical quantity on the bom. Triggering the consumption wizard for those product makes no sense. This commit bypass thos product in the flexible consumtpion check. Task : 2278147 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#54174
### Description of the issue/feature this PR addresses: Limit must be 70 not 71 ### Current behavior before PR: Validation of the QR code with https://www.swiss-qr-invoice.org/validator/?lang=fr Prompt the following error: > Ligne 22 , champ UltmtDbtr.Name xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx le champ ne peut pas avoir une longueur supérieure à 70 ### Desired behavior after PR is merged: Generating a Swiss QR with a long debtor or credit
Original PR description
### Description of the issue/feature this PR addresses: Limit must be 70 not 71 ### Current behavior before PR: Validation of the QR code with https://www.swiss-qr-invoice.org/validator/?lang=fr Prompt the following error: > Ligne 22 , champ UltmtDbtr.Name xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx le champ ne peut pas avoir une longueur supérieure à 70 ### Desired behavior after PR is merged: Generating a Swiss QR with a long debtor or creditor name is valid. @oco-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54398
task-2280146 Forward-Port-Of: odoo/odoo#54395
Original PR description
task-2280146 Forward-Port-Of: odoo/odoo#54395
Before this commit, try to post a comment will raise a traceback in front end because textarea is not found. Now, we check that we are writing in textarea content and no more in textarea comment. 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#54588
Original PR description
Before this commit, try to post a comment will raise a traceback in front end because textarea is not found. Now, we check that we are writing in textarea content and no more in textarea comment. 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#54588
In order to ease the inheritance in other module (this one is needed in voip for example) odoo/enterprise#11836 task-2296875 Forward-Port-Of: odoo/odoo#54454
Original PR description
In order to ease the inheritance in other module (this one is needed in voip for example) odoo/enterprise#11836 task-2296875 Forward-Port-Of: odoo/odoo#54454
This allows user to close multiple windows with ESC key. task-2283891 ---- # Forward-Port-Of: odoo/odoo#54183
Original PR description
This allows user to close multiple windows with ESC key. task-2283891 ---- # Forward-Port-Of: odoo/odoo#54183
After the commit 2a57a156c7b8e81c01afa095b3291361d208611f Cloc excluded by default one more folder, it should appear in the documentation of the tools -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54546
Original PR description
After the commit 2a57a156c7b8e81c01afa095b3291361d208611f Cloc excluded by default one more folder, it should appear in the documentation of the tools -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54546
odoo/odoo#54454 task-2296875 Forward-Port-Of: odoo/enterprise#11836
Original PR description
odoo/odoo#54454 task-2296875 Forward-Port-Of: odoo/enterprise#11836
Issue: Have the commission advantages does not impact the wage in the salary configurator. yearly_commission_cost is zero This is due to a wrong configuration yearly_commission should not be use as field for the advantage since it's a computed field and the base of the computation is commission_on_target which is zero since it's not display in the salary configurator Solution: Use commission_on_target in the salary configurator instead of yearly_commission. Rename the method that di
Original PR description
Issue: Have the commission advantages does not impact the wage in the salary configurator. yearly_commission_cost is zero This is due to a wrong configuration yearly_commission should not be use as field for the advantage since it's a computed field and the base of the computation is commission_on_target which is zero since it's not display in the salary configurator Solution: Use commission_on_target in the salary configurator instead of yearly_commission. Rename the method that display the dynamic description Forward-Port-Of: odoo/enterprise#11880
From https://github.com/odoo/odoo/commit/0e2765f5fd0c, it's possible to produce without setting a bom on the production order. Converting the production uom based on the BoM one is erroneous in this case. Task : 2278147 Forward-Port-Of: odoo/enterprise#11697
Original PR description
From https://github.com/odoo/odoo/commit/0e2765f5fd0c, it's possible to produce without setting a bom on the production order. Converting the production uom based on the BoM one is erroneous in this case. Task : 2278147 Forward-Port-Of: odoo/enterprise#11697
Forward-Port-Of: odoo/enterprise#11790
Original PR description
Forward-Port-Of: odoo/enterprise#11790
Issue - Install Accounting, CA accounting, country = CA - Accounting > Settings > Multi page checks - Accounting > Bills, create/duplicate 10 times - Back to Bills tree view > select all created bills - Register payment > Checks & group invoices - Print checks All the pages are at the same position so the document is not usable. Cause The class to have separate pages is now .article and not .page Solution Add the class page, change the layout since the base
Original PR description
Issue - Install Accounting, CA accounting, country = CA - Accounting > Settings > Multi page checks - Accounting > Bills, create/duplicate 10 times - Back to Bills tree view > select all created bills - Register payment > Checks & group invoices - Print checks All the pages are at the same position so the document is not usable. Cause The class to have separate pages is now .article and not .page Solution Add the class page, change the layout since the base layout already has a .article class Add data-oe-id/model in order to use .article class correctly OPW-2276065 Forward-Port-Of: odoo/enterprise#11858