Thursday, February 3, 2022
11 changes · master
Enhancements to existing features
Odoo’s core page and report templating engine was consolidated and better documented, making it easier for developers to maintain and troubleshoot. This should improve long-term reliability and performance visibility for features that generate web pages, emails, and reports, with limited direct impact on daily users.
Original PR description
[IMP] IrQweb: merge Qweb engine file qweb.py and ir_qweb.py and add doc QWeb is the primary templating engine used by Odoo. It is an XML templating engine and used mostly to generate XML, HTML…
[IMP] IrQweb: merge Qweb engine file qweb.py and ir_qweb.py and add doc
QWeb is the primary templating engine used by Odoo. It is an XML
templating engine and used mostly to generate XML, HTML fragments and
pages.
To create new XML template, please see QWeb Templates documentation <https://www.odoo.com/documentation/15.0/developer/reference/frontend/qweb.html>
In **input** you have an XML template giving the corresponding input
etree. Each etree input nodes are used to generate a python function.
This fonction is called and will give the XML **output**.
The ``_compile`` method is responsible to generate the function from the
etree, that function is a python generator that yield one output line at a
time. This generator is consumed by ``_render``. The generated function is
orm cached.
In the graphic below you can see theresume of the call of the methods
performed in the IrQweb class.
Odoo
┗━► _render (returns MarkupSafe)
┗━► _compile (returns function) ◄━━━━━━━━━┓
┗━► _compile_node (returns code string array) ◄━━━━━━━┓ ┃
┃ (add technical directives: t-inner-content, t-tag) ┃ ┃
┣━► _directives_eval_order (defined directive order) ┃ ┃
┃ ┃ ┃
┣━► _compile_directives (recursive) ◄━━━━┓ ┃ ┃
┃ ┣━► _compile_directive ┃ ┃ ┃
┃ ┃ ┗━► t-if ━━► _compile_directive_if ━┫ ┃ ┃
┃ ┃ ┗━► t-foreach ━━► _compile_directive_foreach ━┛ ┃ ┃
┃ ┃ ┗━► t-* ━━► ... ┃ ┃
┃ ┃ ┗━► t-inner-content ━━► _compile_directive_inner_content ◄━━━━┓ ━┛ ┃
┃ ┃ ┗━► t-tag ━━► _compile_directive_tag ━┫ ┃
┃ ┃ ┗━► t-call ━━► _compile_directive_call ━┫ ━━━┛
┃ ┃ ┗━► t-out ━━► _compile_directive_out ◄━┓ ━┫
┃ ┃ ┗━► t-field ━━► _compile_directive_field ━┛ ┃
┃ ┃ ┃
┗━━┻━► _compile_static_node ━┛Account creation can now be guided so users only see the account types relevant to the task they are performing. This helps reduce mistakes during accounting setup and keeps account data more consistent.
Original PR description
Users are able to create accounts without restriction on the type of account to be created. With this commit we provide a context key to limit available account types and thus minimise errors. part of task-2684816
Delivery carriers can now support shipping insurance for parcels that may be lost, stolen, or damaged in transit. This brings a common carrier service into the standard delivery app, making it easier to offer consistent insured shipping options.
Original PR description
Shipping insurance is a service which may reimburse senders whose parcels are lost, stolen, and/or damaged in transit. Since most shipping connectors provide it, it makes sense to put it in the base directory. task-2701459
The mail app now keeps track of the user's browser when managing messaging behavior such as notifications and message-related views. This helps make communication features more consistent and reliable across browser sessions.
Expense receipts uploaded for OCR now appear more clearly in the expenses list while they are being processed, and processing is triggered sooner after upload. The update also removes redundant attachment messages and fixes an issue when OCR cannot detect a currency in multi-currency setups.
Original PR description
task - 2687999
Asset-related purchase selections now show only journal items and accounts that match the asset, deferred revenue, or deferred expense being configured. This helps users choose the correct records faster and reduces accounting setup mistakes from using irrelevant account types.
Original PR description
Only include journal items which may be relevant when selecting a related purchase of an asset task-2684816
Resolved issues and error corrections
Public and portal visitors can now access event ticket information where existing rules already allow it. This prevents website event pages and single app builds from crashing when ticket descriptions are loaded.
Original PR description
There isn't `ir.model.access` on `event.event.ticket` for public and portal users, but there is already the `ir.rule` to check the access. It causes an issue now because, since https://github.com/odoo/odoo/pull/82896, the `description` field of `event.event.ticket` isn't prefetch anymore by the sudoed `event_registrations_open` compute (that fill the cache with ticket data in sudo). It crashes single app build: https://runbot.odoo.com/runbot/build/12473674
Code cleanup and technical improvements
Starting a manufacturing work order will no longer automatically suggest producing the full manufacturing order quantity. This helps operators notice when an earlier step produced less than planned, reducing the risk of carrying forward an incorrect quantity.
Original PR description
In 9f7e6d2bb6ae0a6b0257edf26a5aa069cd00d78e , when start a workorder, we always suggest the qty to produce to be the full qty to produce on MO. If the previous WO produced less than the full qty to produce on MO, user won't aware of that when start the WO. We revert it in this committ Task-2678388 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue that could block or incorrectly validate new bank account setup in the accounting wizard. Company bank accounts can now be linked to the expected journal even when the related company partner has no company set, reducing setup errors for users.
Original PR description
When trying to set up a new bank account using the bank account wizard, there is an issue with the check company on the linked_journal_id field. The check will make sure that the company on that field is either false or the same as the company on the record. But with a recent change in 68f4534aa5d0c6d900128c93f5a2289c06bb3d14 the bank account company_id will be the one from the linked partner. As the partners for companies have an empty company_id, this check does not make a lot of sense anymore, as it would be wrong in most cases. (We expect a journal with the currently selected company, but the bank account will in most cases have an empty company_id) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Starting a work order will no longer automatically suggest producing the full manufacturing order quantity. This helps operators notice when an earlier step produced less than planned, reducing the risk of carrying an incorrect quantity into the next operation.
Original PR description
In c3a89338986413a59143b0240c7dbf6b68d19e69 , when start a workorder, we always suggest the qty to produce to be the full qty to produce on MO. If the previous WO produced less than the full qty to produce on MO, user won't aware of that when start the WO. We revert it in this commit. Task-2678388
This update modernizes Odoo's web interface foundation and simplifies internal event handling across many apps. It should help keep the product easier to maintain and ready for future interface improvements, with little direct change expected for day-to-day 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