Daily updates from Odoo
Tuesday, February 4, 2020
11 changes · master
Resolved issues and error corrections
This fixes an issue where partners linked to a company could not be selected or opened unless the user had that company active. It also improves inter-company rules by separating accounting from sales and purchasing, so businesses can use the relevant automation without installing unnecessary apps.
Original PR description
The fact that there is a company id set means that you cannot select the partner in a M2o if you didn't select the company in the selector, and that you cannot open a document where that partner is set if you are not in the correct company. This is an issue for inter_company_rules, as you should be able to select the company to make a so, po or invoice to a company of the same database. 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 fix aligns account selection rules across accounting and purchasing so users see the appropriate accounts for products and categories. It also restores missing company-specific filtering, reducing the risk of choosing accounts from the wrong company in multi-company setups.
Original PR description
This started from noticing that purchase somewhat oddly *removes* a filter (internal_type='other') from a domain which is fairly rare. Looking at the file histories didn't yield anything of interest ("v9 accounting") but finally looking at the model revealed an additional multi-company filter missing from both views.
After consulting with @qdp-odoo, @sle-odoo and @lap-odoo, no good reason was found for the discrepancies:
* internal_type filter should probably always be there, unclear why it would get removed in purchase
* whoever added the multicompany filter *probably* missed that it would never be used because there was not one but two views overriding it (differently)
* sibling "income" field, as well as the corresponding fields on the product category, should match (though they were less incoherent).This fixes a purchasing issue where increasing a purchase order quantity could calculate the added stock incorrectly when returned items were linked to the order. The change helps ensure purchase updates create the right incoming stock movements and avoids confusion caused by returns.
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 cleans up outdated internal code patterns that were causing deprecation warnings during development and testing. It helps keep Odoo easier to maintain and better prepared for future dependency and platform updates, with little expected impact on day-to-day users.
Original PR description
@Julien00859 already made a pass on this at some point but there's a bunch of warnings either dynamic or from not the stdlib left over. Some of them can't really be fixed in-code and have been explicitly ignored instead: * `setuptools` uses the deprecated `imp` module until v41.6.0 * `zeep` uses defusedxml.lxml which was never intended to be a public / production API, not sure what to do there (cf mvantellingen/python-zeep#956) * there are a ton of invalid escapes in non-raw string literals, they're unlikely to ever be relevant so ignore them
Invoices that are marked as in payment will now show the outstanding credit widget. This helps accounting users apply available credits at the right stage, reducing confusion and avoiding missed credit allocations.
Original PR description
… in_payment -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a duplicate test module name in the stock app that could prevent one set of tests from running. It helps keep automated checks reliable, reducing the risk of unnoticed issues reaching users.
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
System notifications now show sender names with normal punctuation instead of visible web-safe codes. This makes message alerts easier to read, for example showing Bob's friend rather than Bob's friend, while preserving existing security handling for web content.
Original PR description
The title of notification is the author name escaped (for security reasons). https://github.com/odoo/odoo/blob/e3fa264d1053e0f0a5181da56f205cc05cc06316/addons/mail/static/src/js/services/mail_manager.js#L987-L989 When forwarded to the system notification, it does not need to be escaped though, as the system notification is not HTML based. Without this patch, a user named `Bob's friend` sending a message was creating a notification with the title `Bob's friend` Fixes odoo/odoo#24846 PS: PR targeting master as low issue and not worth to potentially break user's notifications for a corner case.
The project forecast Gantt view now organizes shifts by employee instead of user account. This prevents shifts for employees without linked user accounts from appearing as "Undefined User" and makes open and assigned shifts easier to understand.
Original PR description
PURPOSE 'Open Shifts' should be displayed and Once the shift is assigned, it should appear under the corresponding employee. SPECIFICATIONS In project current group by on Gantt view is on 'user_id' not by the employee_id so, when you change the employee and that employee is not linked with the user then it will display the 'Undefined User'. So, we change the group by on 'employee_id' so, in the Gantt view display the 'open shift' as well as display the corresponding 'employee' under the open shift. LINKS PR #8057 Task 2172834
This change removes deprecated internal calls and updates an outdated test method so the affected apps remain compatible with newer supporting libraries. It helps reduce future maintenance risk without changing day-to-day user workflows.
Original PR description
cf odoo/odoo#44164
The reconciliation screen now properly exits amount editing when users click away or press Enter, even if they did not change the value. This prevents the editing field from getting stuck and makes bank reconciliation smoother for accounting users.
Original PR description
…on widget Commit: https://github.com/odoo/enterprise/commit/a1f6cf1367d254a6515546599ac624a823916890 changed the event on input from keyup,blur to change which was wrong. Change event only trigger when an input value has changed, or in our case when we edit the amount of a line, we want the input to disappear when we click elsewhere or when we press enter and no change were made to the value. This commit fixes this by reintroducing the keyup and blur event.
The Gantt view now avoids a crash when users group records by date. This keeps the page usable in affected cases, although date-based grouping behavior remains limited and may need a fuller follow-up fix.
Original PR description
Date grouping is broken: wrong calls to read_group, _getFieldFormattedValue crashes because thee field_date:day field is not passed to _parseServerData and moreover the following logic in…
Date grouping is broken: wrong calls to read_group, _getFieldFormattedValue
crashes because thee field_date:day field is not passed to
_parseServerData and moreover the following logic in _generateRows
"return _.isEqual(record[groupedByField], subGroups[0][groupedByField]);"
won't ever work with the field_date:day (because 6th august 2019 won't
be equal to a datetime).
Note that it didn't work in v12 anyway, it didn't crash but the groups
did not make sens (all records were grouped in an "undefined" group).
Apparently the new gantt view uses read_group ONLY to handle the group_expand
option, to get empty groups. Maybe what we could do here is use a wrapper
of read_group (web_read_group already exists) and drop entirely the call to
search_read, or make web_read_group returns the ids of the grouped
records and match them with the parent group in generate rows and drop
the _.isEqual.
This commit simply ignore the field in groupBy containing a ':', which
is wrong and incomplete but at least doesn't traceback.
task-2036914