Daily updates from Odoo
Navigate
Branch
Friday, October 11, 2019
31 changes
New functionality added to Odoo
Adds a non-production sample module that documents recommended practices for handling records across multiple companies. It helps teams understand how to reduce data consistency issues in multi-company setups, but is intended as reference material rather than a user-facing feature.
Original PR description
Purpose ====== This multi-company sample module illustrates several coding principles that should be respected so that errors are minimized when users work in a multi-company environment. It show…
Purpose ====== This multi-company sample module illustrates several coding principles that should be respected so that errors are minimized when users work in a multi-company environment. It show several principles that should be shared accross most business flows: - sanity checks for consistency regarding relationnal fields that belong to other companies are done at every step of the business flow (and not through constraints) - models have coherent multi-company ir.rules - m2o fields towards company records are used as the master information holder when setting domains on relational fields that target models that may be company-restricted; they have sensible defaults depending on the expected usage of the model - line-type models whose company field is related on their parent should always store the related field to allow correct filtering - models should prevent changing the company on a record if it could break business flows for other users of the system - the 'force_company' context key is always set during company-sensitive CRUD operations since company-dependent fields must be read with the correct context to avoid faulty values These are guidelines and designed to brought attention to recurring problems when dealing with multi-company and that may get worse starting with Odoo 13 since multi-company has gotten a lot more permissive. These are not *laws* and you should obviously think intensely about how this applies to your module/flow. NOTE: this PR is not meant to be merged at any point, but should be used as a reference for the future doc and for the internal discussion regarding these guidelines. External comments are somewhat welcome if you find this, however please do not expect a lengthy discussion and debate - more like explanations, corrections of stuff that I may have gotten wrong and discussion of possible edge cases. Thx. Quid? ===== Interesting suggestions/questions raised during internal discussions - should we batch all multi methods per company? (sle) - should we raise if the context does not contain `force_company` when reading an `ìr.property`? (rim) Task 2041512
Enhancements to existing features
Visitors can now start preview quiz content without logging in first, reducing friction for prospective learners. They are asked to sign in, join, or buy the course only when they want to validate or view their answers.
Original PR description
Before this task, the user had to login to take a quiz.
After this task, the user can take to the quiz and the login to check his answers.
{Onboarding: no need to login before take a quiz}
SPECIFICATION
On a course content with a Quiz and the Preview activated,
allow the user (not logged or not attendee of the course)
to take the quiz but, checking the results, ask him to login.
If logged-in but not attendee of the course:
- If free: above the btn "Submit", add: Join the course and
- If Payment: above the "Buy the course" btn add: To validate your answers
task-id: 2045571
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe settings pages now use a mobile-friendly tab style consistent with other mobile views, making navigation easier on phones and tablets. The change also shares common code with the mobile kanban layout, which should make future maintenance more efficient.
Original PR description
With this commit, we apply the same style used by the mobile kanban view to the settings tabs. To made easier the code maintainability we create a Javascript mixin to allow the code sharing between these two cases.
The Timesheet Entries report is easier to read by separating project and task information into distinct columns. When all entries belong to one project, the report title now names that project and removes the redundant project column, reducing clutter for users reviewing timesheets.
Original PR description
Task:https://www.odoo.com/web#id=2027729&action=327&model=project.task&view_type=form&menu_id=4720 Pad: https://pad.odoo.com/p/r.b314b3cc84c3dca119342c6ae50162ef 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 Gantt day view header now includes the day of the week, making schedules easier to read at a glance. This helps users quickly understand which weekday a planned date falls on without checking a calendar.
Original PR description
After this commit, The header of the day in gantt view is changed from: (dd month yyyy) to (day of the week, month dd, yyyy) task- 2065406 pad link- https://pad.odoo.com/p/r.132fa170cf60bc507b33d948f56472c1
Resolved issues and error corrections
This update makes it easier to install and run Odoo on Windows with Python 3.7 by adjusting required third-party packages. It reduces setup failures around image, database, and system dependency packages, helping Windows users get a stable development environment more reliably.
Original PR description
11.0 improving requirements #### Description of the issue/feature this PR addresses: Improving requirements.txt in order to work when platform is 'win32' and python version is 3.7.x #### Current behavior before PR: Executing `pip install -r requirements.txt` the command line (git bash, but also cmd) returns a lot of errors, especially on `Pillow` package. When we execute `odoo-bin` command, we receive other errors due to missing `psycopg2` and other packages. #### Desired behavior after PR is merged: With this PR we have a stable environment, allowing other win32+python3.7 users to setup their environment without headache 😄 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38428 Forward-Port-Of: odoo/odoo#37745
Archived blog feeds now return a proper not found page instead of causing a server error. This avoids a poor visitor experience and makes the website behave more reliably when blog content is no longer active.
Original PR description
[FIX] website_blog: add missing website=True in feed Before this commit, if you archive a blog, you will have a 500 instead of 404. Serve page to show the 404 use request.website, so we need to force controller with website=True to bind website on the request. Probably need to check all controllers in website_* module. opw-2066725 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#38493 Forward-Port-Of: odoo/odoo#38415
The login page text for OAuth providers, such as "Log in with Google," can now be translated into other languages. This improves the experience for users accessing Odoo in non-English languages by showing clearer, localized login options.
Original PR description
[FIX] auth_oauth: enable translation of link text for oauth providers Description of the issue/feature this PR addresses: The OAuth login link texts are not translatable (e.g. `Log in with Google`) Current behavior before PR: One cannot translate the text `Log in with Google` into german. Desired behavior after PR is merged: The texts in the login screen /web/login can be translated Info @wt-io-it -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38426 Forward-Port-Of: odoo/odoo#38346
This update prevents the portal sharing flow from failing when expected context information is missing. It helps users avoid an unexpected error in edge cases while keeping normal sharing behavior unchanged.
Original PR description
[FIX] portal: avoid crashing if active_model or active_id not in context Forward-Port-Of: odoo/odoo#38458
This change removes an accounting field that was not properly calculated and did not appear to serve a useful purpose. This helps avoid potential errors or confusion in accounting setup without changing normal user workflows.
Original PR description
[FIX] account: remove uncomputed field The field `number_entries` should have a `_compute_number_entries` method defined on the model Since the field does not seem to make a lot of sense in here so remove the field Forward-Port-Of: odoo/odoo#38455
Date fields now respect each user language's configured first day of the week. This makes scheduling and date selection more consistent for users in regions where the week does not start on the default day.
Original PR description
[FIX] web: use language week_start in datepickers Before this rev., if the week_start param (the first day of week) of the user language was changed, it wasn't reflected on datepickers (however, it worked fine in the calendar view). This rev. makes this work by updating the moment locale with the corresponding param. Fixes #36450 Closes #36532 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38398 Forward-Port-Of: odoo/odoo#36531
The Windows installer display text was updated so it no longer shows the old 12.0 version. This prevents confusion for customers and partners installing the latest Odoo release on Windows.
Original PR description
[FIX] packaging: adapt Odoo version in windows installer Packaging oversight, the displayed version in the installer window was still 12.0. Forward-Port-Of: odoo/odoo#38451
This update fixes two Point of Sale issues: printed receipts no longer show an unwanted scrollbar, and employee-related user data is loaded correctly when POS HR is installed. This helps ensure cleaner customer receipts and more reliable POS behavior for staff workflows.
Original PR description
[FIX] point_of_sale, pos_hr: Fixes - When pos_hr was installed, `load_models` was called twice for res.users and calls to `load_fields` were not processed correctly. - A scrollbar appeared every time a receipt was printed. To fix this, we put a height of 0 to the div that contains the receipt. html2canvas then had trouble computing the height of the background. There's a height option that can be given to the library but if the logo on the receipt was not loaded yet, the size we computed was wrong. We then compute the height only once the images have been loaded, in the onparsed method. We also remove a CSS class that wasn't used anymore. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38374
This update renames an accounting report field label to make invoices easier to understand for users. It improves usability and translation consistency without changing accounting behavior or business workflows.
Original PR description
[FIX] account, usability: field label renaming 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#38430
Restores the “View accounts detail” button in the accounting partner view so users can access account details as expected. This fixes a missing interface action and helps accounting users navigate customer or vendor account information without disruption.
Original PR description
[FIX] account: restore "View accounts detail" button -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38413
Sales and purchase orders that use year-based numbering will now use the order date, not the current date, when generating their reference number. This prevents orders entered for a different year from receiving an incorrect year in their number, improving accuracy in records and reporting.
Original PR description
[IMP] purchase,sale: Take into account order date for sequence Version of #28921 for upcoming v13 **Steps to reproduce** * Define "Sales Order" sequence for using date ranges checking "Use subsequences per date_range". * Change sequence prefix to "SO/%(year)s/". * Create a sales order with order date in 2019 (a different year than current one). **Current behavior** Got a sales order with 2018 (current year) number. **Expected behavior** Got a sales order with 2019 number. 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 cc @Tecnativa Forward-Port-Of: odoo/odoo#37762
This update prevents website visitors from seeing an error page when changing the site language. It resolves a database update conflict in visitor tracking, making multilingual website browsing more reliable.
Original PR description
[FIX] website: fix _update_visitor_last_visit concurrency issues Install the website, install a second language. Switch the language on the website: error 500. The function opened a new cursor, to update website_visitor. It did so at the end of the query dispatch. However when switching the language of the website, the lang is written on the website visitor. This is done at the flush, done at the end (exit) of the query. This is done on the cursor that was used for all the transaction. Therefore that write would systemically fail on a ERROR: could not serialize access due to concurrent update opw 2080986 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#38372
Mailing popups now appear centered and with the correct styling when edited in the backend. This prevents the popup from being hidden under editing controls, making campaign setup easier and less confusing.
Original PR description
[FIX] website_mass_mailing, *: fix display of backend popup edition * web_editor, website In the backend, when a mailing popup was being edited, it was not centered in the edition area (and went under the editor UI) and was not using the correct style. task-2083465 Forward-Port-Of: odoo/odoo#38421
Copying a product variant now duplicates the underlying product template instead of the variant itself, because variants are automatically generated from template settings. This prevents inconsistent product data and makes duplicate product creation behave more predictably.
Original PR description
[MERGE][FIX] product: make copy of variants just copy template Variants are generated depending on the configuration of attributes and values on the template, so copying them does not make sense. For convenience the template is copied instead and its first variant is returned. closes #38151 Forward-Port-Of: odoo/odoo#38303
This fixes an accounting issue that prevented users from deleting payment terms after an internal field name changed. Businesses can now manage and clean up payment terms without being blocked by an incorrect reference.
Original PR description
[FIX] account: Use correct field in domain Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/38308 Current behavior before PR: payment_term_id has been replaced by invoice_payment_term_id Desired behavior after PR is merged: Able to delete Payment terms -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38309
Duplicating an eLearning course or slide channel will no longer carry over its existing members. This prevents accidental enrollment of people into copied courses and keeps membership lists accurate.
Original PR description
[FIX] website_slides: Do not copy Members on duplicate Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/38230 Current behavior before PR: On Duplicate, Members are also copied Desired behavior after PR is merged: Members should not be copied for obvious reason. Cc @tde-banana-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38368 Forward-Port-Of: odoo/odoo#38235
This update corrects how Chilean accounting document types are selected, helping ensure the right document options appear during invoicing or accounting workflows. It reduces the risk of choosing incorrect document types for Chilean localization processes.
Original PR description
[FIX] l10n_cl: fixed wrong domain getting document types 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#37846
The online shop now hides the recently viewed products area when there are no items to show. It also removes the final viewed product properly after it is added to the cart, avoiding stale or misleading product displays.
Original PR description
[FIX] website_sale: fix viewed product add cart If there is no product in the recently viewed product snippet it will be hidden with a smooth transition. Fix the last product that remained in snippet even if added to cart. task-2076271 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#37371
Duplicating a recruitment record no longer carries over the linked employee. This avoids accidental connections between a copied recruitment entry and the wrong employee, keeping HR recruitment data cleaner.
Original PR description
[FIX] hr_recruitment: Do not copy employee on duplicate Description of the issue/feature this PR addresses: When recruitment is duplicated, `emp_id` should not be copied for obvious reason. Current behavior before PR: Desired behavior after PR is merged: Cc @RomainLibert @tivisse -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38136
This fix prevents calendar notifications from crashing when a user's selected language is inactive or missing date and time formats. The calendar now falls back to an active appropriate language, keeping page loads stable for affected users.
Original PR description
[FIX] calendar: handle inactive system language or missing date format It is possible to select "System (English)" as chosen language, or False in v12 or earlier versions. However, if the language has not been activated, then record_lang is an empty recordset, so record_lang.date_format is False, (respectively time_format), and so the formatting crashes. In principle there is a default, but it did not assume that lang could be set but without a date_format. By slightly rewriting it, it also handles this case. Note that if this happens, the calendar notification mechanism generates a crash at each page load. 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#38357 Forward-Port-Of: odoo/odoo#38286
This fix makes Factur-X invoice processing handle PDF attachments more reliably, including files with uppercase PDF extensions and attachments that may not include all optional fields. It reduces avoidable errors and log warnings when processing supplier invoices or emailed documents.
Original PR description
Forward Port of #37719 to 13.0 [FIX] account_facturx: handle attachment both as records and as named tuples The attachment of a mail can be either a named tuple or an Odoo record. In the second case, it has more attributes such as a mimetype. In the first case, the mimetype should be guessed from the content. We clean up to use the helper functions in all cases. opw 2075933 Forward-Port-Of: #37719 Forward-Port-Of: odoo/odoo#38164
Point of Sale sessions connected to payment terminals now wait properly for balance checks before closing, find and print the related receipt correctly, and recover from balance errors such as connection issues. This prevents closing failures, unexpected error screens, and terminal driver crashes that could interrupt store operations.
Original PR description
[FIX] pos_iot: Payment terminals fixes - When closing a session, if a payment terminal is connected, a Balance operation is performed. We didn't wait correctly for the balance to be over before closing the session. - When closing a PoS session connected to a payment terminal, we perform a balance operation and a receipt is printed. The selector used to retrieve the receipt has been changed is point_of_sale but wasn't changed here. The receipt was then not found and there was a traceback. Since the code is now stable the view itself cannot be modified so the new class is added dynamically. - If an error happened during the balance operation (e.g. due to a connection problem) an exception was raised but never caught, making the whole thread of the driver crash and the terminal couldn't be used anymore. We now catch this exception. Forward-Port-Of: odoo/enterprise#6018
The IoT Box overview now opens a device list filtered to the selected box, so users no longer see unrelated devices. The device list is also easier to review because devices are grouped by type, and empty manufacturer information is hidden.
Original PR description
The kanban view of IoT Boxes has an icon to redirect to the list of devices connected to this box. The filter didn't work and we were seeing all devices.
Odoo Studio no longer offers the priority shortcut when a priority field is already present on a Kanban card. This prevents users from accidentally adding the same priority field twice, avoiding layout or configuration issues.
Original PR description
[web_studio] fix issue of priority hook Pad: https://pad.odoo.com/p/r.976c1d22bd62746183a2ec807a6b1c47 Task: https://www.odoo.com/web#id=2071654&action=327&model=project.task&view_type=form&menu_id=4720 Forward-Port-Of: odoo/enterprise#5931
The Helpdesk dashboard now handles SLA deadline times correctly for users working in languages such as French. This prevents dashboard errors or incorrect SLA status checks caused by localized date formatting differences.
Original PR description
[FIX] helpdesk: Wrong datetime format in retrieve_dashboard The datetime returned by read_group is formated with babel. Let's consider a ticket with SLA deadline equal to 14/10/2019 13:00 assigned to a user in French. So when making a read_group in an other language than en_US, the group made with 'sla_deadline:hour' was like 13:00 14 oct. (with babel) instead of 13:00 14 oct (the format expected by datetime with '%I:%M %d %b' in function _is_sla_failed). opw:2082495 Forward-Port-Of: odoo/enterprise#6033
Miscellaneous changes
[FIX] hr_appraisal: remove typo Remove zboub from .pot to avoid trying to translate it Forward-Port-Of: odoo/enterprise#6012
Original PR description
[FIX] hr_appraisal: remove typo Remove zboub from .pot to avoid trying to translate it Forward-Port-Of: odoo/enterprise#6012