Daily updates from Odoo
Navigate
Branch
Monday, January 20, 2020
21 changes
Enhancements to existing features
Clicking a digital attachment card on a product no longer opens the attachment form view. This prevents users from being taken to an unintended technical screen while keeping attachment form access available in appropriate administration areas.
Original PR description
Description of the issue/feature this PR addresses: disable opening the form view by clicking on the card Current behavior before PR: by clicking on the attachment kanban card it opens the form view. Desired behavior after PR is merged: will not open the form view while clicking on the attachment kanban card. Task: https://www.odoo.com/web#id=2036246&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.32fb555f7fe3ae3eea5b1b8093111437 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now more easily find products and partners that are related to subcontracting. This improves day-to-day navigation and helps teams identify the right subcontracting records faster.
Original PR description
Task: https://www.odoo.com/web?#id=2158126&action=327&model=project.task&view_type=form&menu_id=4720 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
This fixes an issue in restaurant point of sale where card terminal payment details could be lost after returning to the floor plan. Keeping this information prevents already validated payments from being treated as unpaid or unprocessed, reducing payment confusion for staff and customers.
Original PR description
Payment information for terminal transactions (payment_status, transaction_id & card_type) was lost when going back to the floor plan in pos_restaurant. Validated transactions were then considered as not processed yet. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix removes an unnecessary link between the Sales Timesheet Enterprise module and Helpdesk. It helps keep installations cleaner by avoiding a dependency on Helpdesk when that app is not needed.
Original PR description
Sale timesheet enterprise doesn't depend of helpdesk, so remove inherit of helpdesk team.
Code cleanup and technical improvements
This update mainly cleans and reorganizes stock inventory code by removing unused pieces and aligning it with Odoo coding guidelines, which should make future maintenance safer and faster. It also makes the Post Inventory button visible to manufacturing users outside debug mode, improving day-to-day access for production workflows.
Original PR description
[REF] stock: move line: some guidelines - move all the constrains at the same place, make sure they are private - move all the onchanges at the same place, make sure they are private - move `_get_similar_move_lines` helper at the bottom of the file with the other helpers [REF] stock: clean imports Clean imports of the main stock module: - Remove unsued import - Follow odoo guidelines - Sort them [REM] stock: remove dead-code Remove dead code of the main stock module: - Unused actions - Unused private methods - Unused helper methods test
This update removes duplicate website-side error handling because the shared crash manager now handles those issues consistently. It reduces unnecessary code and helps keep frontend error reporting simpler and easier to maintain.
The website editor now ignores visibility dependencies that do not exist for the current snippet, instead of hiding the option. This makes shared editor options easier to reuse across different snippets while still allowing special behavior for specific snippets.
Original PR description
Left panel widgets can define the widgets they depend on to be visible. Up to now, if such a dependency was defined but that the related widget was not found, the dependency was considered as not met. Now, it acts as if that particular dependency was not defined at all. This is useful for controlling the visibility of a generic option in the case of a specific snippet without having to duplicate and restrict that generic option. E.g. There is a generic "color" option on all snippets. For my snippet "hello" I only want that generic "color" option to be visible if my "world" option is enabled. I then add `data-dependencies="world"` on the generic "color" option. In the case, any other snippet than "hello" is used, since the "world" option does not exist there, the "color" option acts as if it had no dependency.
Miscellaneous changes
Get in log wrong xpath to help developer to fix it. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43542
Original PR description
Get in log wrong xpath to help developer to fix it. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43542
We optimize the search on domains like `[('line_ids', 'in', ids)]`. The condition is rewritten `('id', 'in', ids1)` where `ids1` is the result of SELECT <many2one_field> FROM <comodel_table> WHERE id IN <ids> The issue is that the latter potentially returns many duplicate values. The fix consists in removing duplicates from `ids1`. Note that domains like `[('line_ids.foo', '=', 42)]` implicitly benefit from the optimization, as they are rewritten as the one above with ids
Original PR description
We optimize the search on domains like `[('line_ids', 'in', ids)]`.
The condition is rewritten `('id', 'in', ids1)` where `ids1` is the
result of
SELECT <many2one_field> FROM <comodel_table> WHERE id IN <ids>
The issue is that the latter potentially returns many duplicate values.
The fix consists in removing duplicates from `ids1`.
Note that domains like `[('line_ids.foo', '=', 42)]` implicitly benefit
from the optimization, as they are rewritten as the one above with
ids = comodel.search([('foo', '=', 42)]).ids
Forward-Port-Of: odoo/odoo#43026This was incorrectly reverted during 116057b26e71db4692280463669f3e80d813ddcc Forward-Port-Of: odoo/odoo#43556
Original PR description
This was incorrectly reverted during 116057b26e71db4692280463669f3e80d813ddcc Forward-Port-Of: odoo/odoo#43556
Create multiple tax and assign them to the same tax group. Create an invoice, with two lines, each one with one tax of the group. Save and click on "Preview" or print invoice. The tax group will be reported applied on just the first line This append because of 4d62a94a31c3967bfd34396a3448a3e925422634. Reverting commit to restore the former behavior in which the tax base amount is added for every line in which the tax group component is found. While this other behavior could be an issue
Original PR description
Create multiple tax and assign them to the same tax group. Create an invoice, with two lines, each one with one tax of the group. Save and click on "Preview" or print invoice. The tax group will be reported applied on just the first line This append because of 4d62a94a31c3967bfd34396a3448a3e925422634. Reverting commit to restore the former behavior in which the tax base amount is added for every line in which the tax group component is found. While this other behavior could be an issue for some user the behavior is more consistent accounting-wise and the template could easily be changed to adapt to user needs. opw-2170069 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43254
Unfortunately caught in a really wide try/except clause where it was completely silenced, causing a lot of stuff to be archived instead of deleted. Forward-Port-Of: odoo/odoo#43531
Original PR description
Unfortunately caught in a really wide try/except clause where it was completely silenced, causing a lot of stuff to be archived instead of deleted. Forward-Port-Of: odoo/odoo#43531
- In general settings: - Sales: - Activate discount - Activate Multiple Sale Prices with option computed from formula - Point of sale: - Activate Multiple Sale Prices with option computed from formula - Accounting: - Set show price tax-included - Modify the Public Pricelist: Set to Global, price discount 50% - Modify the sale tax to be included in price - Create a 0% tax included in price - Open fiscal position: Set auto-detect, replace sale
Original PR description
- In general settings: - Sales: - Activate discount - Activate Multiple Sale Prices with option computed from formula - Point of sale: - Activate Multiple Sale Prices with option computed from…
- In general settings:
- Sales:
- Activate discount
- Activate Multiple Sale Prices with option computed from formula
- Point of sale:
- Activate Multiple Sale Prices with option computed from formula
- Accounting:
- Set show price tax-included
- Modify the Public Pricelist: Set to Global, price discount 50%
- Modify the sale tax to be included in price
- Create a 0% tax included in price
- Open fiscal position: Set auto-detect, replace sale 15% by 0%
- Open a product and set customer tax to sale 15%
- Open POS session configuration
- Set fiscal position, tax included in price and public pricelist
- Add product "Pedal Bin"
You will see in strikethough text the original selling price with tax included,
while taxes should have been removed from the tax mapping.
Note that this is purely aesthetical, the total amount calculated is correct.
Fixing by calculating the price from the original selling price.
opw-2155779
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#43259
Forward-Port-Of: odoo/odoo#43112Install Projects, documents, calendar, website, crm. Under Settings enable "File Centralization" Now go to Projects, enter in a Task, click on "schedule activity". On the activity form under "Activity Type" choose Meeting, click on "Open Calendar" button. Choose a slot, edit the event, add a contact type individual, save Error will popup. This is caused by the whole flow of creating a new document for the invitation.ics generated for the meetings which has to be sent via email but get
Original PR description
Install Projects, documents, calendar, website, crm. Under Settings enable "File Centralization" Now go to Projects, enter in a Task, click on "schedule activity". On the activity form under "Activity Type" choose Meeting, click on "Open Calendar" button. Choose a slot, edit the event, add a contact type individual, save Error will popup. This is caused by the whole flow of creating a new document for the invitation.ics generated for the meetings which has to be sent via email but get detected as an attachment to be sent into the document app as well. Disabling the document creation since it is not a relevant attachment opw-2150770 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#43341
Do not crash if the commercial partner doesn't have a name. opw-2158809 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#43391 Forward-Port-Of: odoo/odoo#43338
Original PR description
Do not crash if the commercial partner doesn't have a name. opw-2158809 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#43391 Forward-Port-Of: odoo/odoo#43338
As Mitchell Admin: - Install Leaves - General Settings > Multi Company - Create companies A (YourCompany) and B - Mitchell Admin should be an employee of A, not B - Switch to company B - Go to Leaves > Managers > All > Allocations An AccessError is raised in `_compute_number_of_hours_display` because we try to access `employee_id.resource_calendar_id.hours_per_day`. After this AccessError is solved, several others are raised when accessing a record. They are solved in this commit.
Original PR description
As Mitchell Admin: - Install Leaves - General Settings > Multi Company - Create companies A (YourCompany) and B - Mitchell Admin should be an employee of A, not B - Switch to company B - Go to Leaves > Managers > All > Allocations An AccessError is raised in `_compute_number_of_hours_display` because we try to access `employee_id.resource_calendar_id.hours_per_day`. After this AccessError is solved, several others are raised when accessing a record. They are solved in this commit. opw-2160542 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#43509 Forward-Port-Of: odoo/odoo#43485
Forward-Port-Of: odoo/enterprise#7800
Original PR description
Forward-Port-Of: odoo/enterprise#7800
opw-2171175 The type of the journal was the oposite of what it needed to be (sale instead of purchase and vice versa) on the invoice created in the other company. The default_get for the journal was executed in the new() function, without the default_type set in the context. This cause the value for journal_id to be set in the create values, and it wasn't recomputed at the real create. To fix this, we have to add the default_type in the context when new() is executed. Forward-Port-Of
Original PR description
opw-2171175 The type of the journal was the oposite of what it needed to be (sale instead of purchase and vice versa) on the invoice created in the other company. The default_get for the journal was executed in the new() function, without the default_type set in the context. This cause the value for journal_id to be set in the create values, and it wasn't recomputed at the real create. To fix this, we have to add the default_type in the context when new() is executed. Forward-Port-Of: odoo/enterprise#7797
### Issue - Install Invoicing & Studio - Open Invoices report in Studio - Click on something > Visibility condition - Do any string ilike "x" for example Traceback ### Cause The visibility condition is... a condition, domain special words' are not supported. ### Solution Limit operators, like here: https://github.com/odoo/enterprise/blob/70fc1a41aba990e305990187cd34a00cec1db5bb/web_studio/static/src/js/views/view_editor_sidebar.js#L585 And it is handled here: https://g
Original PR description
### Issue - Install Invoicing & Studio - Open Invoices report in Studio - Click on something > Visibility condition - Do any string ilike "x" for example Traceback ### Cause The visibility condition is... a condition, domain special words' are not supported. ### Solution Limit operators, like here: https://github.com/odoo/enterprise/blob/70fc1a41aba990e305990187cd34a00cec1db5bb/web_studio/static/src/js/views/view_editor_sidebar.js#L585 And it is handled here: https://github.com/odoo/odoo/blob/13.0/addons/web/static/src/js/widgets/domain_selector.js#L903:#L905 **OPW-2162357** Forward-Port-Of: odoo/enterprise#7746 Forward-Port-Of: odoo/enterprise#7742
- Create a BOM for 'Customizable Desk' Do not choose a variant Set the routing 'Primary Assembly' - Click on 'Primary Assembly', then 'Steps' - Create a step - Choose as product the 'Customizable Desk' A 'Product Variant' is set while no variant has a BOM with the routing selected. This is confusing for the users: they see a product selected, but if they remove it or try to change it, the list is empty. The selection of product should be adapted to the domain set with `_onch
Original PR description
- Create a BOM for 'Customizable Desk' Do not choose a variant Set the routing 'Primary Assembly' - Click on 'Primary Assembly', then 'Steps' - Create a step - Choose as product the 'Customizable Desk' A 'Product Variant' is set while no variant has a BOM with the routing selected. This is confusing for the users: they see a product selected, but if they remove it or try to change it, the list is empty. The selection of product should be adapted to the domain set with `_onchange_product`. opw-2165638 Forward-Port-Of: odoo/enterprise#7674 Forward-Port-Of: odoo/enterprise#7657
[FIX] l10n_de_reports: incorrect datev main account In the case of invoices, before this commit, the l10n_de_datev_main_account_id field wasn't correctly filled with the account of the invoice. This happens because, as we are creating the move record the link to the invoice is not yet created. Now, the invoice account is correctly filled into the l10n_de_datev_main_account_id field. ----------------------------------------------------------------------------- [FIX] l10n_de_report
Original PR description
[FIX] l10n_de_reports: incorrect datev main account In the case of invoices, before this commit, the l10n_de_datev_main_account_id field wasn't correctly filled with the account of the invoice. This…
[FIX] l10n_de_reports: incorrect datev main account In the case of invoices, before this commit, the l10n_de_datev_main_account_id field wasn't correctly filled with the account of the invoice. This happens because, as we are creating the move record the link to the invoice is not yet created. Now, the invoice account is correctly filled into the l10n_de_datev_main_account_id field. ----------------------------------------------------------------------------- [FIX] l10n_de_reports: sollhaben column when an invoice have negative lines In the case of an invoice with a negative line, the 'sollhaben' column in the report wasn't correctly filled. Note that, this column should indicate if the line is debit or credit. Before this commit, this column was computed based only on the sign of the first line of the move of the invoice, creating an error if this line was a negative one in an invoice. opw-2153973 Forward-Port-Of: odoo/enterprise#7768 Forward-Port-Of: odoo/enterprise#7685