Friday, December 11, 2020
29 changes · master
Enhancements to existing features
Module installations and upgrades now show shorter, more focused error messages when an XML view is broken. This helps developers identify the problem faster by showing the relevant file and nearby lines instead of long internal tracebacks.
Original PR description
When installing/upgrading a module with broken xml views, the module installation fails with an error message that should help the developer locate and correct the error. Before this commit, a…
When installing/upgrading a module with broken xml views, the module installation fails with an error message that should help the developer locate and correct the error. Before this commit, a 3-level traceback was thrown at the developer: 1. The initial ValueError containing the original error message and some view context information. 2. The noisy re-cast of the ValueError to a ValidationError with no additionnal information. 3. An additionnal re-cast of the exception to add the original source file path plus the entire XML source code that failed to be parsed. We argue the error contains too much noise as developers are mostly interrested in correcting their erronous tag of their view, they are not interrested in `ir_ui_view` internals. The new exception report is much less talkative, the two tracebacks from `ir_ui_view` are logged at the `DEBUG` level. The new exception still contains the original error message with some context on the view record and the original source file path but it only show 5 lines of XML around the erronous tag. 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
The quick create card in Kanban views now keeps its action buttons on one line, even in languages with longer translations. The Discard action is shown as a compact grey trash icon, reducing visual clutter and preventing awkward wrapping.
Original PR description
PURPOSE All buttons of the quick create kanban card fit in a single row in all languages. SPECIFICATIONS Current While everything looks nice and tidy in English. The layout of our quick create cards quickly suffers once one switches to another language for which those words are longer. To be Replace the Discard button by a thrash button in grey and aligned on the right Add some css to make sure the 3 buttons always fit in a single line => if not, crop LINKS PR Task 2373130 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Odoo now shows a clearer message when a computed field references a dependency that does not exist. This helps implementers and support teams identify configuration mistakes faster during module updates.
Original PR description
Create a model as follow:
class FooModel(models.Model):
_name = 'foo'
bar = fields.Char(compute="compute_bar")
@depends('bazz') # wrong dependency, bazz does not exist
def compute_bar(self):
for rec in self:
rec.bar = "Babar raconte des beaux bobards."
Uppon -u foo_module, a ValueError is rose for the invalid dependency
with the following message:
> Field foo.bar cannot find dependency bazz on model foo.
We had feedback the error message was not very clear to some users,
the new error message is:
> Wrong @depends on 'compute_bar' (compute method of field foo.bar).
> Dependency field 'bazz' not found in model foo.
Task: 2366612Miscellaneous changes
When trying to get the im_status of several partners, if one of them does not exist, it will return an error. To reproduce the error: 1. Go to Contacts 2. Open a contact 3. Action > Delete 4. Wait max 50 seconds => A Missing Record message is displayed. The im_status RPC includes the deleted partner's identifier and the server looks for it. Now, the server skips the missing identifiers. OPW-2390719 Forward-Port-Of: odoo/odoo#63143
Original PR description
When trying to get the im_status of several partners, if one of them does not exist, it will return an error. To reproduce the error: 1. Go to Contacts 2. Open a contact 3. Action > Delete 4. Wait max 50 seconds => A Missing Record message is displayed. The im_status RPC includes the deleted partner's identifier and the server looks for it. Now, the server skips the missing identifiers. OPW-2390719 Forward-Port-Of: odoo/odoo#63143
This update fixes issues in the website editor so certain page elements are saved reliably and the language selector cannot be accidentally edited. This helps prevent unintended changes when users edit website pages.
Otherwise the user is stuck if she first creates the project and later she wants the corresponding analytic account to be multicompany. 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#63127 Forward-Port-Of: odoo/odoo#60770
Original PR description
Otherwise the user is stuck if she first creates the project and later she wants the corresponding analytic account to be multicompany. 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#63127 Forward-Port-Of: odoo/odoo#60770
If a RFQ/PO is created with a specific company, its number must be assigning using the sequence defined for that company with disregard to current environment company. E.g. This issue can easily arise when using aliases to create RFQ's. @ForgeFlow -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63125 Forward-Port-Of: odoo/odoo#62237
Original PR description
If a RFQ/PO is created with a specific company, its number must be assigning using the sequence defined for that company with disregard to current environment company. E.g. This issue can easily arise when using aliases to create RFQ's. @ForgeFlow -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63125 Forward-Port-Of: odoo/odoo#62237
…x rates Before, when only invoicing is installed (e.g. in case of the PoS), a not so easy to surpass error would be triggered when using products with a lower tax rate, e.g. drinks are only at 7% instead of 19%. Because there is a constraint, upon validation of the invoice, that the accounts used must correspond with the tax rate and you can not set a specific account in case of only invoicing, an error will be raised when you try to validate the generated invoice. We solve it by in
Original PR description
…x rates Before, when only invoicing is installed (e.g. in case of the PoS), a not so easy to surpass error would be triggered when using products with a lower tax rate, e.g. drinks are only at 7% instead of 19%. Because there is a constraint, upon validation of the invoice, that the accounts used must correspond with the tax rate and you can not set a specific account in case of only invoicing, an error will be raised when you try to validate the generated invoice. We solve it by inheriting the method searching for the product accounts and when no income/expense account on the product is set, but a tax is, to suggest the account corresponding to the tax and its rate. 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#62743
task-2415579 Forward-Port-Of: odoo/odoo#63196
Original PR description
task-2415579 Forward-Port-Of: odoo/odoo#63196
Issue - Create a Price list and set 'Discount Policy' as "Show public price & discount to the customer " - Create an SO - Add a multiple product with at least one with price unit = 0 - Change the pricelist and update prices Cause Division by zero when calculating discount. Solution Calculate discount only if there is a price_unit. opw-2393790 Forward-Port-Of: odoo/odoo#63180
Original PR description
Issue - Create a Price list and set 'Discount Policy' as "Show public price & discount to the customer " - Create an SO - Add a multiple product with at least one with price unit = 0 - Change the pricelist and update prices Cause Division by zero when calculating discount. Solution Calculate discount only if there is a price_unit. opw-2393790 Forward-Port-Of: odoo/odoo#63180
Related JW PR: https://github.com/odoo-dev/jabberwock/pull/496 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63162
Original PR description
Related JW PR: https://github.com/odoo-dev/jabberwock/pull/496 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63162
Thread search with `message_has_error` should only return threads containing messages with failure of which the current user is author. Follow up on https://github.com/odoo/odoo/pull/52403 that changed how sub-queries were built. The current fix using `_search` is a non-ideal solution until task-2366651 brings a new domain operator for this use case. task-2409543 Forward-Port-Of: odoo/odoo#62813
Original PR description
Thread search with `message_has_error` should only return threads containing messages with failure of which the current user is author. Follow up on https://github.com/odoo/odoo/pull/52403 that changed how sub-queries were built. The current fix using `_search` is a non-ideal solution until task-2366651 brings a new domain operator for this use case. task-2409543 Forward-Port-Of: odoo/odoo#62813
After an activity creation, if a user checks the activity's information, the creation date will be the current date. To reproduce the error: 1. Add an activity (e.g. a TODO activity) 2. In log notes, click on the activity's information icon => The "Created" field is actually the current date and not the activity's creation date. OPW-2412967 Forward-Port-Of: odoo/odoo#63211
Original PR description
After an activity creation, if a user checks the activity's information, the creation date will be the current date. To reproduce the error: 1. Add an activity (e.g. a TODO activity) 2. In log notes, click on the activity's information icon => The "Created" field is actually the current date and not the activity's creation date. OPW-2412967 Forward-Port-Of: odoo/odoo#63211
Without demo data Forward-Port-Of: odoo/odoo#63208
Original PR description
Without demo data Forward-Port-Of: odoo/odoo#63208
Forward-Port-Of: odoo/odoo#63150
Original PR description
Forward-Port-Of: odoo/odoo#63150
When you mark an crm.lead as "won" using the "mark as won" button, the user will be shown a rainbowman under certain conditions. Example: when you win your first lead. This commit fixes the controllers 'clean_action' method to allow returning an action with the 'effect' key, which is in turn picked up by the web client to display the rainbowman. At the same time, we add the tour that is testing the rainbowman of the crm app in the test suite, since it was missing and never actually ex
Original PR description
When you mark an crm.lead as "won" using the "mark as won" button, the user will be shown a rainbowman under certain conditions. Example: when you win your first lead. This commit fixes the controllers 'clean_action' method to allow returning an action with the 'effect' key, which is in turn picked up by the web client to display the rainbowman. At the same time, we add the tour that is testing the rainbowman of the crm app in the test suite, since it was missing and never actually executed by the CI. Some fixes were also necessary to make the test run properly. Task 2394745 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#62420
*Hopefully* fix the non deterministic runbot error. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63243
Original PR description
*Hopefully* fix the non deterministic runbot error. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63243
Updated from https://github.com/odoo/odoo/pull/61802 Jabberwock PR: odoo-dev/jabberwock#476 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63223
Original PR description
Updated from https://github.com/odoo/odoo/pull/61802 Jabberwock PR: odoo-dev/jabberwock#476 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63223
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#63260
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#63260
- Install stock - Create a Storable Product - Add an Attribute with Variant Creation Mode set to Instantly (i.e. Color) - On Product form, click on Variant smart button and open a Product Variant - Click on "Update Quantity" The Create button to edit Quantity on Hand is not present. This comes from the Variant smart button (id: product_variant_action) that adds 'create': False in the context to prevent creation of Variant. But when navigating to Update Quantity page, it is still in the
Original PR description
- Install stock - Create a Storable Product - Add an Attribute with Variant Creation Mode set to Instantly (i.e. Color) - On Product form, click on Variant smart button and open a Product Variant - Click on "Update Quantity" The Create button to edit Quantity on Hand is not present. This comes from the Variant smart button (id: product_variant_action) that adds 'create': False in the context to prevent creation of Variant. But when navigating to Update Quantity page, it is still in the context and hides the Create button. opw-2412380 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#63076
Configure the incomming mail server, use another mail client to send a message to Odoo with an EML file as attachment. The fetchmail server fails. Since the introduction of the new EmailMessage python API to encode/decode email messages, every EML attachment is automatically parsed into a EmailMessage. Task: 2329606 Forward-Port-Of: odoo/odoo#63191
Original PR description
Configure the incomming mail server, use another mail client to send a message to Odoo with an EML file as attachment. The fetchmail server fails. Since the introduction of the new EmailMessage python API to encode/decode email messages, every EML attachment is automatically parsed into a EmailMessage. Task: 2329606 Forward-Port-Of: odoo/odoo#63191
If an existing account journal was linked during the synchronization, the _bank_statement_creation_groupby_ field would be overridden regardless of its value before synchronization. Previously the field was changed to _monthly_ no matter what. Now the existing value is kept if it exists. Forward-Port-Of: odoo/enterprise#15269
Original PR description
If an existing account journal was linked during the synchronization, the _bank_statement_creation_groupby_ field would be overridden regardless of its value before synchronization. Previously the field was changed to _monthly_ no matter what. Now the existing value is kept if it exists. Forward-Port-Of: odoo/enterprise#15269
What are the steps to reproduce your issue ? 1. Install `documents` 2. Select a `workspace` and `label` in the list 3. Upload a document What is currently happening ? The document is uploaded with a workspace + label, but not showing it as when we select respective label/tag What are you expecting to happen ? Document is upload with a label How to fix the bug ? Specify the labels when creating the record via the controller opw-2411928 Forward-
Original PR description
What are the steps to reproduce your issue ?
1. Install `documents`
2. Select a `workspace` and `label` in the list
3. Upload a document
What is currently happening ?
The document is uploaded with a workspace + label, but not showing it as when we select respective label/tag
What are you expecting to happen ?
Document is upload with a label
How to fix the bug ?
Specify the labels when creating the record via the controller
opw-2411928
Forward-Port-Of: https://github.com/odoo/enterprise/pull/15216
Forward-Port-Of: odoo/enterprise#15246Without demo data Enterprise part of odoo/odoo#63208 Forward-Port-Of: odoo/enterprise#15249
Original PR description
Without demo data Enterprise part of odoo/odoo#63208 Forward-Port-Of: odoo/enterprise#15249
Before this commit, when a element has children, the "Touch Start" event is trigger even from the children. After this commit, the show function is only trigger when the event element has the class 'o_user_select_none'. This code is for specific case when a element with children has a tooltip. e.g.: The progress stage in a from view, this field is render in a dropdown menu on Mobile, so when the "Touch Start" event is trigger the show method is trigger. But if the user close the dro
Original PR description
Before this commit, when a element has children, the "Touch Start" event
is trigger even from the children.
After this commit, the show function is only trigger when the event
element has the class 'o_user_select_none'.
This code is for specific case when a element with children has a
tooltip.
e.g.:
The progress stage in a from view, this field is render in a
dropdown menu on Mobile, so when the "Touch Start" event is trigger
the show method is trigger. But if the user close the dropdown before
the end of the timer. An error will occur because the hide method will
be called for a hidden element.
Snippet from tooltip.js (Bootstrap)
```javascript
_proto.show = function show() {
var _this = this;
if ($(this.element).css('display') === 'none') {
throw new Error('Please use show on visible elements');
}
// ...
}
```
Forward-Port-Of: odoo/enterprise#15219
Forward-Port-Of: odoo/enterprise#15187When getting the intrastat report, if neither a product nor the product's category has an instrastat code, it will raise an error. To reproduce the error: 1. Set the company in an EU country, e.g. Belgium 2. Create a partner P in another EU country, e.g. Germany 3. Set a VAT number on the partner P 4. Create a product A 5. Do NOT set Intrastat Commodity Code on the product, or on the category, or on any ancestor catgories 6. Create an invoice for partner P with product A 7. Fill the
Original PR description
When getting the intrastat report, if neither a product nor the product's category has an instrastat code, it will raise an error. To reproduce the error: 1. Set the company in an EU country, e.g. Belgium 2. Create a partner P in another EU country, e.g. Germany 3. Set a VAT number on the partner P 4. Create a product A 5. Do NOT set Intrastat Commodity Code on the product, or on the category, or on any ancestor catgories 6. Create an invoice for partner P with product A 7. Fill the intrastat-related fields 8. Go to Accounting > Reporting > Intrastat Report => An error is raised. OPW-2415244 Forward-Port-Of: odoo/enterprise#15233
In a project, create two tasks with the same name, and create a timesheet entry for each of those tasks. Then go the the Timesheet app: it never loads itself. The issue came from the template: there is a t-foreach using the row's label as t-key. So, if two tasks have the same name, their rows have the same keys. Moreover, n the case of this specific view, each row has sub Components (widget="timesheet_uom"). The following happened when Owl tried to render the grid: - render the firs
Original PR description
In a project, create two tasks with the same name, and create a timesheet entry for each of those tasks. Then go the the Timesheet app: it never loads itself. The issue came from the template: there is a t-foreach using the row's label as t-key. So, if two tasks have the same name, their rows have the same keys. Moreover, n the case of this specific view, each row has sub Components (widget="timesheet_uom"). The following happened when Owl tried to render the grid: - render the first row and instantiate sub components - render the second row (with same t-key), destroy the previously instantiated components and re-instantiate them - wait forever for the first row (and its destroyed components) to finish. Task 2413371 Forward-Port-Of: odoo/enterprise#15229
Followup of 450095a3807b4 Missing a sudo in second browse How to reproduce: From LU report "Bilan (abrégé)", click on "VI. Résultat de l'exercice" action -> access right error Forward-Port-Of: odoo/enterprise#15231
Original PR description
Followup of 450095a3807b4 Missing a sudo in second browse How to reproduce: From LU report "Bilan (abrégé)", click on "VI. Résultat de l'exercice" action -> access right error Forward-Port-Of: odoo/enterprise#15231
Create an invoice Add the same product in 2 different lines - Prod Test, unit price 1, units 100 - Prod Test, unit price 0.5, units 10 - Select the option "Comercio Exterior" Save and Post User get: Error en complemento Comercio Exterior. [Error #CCE162] El atributo cce11:ComercioExterior:TotalUSD no coincide con la suma de ValorDolares de las mercancías. Folio: 7. Serie: INV/2020/. Suma de ValorDolares: 100.00. This occur because in the Comercio Exterior section the values are
Original PR description
Create an invoice Add the same product in 2 different lines - Prod Test, unit price 1, units 100 - Prod Test, unit price 0.5, units 10 - Select the option "Comercio Exterior" Save and Post User get: Error en complemento Comercio Exterior. [Error #CCE162] El atributo cce11:ComercioExterior:TotalUSD no coincide con la suma de ValorDolares de las mercancías. Folio: 7. Serie: INV/2020/. Suma de ValorDolares: 100.00. This occur because in the Comercio Exterior section the values are collected per product, but in case the product is present in 2 different lines only the first is considered. Nota: Error added on https://github.com/odoo/enterprise/commit/ce47791a02318ff830f60548e65c7502485198b0 opw-2372776 Forward-Port-Of: odoo/enterprise#15063 Forward-Port-Of: odoo/enterprise#14820