Daily updates from Odoo
Friday, November 29, 2019
9 changes · master
Enhancements to existing features
The sales margin app now calculates product cost as a computed value, making margin information more consistent and easier to maintain. The change also cleans up related sales code, reducing complexity and supporting more reliable margin reporting.
Original PR description
And clean the code mess. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Automated actions that are scheduled to run later will now be checked more frequently based on the next pending action, rather than waiting up to four hours. This reduces delays and helps time-sensitive business rules execute closer to when they are expected.
Original PR description
The current 'Base Action Rule: check and execute' CRON search every four hours for delayed actions to run. This mean, any action scheduled later can be delayed up to four hours. We now dynamically reset the CRON frequency according to the least delayed automated action to minimize the potential gap. Task: 1998809
Discuss now shows an out-of-office ribbon at the top of conversations when relevant, making user availability clearer directly in chat. This helps colleagues understand delayed responses without leaving the conversation.
Original PR description
Task:https://www.odoo.com/web#id=2066672&action=333&active_id=1251&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.10a0bff2f37a00cc5a5618afa34797e7 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Reports can now include a customer's VAT number in contact information, making documents clearer and more complete for business use. The report editor also improves address formatting by offering a dropdown of common separator styles, such as line breaks, commas, dashes, bars, and slashes.
Original PR description
task - https://www.odoo.com/web#id=1904639&action=327&model=project.task&view_type=form&menu_id=4720 pad - https://pad.odoo.com/p/r.f757a193f55405fd6ba9a521aa3ead5b For better report understanding and sufficient information to convey, 'VAT' field is added in 'Display fields' option. And labels are also updated. For better usability, 'address separator' is a dropdown with the following options: 'Linebreak', 'Comma', 'Dash', 'Vertical bar', and 'Slash'.
Social media connection pages now show a proper error page when something goes wrong instead of displaying unclear text. This helps users understand the issue and guides them back to the Social app to continue their work.
Original PR description
Purpose ======= Clean social controllers to properly raise errors instead of returning random strings. Information =========== If an error occurs, we render the template ``social.social_http_error_view`` This template show the error message and ask the user to return to the social application. Task #2079126
Belgian payroll salary packages now separate train transportation from other public transportation, with each reimbursement calculated using the correct percentage and limits. This improves employee salary package accuracy and ensures public transport benefits are reflected correctly in wages, net pay, and payslips.
Original PR description
We should add a check box and rename the existing one to get: - "Train Transportation" - the employee select an amount - Odoo compute 80% of this amount - impact this on the wage and net (like "obonnement social") - "Other Public transportation" - the employee select an amount - Odoo compute 71.8% of this amount with a limit of - impact this on the wage and net (like "obonnement social") For both adapt the salary package TASK-ID: 2088278
The report editor now makes address blocks easier to configure by offering clear separator choices and a simpler list of display fields, including VAT. These changes help users create clearer, more consistent business reports with less manual setup.
Original PR description
task - https://www.odoo.com/web#id=1904639&action=327&model=project.task&view_type=form&menu_id=4720 pad - https://pad.odoo.com/p/r.f757a193f55405fd6ba9a521aa3ead5b - For better usability, there should be options for address separator, for this purpose, drop down with options like: 'Line break', 'Space', 'Comma', 'Dash', 'Vertical bar', and 'Slash' have been added and default option is 'Line break'. - For better report understanding and sufficient information to convey, 'VAT' field is added in 'Display fields' option. And labels are also updated. - For better user interface , 'Display fields' design property has been improved. - Due to changes in 'displayed fields' labels, and also adding a 'VAT' field, test case for 'contact: many2many_select' has been updated. And adding options in 'address separator', new test case has been added.
Resolved issues and error corrections
Timesheet entry fields now keep the correct company-related filters instead of having them overwritten by automatic field changes. This helps users see and select the right projects or analytic accounts for their company, reducing incorrect entries.
Original PR description
Fixes a bug where `('company_id', '=', company_id)` would pretty much immediately get replaced by the domains from the onchange, so was essentially useless. The conditional could be replicated in two…
Fixes a bug where `('company_id', '=', company_id)` would pretty much immediately get replaced by the domains from the onchange, so was essentially useless.
The conditional could be replicated in two ways: one would be to use a python-level conditional expression:
a if cond else b
this is easier for users to interpret, but harder to analyze: python expressions are currently opaque to view analysis (and probably the eventual domain edition).
The alternative here is to leverage domain simplification:
(OR (= (not cond) 1) section)
if `cond` is true becomes
(OR (= 0 1) section)
and thus `section` itself, while if `cond` is false it becomes
(OR (= 1 1) section)
and thus `true` (so the section doesn't apply).
It works OK though the inversion of the condition itself is a bit bizarre.
And in this specific case since we need both branches the negated condition requires explicitly converting the condition to a boolean if it might not be one: the expression compiler recognizes specifically `(= 0 1)` and `(= 1 1)` (`(= False 1)` and `(= True 1)` also work for Python reasons).
Task 2115472
Also the fix on analytic_account_id is the sort of reasons why we'd want the ability to *edit* domans rather than just replace them.Calendar entries now keep their start and end times separate when events are edited, preventing incorrect end times from appearing. This also avoids related crashes in Planning, improving reliability for users who manage schedules.
Original PR description
Fixes the way record end hours are computed in calendar views. Before this commit: objects `record start` and `record end` properties being copied by reference and being incorrectly rewritten by other functions. This caused incorrect end hour computations (and a SQL crash in the Planning app). Now, objects are copied by value and don't interfere with each other. Task 2072961