Daily updates from Odoo
Navigate
Branch
Thursday, October 10, 2019
41 changes
New functionality added to Odoo
The website now tracks products visitors spend time viewing and uses that history to show a recently viewed products carousel. This helps shoppers return to items of interest more easily, including after logging in or creating an account, while excluding products already in the cart.
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
Odoo can now be configured to use a custom session storage provider instead of only local file-based storage. This helps businesses run multiple Odoo servers more reliably without depending on a shared filesystem.
Original PR description
Hey there, currently odoo uses the `FilesystemSessionStore` of werkzeug to save and manage the user sessions. If you want to run more than one odoo instance on different machines you have to use a…
Hey there, currently odoo uses the `FilesystemSessionStore` of werkzeug to save and manage the user sessions. If you want to run more than one odoo instance on different machines you have to use a shared filesystem. To avoid these you want to save the session in the database or another servers. Other tools allow to define a specific session store. With this commit I add the ability to define the class to use. With this change you can set the config option `session_store` to the class of the session store (with the python module path). Also you can set this class via the option `--session-store`. Why I did this in the core: First I created a new addon which replaces the `session_store`. But this overwritings are only loaded if the module is already installed and the database is set via the commandline or config. If the module is installed or the database is picked by the selection in the browser then the function is already loaded and the overwriting doesn't work anymore. [See my question in odoo forum.](https://www.odoo.com/fr_FR/forum/help-1/question/replace-session-store-of-odoo-werkzeug-86843)
Odoo now includes a Cash Flow report using the indirect method, a format commonly preferred by accounting teams. This makes it easier for businesses to review cash flow starting from profit and loss figures while reusing existing investing and financing activity data.
Original PR description
So far Odoo just provides Cash Flow - Direct Method. Though it can be quickly configure it is claimed that this report is the least used of all.  Now we are adding the Cash Flow - Indirect Method. This report is claimed to be the most widely used among accounting people. Indirect Method is fetched from Income and then some transactions have to be added or subtracted depending on the nature of the activity. Below there is an exhibit of that report. Cash Flow for Investing and Financing Activities is directly fetch from Odoo's original report for Cash Flow. As Profit (loss) is fetch from Profit and Loss report too. In order to not repeat the same info in both reports.  This PR depends on https://github.com/odoo/odoo/pull/35522.
Enhancements to existing features
Calendar events that expand on hover now keep that wider size while users drag or resize them. This makes busy calendars easier to manage because events no longer shrink unexpectedly during editing.
Original PR description
[IMP] web calendar: Keep width box while dragging or resizing Description of the issue/feature this PR addresses: When there are many events at the same moment in a calendar, events are thin and on mouse hover the event take all the width. Current behavior before PR: When we drag or we resize a event in calendar, the event returns to the state thin. Desired behavior after PR is merged: The width event stay width during resizing and dragging. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#37334
Sales and purchase journals that use Latin American document types will no longer create unused refund numbering sequences. This also hides irrelevant refund sequence fields, reducing confusion for users configuring journals.
Original PR description
[IMP] l10n_latam_invoice_document: refund sequence on journals ### Description of the issue/feature this PR addresses: On `l10n_latam_invoice_document` module, if a sales/purchase journal use…
[IMP] l10n_latam_invoice_document: refund sequence on journals ### Description of the issue/feature this PR addresses: On `l10n_latam_invoice_document` module, if a sales/purchase journal use documents, then the journal sequences are not used, this change avoids the creation of the refunds sequences that is not going to be used and also the user don't see fields that are no needed (Refund Sequences fields) ### Current behavior before PR: When creating a sale or purchase journal that use documents we are also creating a refund sequence for the journal that is not used. Also the refund sequence fieds are show in the view and this is confusing for the user because the use documents journals are based in document type sequences. ### Desired behavior after PR is merged: 1. Not refunds sequences are created for the journals that use documents 2. The fields related to the refund sequences are not shown in the view. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38312
This update changes the build version used for the IoT Box hardware integration. It helps ensure IoT Box deployments are identified with the correct current version, supporting clearer maintenance and rollout tracking.
Original PR description
[IMP] hw_drivers: Change version of IoT Box We update the version of the build for IoT Box 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#38293
The documentation for map views was updated to make marker popup setup clearer and more consistent. It also documents new options to hide names and addresses, helping teams configure map displays more precisely.
Original PR description
Main PR (enterprise): https://github.com/odoo/enterprise/pull/5770 Task 2009017
The web code editor now loads support for additional file types beyond Python and XML. This makes it easier for users working with stylesheets and JavaScript to edit code with appropriate highlighting and editor behavior.
Original PR description
Description of the issue/feature this PR addresses: Add all modes to ACE Editor Current behavior before PR: Only python and xml are loaded Desired behavior after PR is merged: In addition scss and js are loaded -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update changes how Odoo creates behind-the-scenes relationship tables so they use primary keys instead of equivalent unique indexes. This helps businesses that rely on advanced database replication tools improve compatibility and reliability without changing day-to-day user workflows.
Original PR description
Description of the issue/feature this PR addresses: This is a technical change, logical replication strategies (BDR3) rely on all tables having a Primary Key. Presently Odoo uses a UNIQUE index which is basically the same thing over the 2 fields but causes BDR to fail. With BDR3 looking like being set for pg12 it would be nice to support. Current behavior before PR: No chance of logical replication working Desired behavior after PR is merged: Some chance of logical replication working \cc @odony -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The accounting module now includes tags that help structure indirect-method cash flow reports. This makes it easier for businesses to build reports aligned with IFRS-style cash flow presentation without manually defining the tag structure.
Original PR description
By Adding this Tags in the account core module then it could be easier to create reports that render a Cash Flow with Indirect Method. The following set of Tags tries to convey the structure of a report as the one that could be generated by using the guidelines provided in the IFRS Taxonomy Ilustrated for a Cash Flow - Indirect Method  Regards -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The map view is easier to use, with cleaner popups, clearer addresses, grouped markers for records at the same location, and warnings when routing cannot work because setup is incomplete. Users can also activate and edit map views in Studio, improving configuration flexibility without developer help.
Original PR description
Improvements to the map list usability Community PR: https://github.com/odoo/odoo/pull/37433 Tasks : 2009017, 2067165
Resolved issues and error corrections
The Mexico accounting setup now marks transition tax accounts as reconcilable. This helps payments and invoices with different currency rates reconcile correctly for cash-basis taxes, reducing accounting discrepancies.
Original PR description
[FIX] l10n_mx: Transition Tax Accounts must be reconcilable [FIX] l10n_mx: Transition Tax Accounts must be reconcilable = This issue is relevant for MX Localization because Cash Basis is created with…
[FIX] l10n_mx: Transition Tax Accounts must be reconcilable [FIX] l10n_mx: Transition Tax Accounts must be reconcilable = This issue is relevant for MX Localization because Cash Basis is created with the rate of the payment, and not with the rate of the invoice as is done for odoo core. (some pictures were taken from other versions - main issue remains the same) Impacted versions: - 11.0 Steps to reproduce: - - Set company Country MX <img width="1270" alt="Screen Shot 2019-08-22 at 9 43 42 AM" src="https://user-images.githubusercontent.com/7598010/63524311-67c1d800-c4c1-11e9-9abd-2003e6c4b997.png"> - Set Multi-currency Environment <img width="909" alt="Screen Shot 2019-08-22 at 9 44 40 AM" src="https://user-images.githubusercontent.com/7598010/63524353-7b6d3e80-c4c1-11e9-8c2f-624563df231c.png"> - Create two rates for USD for Date1 and Date2 <img width="1676" alt="Screen Shot 2019-08-22 at 9 47 03 AM" src="https://user-images.githubusercontent.com/7598010/63524552-d0a95000-c4c1-11e9-8ba7-00fff11a6adf.png"> - Leave Transition account `119.01.01 IVA pendiente de pago` for `IVA(16%) COMPRAS` as reconcile=False. Tax is Due on Payment  <img width="794" alt="Screen Shot 2019-08-22 at 9 49 10 AM" src="https://user-images.githubusercontent.com/7598010/63524724-2120ad80-c4c2-11e9-94be-48b2b0219353.png"> - Create a Vendor Bill for Date1: <img width="1272" alt="Screen Shot 2019-08-22 at 9 52 41 AM" src="https://user-images.githubusercontent.com/7598010/63525021-9b513200-c4c2-11e9-961a-4103a6c9156b.png"> - Create a Payment for Date2: <img width="1085" alt="Screen Shot 2019-08-22 at 9 53 21 AM" src="https://user-images.githubusercontent.com/7598010/63525116-c471c280-c4c2-11e9-8fc1-649e633e883b.png"> <img width="1265" alt="Screen Shot 2019-08-22 at 9 53 56 AM" src="https://user-images.githubusercontent.com/7598010/63525122-c8054980-c4c2-11e9-944b-e8b6ff819aa2.png"> - Check Journal Entries. Only Four Journal Entries. one for invoice, one for payment, one for CABA, one for FX in Payable. <img width="1616" alt="Screen Shot 2019-08-22 at 9 54 52 AM" src="https://user-images.githubusercontent.com/7598010/63525200-e8350880-c4c2-11e9-9195-6447893d0260.png"> - Check the Journal Entry Exchange Difference. <img width="1261" alt="Screen Shot 2019-08-22 at 9 55 52 AM" src="https://user-images.githubusercontent.com/7598010/63525294-0e5aa880-c4c3-11e9-9692-3ee1eeecd9da.png"> Current behavior: - No Exchange Difference Journal Entries for the transition accounts is created Expected behavior: - After full reconciliation of Vendor Bill and Payment there should be one Exchange Difference Journal Entry for the Payable Account and one for the Transition Account. Video - https://youtu.be/UbsisoqcmqA Regards Forward-Port-Of: odoo/odoo#38215 Forward-Port-Of: odoo/odoo#35990
The email compose wizard now handles cases where recipients and a message template are selected together without causing an error. This helps users send templated messages more reliably and avoids interruptions during communication workflows.
Original PR description
[FIX] mail: message compose wizard if partner_ids and template_id are set, a traceback happens. Indeed, some mail fields are not taken from the res_ids when partner_ids is set. When trying to update the values with the one from the template, the existing values are popped, which raised an error as those keys weren't set. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38298
Point of Sale now preserves the actual employee or user responsible when creating or updating session records, rather than showing OdooBot. This improves traceability and makes troubleshooting audit information more useful without changing day-to-day workflows.
Original PR description
[IMP] point_of_sale: use sudo instead of with_user(SUPERUSER_ID). This avoids to loose user information when creating/updating records. Create_user = OdooBot is not helpful at all when debugging, ... -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38062
This fix prevents imports from failing when spreadsheet data contains an empty linked field, such as a missing country on a customer record. Users can now re-import exported Excel files with blank values without seeing an incorrect “False” lookup error.
Original PR description
[FIX] odoo: Import data with falsy many2one fields Steps to reproduce: - Export a partner with country set to False, using EXCELL - Try to import it with the xls file Bug: It raised: "No matching record found for name 'False' in field 'Country' at row 2" opw:2080376 Forward-Port-Of: odoo/odoo#38220
This fix prevents errors when certain optional field setup information is absent. It improves reliability in the base sparse field and mail areas by handling missing values safely instead of crashing.
Original PR description
[FIX] base_sparse_field,mail: handle None _instanciate_attrs override The parent was expected to return a dict, but it can also return None in some cases. When that happens, the overrides were crashing because it is impossible to assign a key/val to None. Note that using `if` conditions like this also prevents from writing on the dict if it is existing but empty, but due to the definition of the parent, if there is a dict, it will not be empty. Forward-Port-Of: odoo/odoo#38259 Forward-Port-Of: odoo/odoo#38168
Sales order lead times can now only be edited before the order is confirmed. This prevents unexpected changes to scheduled delivery dates after related warehouse operations already exist.
Original PR description
[FIX] sale: edit lead time Allow the edition of Lead Time only when the SO is not confirmed yet since the modification of the scheduled date on an existing picking is not expected. opw-2083070 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#38337
New accounting move lines now round debit and credit amounts correctly when they are created. This prevents small currency precision differences from accumulating and causing accounting reports to appear unbalanced.
Original PR description
Forward Port of #37398 to 13.0 This fix is similar to 8020033; both are workarounds for the bug (limitation) introduced by 9d87d15db6dd40a5a0162fb126c725a2f0a40414. In this case, the currency_field…
Forward Port of #37398 to 13.0 This fix is similar to 8020033; both are workarounds for the bug (limitation) introduced by 9d87d15db6dd40a5a0162fb126c725a2f0a40414. In this case, the currency_field is a related field, and these fields are only computed after scalar values are written in database. As a result, this value is not rounded at creation. It is a problem since typically accounting reports are written directly in SQL, and thus reuse the values directly. Anyway even in the ORM the convert_to_cache optimised this away using the assumption that 'the value should have been rounded in convert_to_column'. It follows that in the report, errors can be accumulated to the point where the report is not balanced. This needs to be fixed in database by going through every existing line. Of note: the limitation that was readily acknowledged has not been worked around anywhere, in fact almost every single currency_field is a related one. Also of note, commit afef71d6b should "Always round monetary values in database" while it explicitly checked for the presence of the currency_field in the values and while not introducing a mechanism to make sure it would always be in the values. opw 2066849 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#38341
This update fixes several issues in the website shop experience: product search counts now display correctly, customers can re-add items after removing them from a wishlist, and products can no longer be selected as their own alternatives. These changes reduce confusion for shoppers and help maintain cleaner product recommendations.
Original PR description
12.0 website sale fix fja Now a product removed from wishlist as a connected user can be added again. In the product page the found count was not display It was possible to add the product itself as alternative product -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#37135
Installing a new website theme now handles related dependency upgrades in the same operation. This prevents installation errors caused by stale module information, making theme setup more reliable for users.
Original PR description
[FIX] website_theme_install: theme installation Group the upgrade of upstream dependencies with the installation of a new theme into a single install/upgrade operation. This fixes cache misses occurring when accessing the state of a module after having upgraded other modules. Co-authored-by: Sébastien Theys <seb@odoo.com> Forward-Port-Of: odoo/odoo#38209
This update fixes small wording and spacing issues in accounting and payment messages so they appear more consistently to users and translators. It helps prevent awkward or duplicated translated text, with no expected change to business workflows.
Original PR description
[FIX] account: add missing space Courtesy of primes2h on Transifex Forward-Port-Of: odoo/odoo#38154
This fixes an issue where the Send & Print action could fail or show incorrect recipient information when sending multiple invoices through postal mail. It ensures recipient details are handled consistently and hides the recipient field when no customer is set, making invoice mailing more reliable.
Original PR description
[FIX] snailmail_account: send multiple invoices * Ensure compute always sets partner_id. * Don't show "to" when partner_id is not set FIX "Send & Print" Action on account.move model. Fixes https://github.com/odoo/odoo/issues/38228 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38264
This fixes a duplicated accounting configuration record in the system data. It helps prevent unnecessary duplication during setup or updates, reducing the chance of confusion or maintenance issues for accounting features.
Original PR description
[FIX] account: remove duplicated record definition Forward-Port-Of: odoo/odoo#38306
This fix prevents the customer-facing POS display from showing a blank white screen when the hardware box cannot reach the Odoo server. Instead, it shows the default POS client display with the IP address, helping staff identify and resolve connection issues more easily.
Original PR description
[FIX] hw_drivers: Fix for Customer display When a box was unable to reach the Odoo server the customer display show a white screen. With this fix we show the default POS Client display with IP address 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#38271
Company records now show the intended placeholder avatar when no logo is available. This prevents blank or poorly cropped images in contact views, improving clarity when users browse companies and addresses.
Original PR description
[FIX] base: correctly set partner placeholder avatar for companies closes #38001 Forward-Port-Of: odoo/odoo#38267
This update fixes issues in the Lunch app that could cause default setup data to be changed or recreated unexpectedly. It also ensures a lunch-related action opens with a clean setup, helping users avoid confusing or incorrect behavior.
Original PR description
13.0 - lunch fixes Forward-Port-Of: odoo/odoo#38260
Website editor dropdowns now keep Odoo's intended visual style even when custom themes are applied. This prevents theme styling from accidentally breaking dropdown menus, improving consistency and reliability for website users.
Original PR description
[FIX] website, *: force website UI dropdown style * web_editor The purpose is to force our dropdown style in our UI so that themes do not break it anymore (same way all the other elements are forced (cards, headings, etc)). task-2059538 Co-authored-by: qsm-odoo <qsm@odoo.com> Forward-Port-Of: odoo/odoo#38268
Background videos placed inside website mega menus now display correctly when visitors open the menu. This fixes a visibility issue that previously made those videos work only while editing the page, improving the live website experience.
Original PR description
[FIX] website: make background videos in mega menus work When a background video was used in a mega menu, it was only working in edit mode. Indeed, the background video size is computed on page load (and on window resize) but as the video is inside a hidden dropdown menu in this case, the size cannot be properly computed. This commit fixes the issue by recomputing the video size on dropdown menu opening. task-2080590 Forward-Port-Of: odoo/odoo#38208
This update fixes an issue in the Mail app where email template previews could fail or show incorrect information when no record value was available. It helps keep email preview behavior consistent and avoids confusion for users preparing messages.
Original PR description
13.0 - [FIX] mail: force empty value on record Forward-Port-Of: odoo/odoo#38285
The sales invoicing wizard now respects the user's choice when they turn off down payment deduction. This prevents down payments from being incorrectly subtracted from final invoices, helping keep customer billing accurate.
Original PR description
[FIX] sale: fix down payments being deducted when they should not Prior to this commit, un-checking 'Deduct down payments' on the invoice wizard had no effect: down payments were still deducted from the final (regular) invoice. task-2081012 @dbo-odoo Do we have a "World shortest fix" badge ? -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38284
Archived projects can no longer be deleted when they still contain tasks. This prevents accidental loss of project records when related tasks are hidden because they were archived too.
Original PR description
[FIX] project: can delete archived project with tasks Create a Project with tasks, archive it, delete it. The project is deleted, but this should not happen: tasks are present, but they are hidden because when the project is archived all its tasks are archived too (active flag is set to false). On project unlinking only active tasks are checked, thus allowing the deletion. Using a context flag to avoid filtering the non active tasks. opw-2080515 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38270 Forward-Port-Of: odoo/odoo#38251
Adding the same product to the website cart multiple times now increases the quantity on the existing order line instead of creating duplicate lines. This keeps carts and quotations cleaner and helps avoid confusion during checkout.
Original PR description
Before this commit add several time the same product will duplicate the sale order line instead to update the quantity. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that occurred when printing a canceled invoice with no invoice lines. Users can now print these canceled invoices without the system crashing, improving reliability in edge-case accounting workflows.
Original PR description
[FIX] sale_stock: print canceled invoice Install both Sale Management and Invoicing. Create an invoice without any line, save it and cancel the entry. Print the canceled invoice, traceback. The python's `max` function requires an non-empty iterable to retrieve the maximum element. For line less invoices, the value must be None. closes #38175 Forward-Port-Of: odoo/odoo#38197
The stock product replenishment wizard now receives the needed product information when opened from the appropriate product views. The general action dropdown access is avoided so users are not offered replenishment for items where it does not make business sense, such as services or consumables.
Original PR description
[FIX] stock: product replenish wizard Description of the issue/feature this PR addresses: Fixes https://github.com/odoo/odoo/issues/38238 Current behavior before PR: `default_get` expects `default_product_id` or `default_product_tmpl_id` in the Context, while it was not passed in Action here. Desired behavior after PR is merged: This commits adds default_product_id Cc @sle-odoo -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#38239
This fixes an error that occurred when printing an ISR payment slip from a Swiss customer invoice. Businesses using Swiss localization can now generate the payment slip reliably without the invoice process being interrupted.
Original PR description
[FIX] l10n_ch: print ISR On a customer invoice, click on 'Print ISR' => Error This is because of computed fields not set. opw-2081567 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#38282
Odoo now returns a clean “not found” response when requested binary content is missing or cannot be read, instead of triggering a server crash and noisy error logs. This makes file access failures less disruptive and easier for teams to manage.
Original PR description
[FIX] ir_http: return a 404 if binary content cannot be decoded Commit 5a9e1af64acc has the unfortunate side-effect of crashing early if for any reason the content cannot be decoded. However, simply ignoring that the content cannot be decoded is no better idea: some functions pipe the result to decoding functions that crash the same. The resulting traceback pollutes the log with uninformative message such as: binascii.Error: Incorrect padding 5 0.002 0.016 In case the content cannot be decoded (data corruption, or simply missing file) we return a clean 404 instead, which is morally almost equivalent, and is clean even from functions that depend on binary_content. opw 2072586 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#38261
This update fixes a compatibility issue in the IoT module where driver browsing relied on a deprecated method. It helps keep connected device integrations working reliably, including Ingenico payment terminal support.
Original PR description
[FIX] iot: fix depreciated "ad_paths" We fix the depreciated function "ad_paths" which was used to browse the drivers in the modules Forward-Port-Of: odoo/enterprise#5975
This update cleans up an unused or incorrectly named field in the employee appraisal area. It helps keep appraisal data structures clearer and reduces the chance of confusion for future maintenance, with no expected impact on day-to-day users.
Original PR description
[FIX] hr_appraisal: remove unused field Forward-Port-Of: odoo/enterprise#5971
Features or functions removed from Odoo
Odoo removed an old web page route for individual apps that had not worked reliably for several versions and could trigger errors. This reduces confusing failures for users and cleans up obsolete web behavior without affecting normal app access.
Original PR description
[REM] web: remove unused controller /apps/<app> This controller never really worked in the last 3 versions. It was fixed in 11.3 with e935099 but broken with refactoring in 12.0 at a higher level with 19eacf7. It was even worse in 13.0 as it was leading to a traceback: `view_type` field got removed with 3cd7ed0 but this controller was still reading that field. Forward-Port-Of: odoo/odoo#38173
Code cleanup and technical improvements
The coupon-related functionality is being reorganized into a new shared coupon module. This makes it easier for different sales apps to reuse and extend coupon capabilities without duplicating work.
Original PR description
This refactoring extracts parts of `sale_coupon` module to create a more generic module called `coupon`. This new module can be extended in different sales modules to implement functionalities specific to modules that extend it. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change restructures coupon functionality so shared coupon logic lives in a more generic coupon module. This makes it easier for different sales-related apps, such as helpdesk sales coupons, to reuse and extend coupon features consistently without duplicating work.
Original PR description
This refactoring extracts parts of sale_coupon module to create a more generic module called coupon. This new module can be extended in different sales modules to implement functionalities specific to modules that extend it.