Daily updates from Odoo
Navigate
Branch
Thursday, August 25, 2022
20 changes
Enhancements to existing features
Amazon order synchronization now requests the necessary authorized data in the main order queries instead of making extra follow-up calls. This should make order imports more efficient while still handling restricted customer and gift information appropriately.
Original PR description
Before this commit, to get some restricted information, we needed to call 2 (or 3 to get the gift information) additional operations using a restricted data token. This information is now available in the basic operations as long as we get a RDT adapted for it. When querying Amazon, we now specify the restricted elements that need to be added in the response of the basic operations. task-2927248
Odoo’s accounting reports are now powered by one shared reporting engine, replacing several separate report systems. This makes reports easier to configure, supports manual values and report variants, and improves performance for key financial statements such as balance sheets, profit and loss, and tax reports.
Original PR description
[IMP] account_reports, l10n_*: Introduce unified reporting engine (aka Reportalypse) (aka "v16 reports yeaaaaaaaaaaaah") This commit introduces the new reporting engine, largely refactoring the…
[IMP] account_reports, l10n_*: Introduce unified reporting engine (aka Reportalypse) (aka "v16 reports yeaaaaaaaaaaaah") This commit introduces the new reporting engine, largely refactoring the account.report model, and replacing what used to be managed by account.financial.html.report, account.tax.report/account.generic.tax.report, and account.accounting.report. Multiple improvements are brought by this commit: 1) "One engine to rule them all" All reports (including custom ones) are now direct instances of the account.report model, which becomes a stored model whose filter options are handled by regular fields. account.financial.html.report, account.tax.report and account.accounting report objects don't exist anymore and have been converted to the new engine. Custom (i.e. python-defined) reports still exist, but have been modified to fit the new approach. Note that thanks to this change, a manual reconfiguration of the reports by the user is now possible for every report (to add or remove a filter, change the load more limit, allow comparisons, ...). To allow the replacement of the tax reports, account.report's model declaration has been moved from enterprise to community. Indeed, those reports need to stay there, as they are referenced by the taxes requiring the account tags they generate in their repartition. All the logic applied on top of account.report's fields is still enterprise. 2) Introduce account.report.expression Each account.report.line can define a set of account.report.expressions. Expressions are used for various advanced purposes (see below), but they can roughly be seen as a sub-variable needed by the line. The most basic case is for example what was done before with financial report lines using other invisible lines to do subcomputations: we don't need to use multiple not-obviously-connected lines to do that. Instead the line needing those subcomputations simply defines multiple expressions. Each expression is associated to a formula engine, a formula, and an optional subformula. The formula engine defines how the formula and subformula will be interpreted, leading to much more modularity and expressivity. The following formula engines are available natively. Other engines could be added in the future, possibly even by specific modules: - domain: This engines corresponds to what used to be handled by account.financial.html.report. Its formulas are domains on account.move.line. - tax_tags: Corresponds to account.tax.report. An expression using this engine will generate a + and - tag named after its formula, just as the tag_name used to work in the previous paradigm. - account_codes: Especially useful for P&L or Balance Sheet reports. This engine uses a formula consisting of account code prefixes. For example "11 + 42" will be evaluated as the sum of the balances of all move lines made on accounts whose code starts with 11 or 42. This is the most basic case ; more advanced expressions are also allowed (for example, to handle what used to be done by sum_if_pos_groupby/sum_if_neg_groupby in old financial reports). - aggregation: Used to aggregate expressions. These expressions can use the "code" field of report lines to reference their value, and express a computation on them, pretty much like the "formula" field of account.tax.report and account.financial.html.report did. - external Use to reference values defined by account.report.external.value records (for carryover and manual values ; see below). - custom For this engine, the formula simply consists of a function to be called. This function needs to respect the specification of a formula engine function, and can then benefit from all the advantages linked to non-custom formulas (batching, automatic handling of the groupby, ...). This is a way to define engines that are only needed by 1 or 2 reports without making them available everywhere because they are too specific. Note that this architecture means expressions using different engines can be mixed within the same report in any way that is necessary. 3) Custom reports Fully defining a report in Python is still possible, but differently than before. Now, you don't have to generate a new AbstractModel inheriting from account.report. Instead, you just need a regular _inherit on account.report, and defining a few functions with specific signatures. The report then needs to be declared as an XML data, and must reference those functions using dedicated fields. 4) Performance improvement Formulas engines are batched. Depending on the implementation of the engine, this can improve the performance. account_codes engine works this way, leading to tremendous improvement on most P&L and Balance Sheets. 5) Allow multiple columns on non-custom reports Before, only Python-defined reports could have more than 1 column. This is not the case anymore, with the introduction of the new account.report.column model. Columns fetch their values using labels assigned on account.report.expression objects to identify them. To define different formulas for different columns, just use different expressions with the right label. 6) Allow manual values In the past, the only way for a user to input values into a report without creating move lines was to use a financial report with the from_context formula, and rely on a wizard when opening the report. This was too restrictive, as the input value was always the same whatever the period (so, comparisons did not work well), and the value didn't persist and needed to be re-entered every time the report was opened. To solve this, we introduce a new model called account.report.external.value. It essentially represents a value which can't be computed from account.move.line records directly. Manual values are handled by using an expression with engine 'external' and subformula 'editable' as the value of a column. A little pen will then be displayed in the corresponding cell, allowing to modify its value. 7) Carryover refactoring The introduction of account.report.external.value also allowed refactoring the way the carryover works. We remove account.tax.carryover.line and instead use account.report.external.value. Also, instead of computing the carryover as the cumulated balance of all existing account.tax.carryover.line, we directly create a external value with a balance equal to the carryover amount. When getting the carryover coming from previous periods, we only consider the external values that is in the previous tax period. 8) Reduce menuitems overhead in l10n modules A lot of localizations define localized versions of generic reports, typically for the Balance Sheet, P&L and tax report. In v15, the tax report already was handled with a single menuitem and a selector on the report allowed choosing which country we wanted to view the report of. However, all other reports still created specific menuitems. This made the menus more complex, and overall impacted the user experience negatively. This was especially problematic in multicompany environment, since the menuitems of all companies' countries were always shown, whatever the active company. We now generalize what was done by the tax report: each report can point towards another report via the root_report_id field, hence becoming a variant of this report. Variants are available through a selector on the report, and the default selected one is the one that matches best the company country. All reports which used a wizard to input manual values (such as in Spain) now make use of editable expressions. Also, the tax report lines which did not create any tag have also been converted so that they use manual values. 9) Misc improvements - Cleaning: merge l10n_es_reports_2021 into l10n_es_reports - Cleaning: merge l10n_nl_report_intrastat into l10n_nl_intrastat, and make l10n_nl_intrastat depend on account_reports - Remove old Indian reports an introduce new more standard ones instead (more correct business-wise) - Remove support for Mexican 13th month closing: this should either be done by impacting the current year earnings account directly or by using a specific journal, and a group to exclude it. - Remove a few unused reports whose information was redundant with the one in other, more complete reports Task 2524389
SEPA Direct Debit payments are now treated as confirmed immediately after the customer creates a mandate, so related documents like quotations, subscriptions, and invoices can proceed without waiting weeks for bank reconciliation. This reduces duplicate payment prompts and helps subscriptions start or resume promptly while failed or cancelled debits can still be handled afterward.
Original PR description
Before this commit, when the customer chose SEPA Direct Debit to make a payment, the transaction was set in the `pending` state after creating the mandate. An `account.payment` was immediately…
Before this commit, when the customer chose SEPA Direct Debit to make a payment, the transaction was set in the `pending` state after creating the mandate. An `account.payment` was immediately created to allow accountants to order the bank debit. After reconciliation of the payment, which can take weeks, the transaction was confirmed (set to `done`) and post-processed. Only then were the related documents (quotation, subscription, invoice) confirmed. This way of doing posed several problems: - Most apps consider the `pending` state as a near-failure. When the customer was being redirected to the portal page of the document they intended to pay, no mention was made of the pending SEPA payment. Worse, the customer was invited to pay again. - As SEPA payments take a lot of time to process, the confirmation of the document to pay was significantly delayed. In the Subscriptions app, in particular, this poses problems because the subscription was not started or resumed even though the customer had provided all the required payment details. - Creating the `account.payment` record *before* setting the transaction to the state `done` implied extra technical complexity because every other payment flow waits for the transaction to be confirmed before creating the related payment, which is the logical way to post-process transactions. Indeed, we should typically wait for the funds to be available for reconciliation to create the payment, which was not the case for SEPA payments. These problems can be addressed thanks to the following observations: - By law, the customer must be able to cancel SEPA payments effortlessly. Therefore, handling the case where the customer cancels the payment after the paid document has been confirmed is required. - SEPA mandates work conceptually like payment tokens: after they are created, one can use them to make payments without the intervention of the customer. A SEPA payment can therefore be considered as "almost confirmed" as soon as the mandate is created. After this commit, SEPA payments are confirmed (the state is set to `done`) as soon as the mandate is created. This avoids having to deal with all the side effect of the `pending` state altogether and resolves the technical difficulties related to the timing of the creation of the `account.payment`. Should a SEPA payment fail, handling it would be the same process as handling a payment cancelation. task-2842241
Users can now download spreadsheet files directly from the Documents area without first opening the spreadsheet. This saves time and makes retrieving files more convenient, especially when users only need a local copy.
Original PR description
Task-id 2918698
Users who open a signing link for a deleted signature request now see a clearer and more polished error page. This reduces confusion and helps people understand why the document is no longer available.
Original PR description
Improve the wording and visual of the page on linked to deleted sign request task-id 2928673
The worksheet Studio button has been updated so it works reliably with the newer interface framework. This restores the ability to open Studio from worksheets and adds safeguards to prevent the issue from returning.
Original PR description
**The PR is ready** This commit converts the widget to Owl. The legacy widget has also been removed as it was not longer in use. The new button work appropriately to open studio after performing a doAction. It also fixes an issue in master since the rewrite of views. The button didn't open studio
Resolved issues and error corrections
The Belgian payroll accounting test module now cleans up its setup data properly when it is uninstalled. This prevents reinstall failures and helps keep test environments stable.
Original PR description
Reinstalling the `test_l10n_be_hr_payroll_account` fails when calling the post init hook. The failure happens because of a constraint violation caused by data left behind after the first uninstall. As a result the registry cannot be loaded. The problem is resolved by assigning xml ids to the population data, so that the data is properly removed when uninstalling the module.
Closing a subscription could send the customer rating email twice when the closed stage had a rating template. This fix ensures the email is sent only once, avoiding duplicate customer communications.
Original PR description
Since bbee402d3d98f62f459cfa5c54465ae9600fe09d , if the closed stage contains a rating email, the email is sent twice. This is because we manually set as closed the subscription, and so the stage is written 2 times. Task-2207626
The lightbulb icon in Helpdesk settings now appears inline with its related text. This small visual fix makes the settings page look cleaner and easier to read.
Original PR description
This commit fixes the style of the lightbulb icon present in the settings. After this commit, the icon is now displayed inline with the text.
The barcode operations screen now shows its action buttons with the correct active styling. This avoids confusion for warehouse users by making available actions look clickable as intended.
Original PR description
In barcode/operations the buttons looks like disabled, because of missing type and name. https://github.com/odoo/odoo/blob/b2a0a1c7d3ba2c71502e272ff12e2c74fb95ff91/addons/web/static/src/views/view_button/view_button.js#L74-L77 Since: https://github.com/odoo/enterprise/pull/27747/files#diff-afa348e5fe6d5c58c2708f41069a1b7c3733c2c24c3dd540ab92a560d79159f8R75
Users can now save spreadsheet global filters even when a data source has no selected field. The interface warns that the filter will not apply to that data source, and evaluation no longer crashes when an empty field is encountered.
Original PR description
Before this commit, it was not possible to save a filter without selecting
a field for each data source.
However, adding a data source after the definition of the filter (which
lead to an empty field for this data source) was allowed, which was
incoherent with the first point.
As it's ok to have an empty field, we allow this and warn the user that
the filter will not be applied to this data source.
This commit also fix an issue where a field could be an empty object (`{}`)
instead of `undefined`, which caused a traceback during the evaluation
of the filter.
Task-id 2959765The spreadsheet module now correctly declares a required dependency used during setup. This prevents isolated spreadsheet builds from failing and helps keep deployments more reliable.
Original PR description
The spreadsheet module depends on bus, but don't mark it as a dependency. As a result, single build of the spreadsheet module fails, because the `ir.websocket` module, which is defined on the bus module, can't be resolved. This commit fixes this issue by adding the required dependency in the manifest. https://runbot.odoo.com/runbot/build/18667107
Code cleanup and technical improvements
The Field Service product selection screen for adding materials to tasks has been rebuilt on Odoo’s newer interface framework. Users should see the same workflow with smoother quantity editing, including automatic focus when changing quantities, while obsolete unused code has been removed.
Original PR description
Purpose ======= This PR converts the kanban view of products (`product.product`) used in Field Service to add some materials in a task into the new framework (OWL). Implementation details ---------------------- - Convert the kanban view in OWL - Convert the `fsm_product_quantity` widget in OWL - Remove the `fsm_date` widget in legacy because it is not used in the codebase. - Adapt JS tests for the `kanban` view and the `fsm_product_quantity` widget. - Remove the `fsm_product_quantity` widget and the kanban view in legacy. - Use the autofocus hook to directly select the input element when the widget is in edit mode.
This update simplifies the styling behind timesheet and timer screens as part of a broader visual and code cleanup. Users should see the same functionality with a more maintainable interface foundation, helping future improvements be delivered more efficiently.
Original PR description
This commit simplifies the SCSS of timesheet task-2789206
This update reorganizes mail and rating-related files across multiple Odoo apps so each business object is easier to find and maintain. It is mostly internal cleanup, with a small correction to scheduled task methods to better match how they are used.
Original PR description
[MOV] various Move code, views and data of mail / rating models into their own files. Purpose is to have one file / model, easier when searching for inherited parts of the code and see at a glance various usage of those models. [FIX] in ir_cron Trigger methods are defined as api.model but actually use self. Those are therefore not model. Smart. LINKS Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)
This update renames an internal message list component to use a clearer, shorter name. It helps keep the messaging code easier to maintain without changing how users interact with the product.
Original PR description
part of task-2918956
Miscellaneous changes
A big issue with the "create bill" action from document is that the partner is not synced unless everything is configured properly in the settings as far as documents > Accounting goes and the journal/main attachment is changed. However there is a clear issue with partners not being synchronized on the documents. Assume the following flow: - Bill is uploaded to the documents app - Create Bill action is used to create the account.move - Information on the bill is added partner, date
Original PR description
A big issue with the "create bill" action from document is that the partner is not synced unless everything is configured properly in the settings as far as documents > Accounting goes and the journal/main attachment is changed. However there is a clear issue with partners not being synchronized on the documents. Assume the following flow: - Bill is uploaded to the documents app - Create Bill action is used to create the account.move - Information on the bill is added partner, date, etc The document will now also follow any change on the partner. TaskId-2751063 Forward-Port-Of: odoo/enterprise#30659
Steps to reproduce: - Add in an auto fill partner field of type float, or monetary in the sign app and pull that onto a document template. Current behavior: The auto-fill does not take into consideration the field precision Expected behavior: The auto-fill takes into consideration the field precision Example for a latitude variable with 5 digits of precision: current value shown on the document 50.503 expected value shown on the document 50.50300 Solution: We use the conv
Original PR description
Steps to reproduce: - Add in an auto fill partner field of type float, or monetary in the sign app and pull that onto a document template. Current behavior: The auto-fill does not take into consideration the field precision Expected behavior: The auto-fill takes into consideration the field precision Example for a latitude variable with 5 digits of precision: current value shown on the document 50.503 expected value shown on the document 50.50300 Solution: We use the convert_to_column function to get the right representation even if it was not meant for this use it returns the string of a float or a monetary field with re right precision. To our knowledge this is the only function that does that. Depending of the field type it will get the digits precision for the float and the rounding precision for the monetary field to give the right format. opw-2920379 Forward-Port-Of: odoo/enterprise#30644 Forward-Port-Of: odoo/enterprise#29854
Purpose: ======== Fix unfolded articles caching: previously, articles where added or removed from the list of unfodled articles in the cache only when clicking on the caret that folds or unfolds an article. Therefore, when a child article was created or when an article was moved under a parent article, these new parent articles were not added to the cache and were folded when selecting another article. Article ids are now also added/removed from the list of unfolded articles when an a
Original PR description
Purpose: ======== Fix unfolded articles caching: previously, articles where added or removed from the list of unfodled articles in the cache only when clicking on the caret that folds or unfolds an…
Purpose: ======== Fix unfolded articles caching: previously, articles where added or removed from the list of unfodled articles in the cache only when clicking on the caret that folds or unfolds an article. Therefore, when a child article was created or when an article was moved under a parent article, these new parent articles were not added to the cache and were folded when selecting another article. Article ids are now also added/removed from the list of unfolded articles when an article has been (un)folded without clicking on a caret. Fix moving articles under folded articles: previously, moving an article under a folded article was either not possible if the article had been unfolded and refolded before, or it overwrote the other existing children if it had not been unfolded before. The former issue arises because when one folds an article, the "ul" containing the children articles was simply hidden, which is not compatible with NestedSortable. Therefore, instead of only hiding the "ul", it is moved to one of its siblings, so that one can move it back when one unfolds the parent again, or when an article is moved under it. This trick also allows to always place the moved article as the last child of it's parent, which was not the case with other approaches tried. To solve the latter issue, an RPC is now done to fetch the other children of the parent when an article is moved under this parent and when the children have not been fetched yet. Fix ordering of articles fetched through a RPC: previously, the order of the articles fetched when unfolding an article was not the same as the one when these articles were loaded on page load, causing articles to change position when unfolding then selecting an article. The order is now the same in both cases. Scroll to articles in the sidebar when created: when one creates an article, it spawns at the bottom of its section/group of children in the sidebar. Now, the sideview is scrolled in order to have the handle of the newly created article in the view. Task-2858704 Forward-Port-Of: odoo/enterprise#29282
This PR fixes the move reversal wizard, because it was showing the reference doc code for any kind of account entry and not only for invoices/refunds. Also fixes the required field "reason" in the cross-references, since recent change truncating this to its maximum allowed length, (90) caused an exception if the field was false. [FIX] l10n_cl_edi: in reversal, moves hide the reference code if a normal account entry (not invoice or refund) [FIX] l10n_cl_edi: define the reason as required s
Original PR description
This PR fixes the move reversal wizard, because it was showing the reference doc code for any kind of account entry and not only for invoices/refunds.
Also fixes the required field "reason" in the cross-references, since recent change truncating this to its maximum allowed length, (90) caused an exception if the field was false.
[FIX] l10n_cl_edi: in reversal, moves hide the reference code if a normal account entry (not invoice or refund)
[FIX] l10n_cl_edi: define the reason as required since it is truncated to 90 chars
and if this field is not completed, there will be an exception
Forward-Port-Of: odoo/enterprise#29826