Wednesday, October 19, 2022
16 changes · master
New functionality added to Odoo
Adds standard Balance Sheet and Profit and Loss reports for Moroccan accounting localization. This helps businesses operating in Morocco prepare financial statements aligned with local reporting formats and guidance.
Original PR description
Adds the balance sheet and the profit and loss reports for the Moroccan localization as they are described in these documents: http://www.befec.ma/documentation/comptabilite/Plan_comptable/CGNC/cgnc.pdf https://www.ammc.ma/sites/default/files/IB_Maroc_2S05.pdf
Adds standard balance sheet and profit and loss reports for Moroccan companies in Odoo. This helps businesses using the Morocco localization prepare financial statements aligned with local reporting requirements.
Original PR description
Adds the balance sheet and the profit and loss reports for the Moroccan localization as they are described in these documents: http://www.befec.ma/documentation/comptabilite/Plan_comptable/CGNC/cgnc.pdf https://www.ammc.ma/sites/default/files/IB_Maroc_2S05.pdf
Enhancements to existing features
Subscription analysis now offers more useful filters and grouping options, including next invoice date, subscription, sales status, recurrence, and referrer. Teams can also change the customer on active subscriptions through a controlled flow, with billing and shipping addresses updated correctly during renewals or upsells.
Original PR description
IMP for reporting:
On subscription analysis add filters and group by on:
Next invoice date
Subscription (sales order)
Sales status (being able to exclude locked, aka renewed)
Recurrence
Show referrer as quick filter
If a customer changes on a renewal or an upsell, the shipping address & the invoicing address should change aswell
It must be possible to change the customer on an active subscription
task-id: 2988345
This PR is moved into https://github.com/odoo/enterprise/pull/32591 to avoid runbot confusion.Miscellaneous changes
Problem: The product origin country field on the invoice allows the user to create the product. Solution: Add to the options dictionary on field in the xml to set 'no_create' to True. Forward-Port-Of: odoo/enterprise#32688
Original PR description
Problem: The product origin country field on the invoice allows the user to create the product. Solution: Add to the options dictionary on field in the xml to set 'no_create' to True. Forward-Port-Of: odoo/enterprise#32688
Subscription orders can now have customer cancellation options and payment behavior tied directly to each sales order. This makes it easier for businesses to adjust subscription handling after an order has been confirmed, without relying only on broader subscription settings.
Original PR description
This commit aims allow `user_closable` and `payment_mode` to be directly linked to a sale_order. This allow modification of behaviour after the confirmation of SO.
Expense receipt extraction now uses automatic callbacks so Odoo is notified when results are ready, instead of relying on repeated status checks. This should make expense processing updates more timely and align the experience with other document extraction features.
Original PR description
Like already done for the account_invoice_extract (task-2416741) and hr_recruitment_extract, the client will now send a webhook URL as part of the request that the extraction server will call once the results are ready. task-2886616 Related server-side task: 2452019
An OFFSET was introduced in the get_xaf query to avoid a MemoryError. This works well for small databases but when working with big databases, the OFFSET becomes a performance bottleneck (cf. [psql website](https://www.postgresql.org/docs/12/queries-limit.html#:~:text=The%20rows%20skipped%20by%20an%20OFFSET%20clause%20still%20have%20to%20be%20computed%20inside%20the%20server%3B%20therefore%20a%20large%20OFFSET%20might%20be%20inefficient.)) This can be seen by looking at the cost estimation
Original PR description
An OFFSET was introduced in the get_xaf query to avoid a MemoryError. This works well for small databases but when working with big databases, the OFFSET becomes a performance bottleneck (cf. [psql…
An OFFSET was introduced in the get_xaf query to avoid a MemoryError. This works well for small databases but when working with big databases, the OFFSET becomes a performance bottleneck (cf. [psql website](https://www.postgresql.org/docs/12/queries-limit.html#:~:text=The%20rows%20skipped%20by%20an%20OFFSET%20clause%20still%20have%20to%20be%20computed%20inside%20the%20server%3B%20therefore%20a%20large%20OFFSET%20might%20be%20inefficient.)) This can be seen by looking at the cost estimation of psql's planner. With large offsets the cost skyrockets and the planner moves from Nested Joins to Hash Joins, which are much less efficient for the get_xaf query. To solve this issue, the OFFSET is replaced by a ROW_NUMBER filter. The ROW_NUMBER window function will add a number column to the resulting set of a query. Then, by adding a condition in the WHERE clause, we can paginate the results of the query. This solution is called 'Seek' in the benchmarks and comes from https://use-the-index-luke.com/sql/partial-results/fetch-next-page This approach has the advantage of being independent of the number of skipped rows. #### Cost Estimation Customer database with 550K account.move.lines. <p float="left"> <img src="https://user-images.githubusercontent.com/9673274/182785784-88e36ab3-a23f-439c-a4cc-fbfa7bab4422.png" /> <img src="https://user-images.githubusercontent.com/9673274/182786550-322c97e9-e354-4cde-bb0d-8c062484be15.png" /> </p> For the OFFSET solution, the planner goes from Nested Joins to Hash Joins starting 60k skipped rows, cost of 600k (in PG10). Since the ROW_NUMBER solution's cost correlates strongly to the batch size, an `ir_config_parameter` is introduced in this PR to avoid TimeoutErrors in the future. #### Speedup | Skipped Rows | Offset | Seek | |:-------------------:|:--------:|:-------:| | 0 | 280ms | 290ms | | 10000 | 290ms | 300ms | | 30000 | 310ms | 370ms | | 50000 | 350ms | 420ms | | 60000 | 22min | 450ms | | 100000 | +30min | 580ms | opw-2703534 Forward-Port-Of: odoo/enterprise#30350 Forward-Port-Of: odoo/enterprise#30296
Demo data fails when installing sale before intrastat. This because installing the sale module results in the deletion of "product_product_4d", and when the intrastat demo data is installed, the xmlid is no longer present, which causes the installation of the demo data to fail. Forward-Port-Of: odoo/enterprise#32923
Original PR description
Demo data fails when installing sale before intrastat. This because installing the sale module results in the deletion of "product_product_4d", and when the intrastat demo data is installed, the xmlid is no longer present, which causes the installation of the demo data to fail. Forward-Port-Of: odoo/enterprise#32923
Instead of redirecting users to Google spreadsheets, we should make templates downloadable. Forward-Port-Of: odoo/enterprise#32913
Original PR description
Instead of redirecting users to Google spreadsheets, we should make templates downloadable. Forward-Port-Of: odoo/enterprise#32913
Fixes two issues in the dashboard UX: - when SEPA batches are set up, batches names aren't aligned - the scrollbar in the notes is not styled the same as the left blocks task-3031999 Forward-Port-Of: odoo/enterprise#32414
Original PR description
Fixes two issues in the dashboard UX: - when SEPA batches are set up, batches names aren't aligned - the scrollbar in the notes is not styled the same as the left blocks task-3031999 Forward-Port-Of: odoo/enterprise#32414
The Easypost service does not work with some countries To reproduce the issue: 1. Create a shipping method SM with Easypost-Fedex 2. Create a customer C: - City: Dispur - State: Assam - Code: 781005 - Country: India 3. Create a SO: - Customer: C - Order Lines: add a product 4. Add Shipping: - Method: SM - Get the rate Error: a User Error is displayed "It seems Easypost do not provide shipments for this order [...] FedEx returned error: The lengt
Original PR description
The Easypost service does not work with some countries To reproduce the issue: 1. Create a shipping method SM with Easypost-Fedex 2. Create a customer C: - City: Dispur - State: Assam - Code: 781005…
The Easypost service does not work with some countries
To reproduce the issue:
1. Create a shipping method SM with Easypost-Fedex
2. Create a customer C:
- City: Dispur
- State: Assam
- Code: 781005
- Country: India
3. Create a SO:
- Customer: C
- Order Lines: add a product
4. Add Shipping:
- Method: SM
- Get the rate
Error: a User Error is displayed "It seems Easypost do not provide
shipments for this order [...] FedEx returned error: The length of the
destination state or province exceeds the limit of 2 characters."
The current implementation sends the state name instead of its code.
Easypost support contacted, answer "[...] In short, yes. It is
recommended to always provide a state/province 2-character abbreviation
rather than a full state/province name in order to avoid these types of
errors, regardless of country or carrier."
Locally tested with a client from:
- Assam (AS), in India
- Victoria (VIC), in Australia
- Pirkanmaa (FI-11), in Finland
OPW-3005900
Forward-Port-Of: odoo/enterprise#32589When opening the package's content in the Barcode App, if there is a tracked product in it, the tracking number is directly followed by the quantity. This commit makes them be each on a different line. Forward-Port-Of: odoo/enterprise#32896
Original PR description
When opening the package's content in the Barcode App, if there is a tracked product in it, the tracking number is directly followed by the quantity. This commit makes them be each on a different line. Forward-Port-Of: odoo/enterprise#32896
This PR fixes the `planning` and `industry_fsm_sale` onboarding tours. Forward-Port-Of: odoo/enterprise#32920
Original PR description
This PR fixes the `planning` and `industry_fsm_sale` onboarding tours. Forward-Port-Of: odoo/enterprise#32920
…n portal before this commit, transactions were created without the sale_order_ids value. The side effect of this is transaction references falling back on the tx-2022 format, but there may be other consequences such as subscriptions not being linked to their transactions, payment confirmation messages not being posted on subscriptions' chatters, making payment reconciliation more complicated, etc. Moreover, the test_automatic_invoice_token was relying on manual patch start and stop which
Original PR description
…n portal before this commit, transactions were created without the sale_order_ids value. The side effect of this is transaction references falling back on the tx-2022 format, but there may be other consequences such as subscriptions not being linked to their transactions, payment confirmation messages not being posted on subscriptions' chatters, making payment reconciliation more complicated, etc. Moreover, the test_automatic_invoice_token was relying on manual patch start and stop which is a bad practice. A context manager has the advantage to stop patching the method if something goes wrong during the test. The patch would remain if patcher.stop() was not called. Forward-Port-Of: odoo/enterprise#32847 Forward-Port-Of: odoo/enterprise#32835
We download iot_handlers from all module installed. But when we make a customization with studio it create a module without folder With this commit we check if a module have a real path Forward-Port-Of: odoo/enterprise#32895
Original PR description
We download iot_handlers from all module installed. But when we make a customization with studio it create a module without folder With this commit we check if a module have a real path Forward-Port-Of: odoo/enterprise#32895
Now that the module web_dashboard has been removed https://github.com/odoo/enterprise/pull/31641, the prop additionalMeasures of CohortController has become unused. We remove the code related to that prop in web_cohort. Forward-Port-Of: odoo/enterprise#32520
Original PR description
Now that the module web_dashboard has been removed https://github.com/odoo/enterprise/pull/31641, the prop additionalMeasures of CohortController has become unused. We remove the code related to that prop in web_cohort. Forward-Port-Of: odoo/enterprise#32520