Search
Navigate
Branch
Tuesday, September 3, 2024
38 changes
5 changes
Miscellaneous changes
The route `/website_mail/follow` can create new contacts, for that reason, it should be protected with recaptcha similar to `/website/form/<string:model_name>` and `/website_mass_mailing/subscribe` This PR adds the Recaptcha check on the endpoint: `/website_mail/follow` Before this PR it was possible to create as much dummy contact as you wanted as an attacker with a simple script opw-4023724 Forward-Port-Of: odoo/odoo#178435 Forward-Port-Of: odoo/odoo#175083
Original PR description
The route `/website_mail/follow` can create new contacts, for that reason, it should be protected with recaptcha similar to `/website/form/<string:model_name>` and `/website_mass_mailing/subscribe` This PR adds the Recaptcha check on the endpoint: `/website_mail/follow` Before this PR it was possible to create as much dummy contact as you wanted as an attacker with a simple script opw-4023724 Forward-Port-Of: odoo/odoo#178435 Forward-Port-Of: odoo/odoo#175083
*= event_crm_sale, website_event_crm * -Probably miss by script since https://github.com/odoo/odoo/pull/104741/commits/332c117f60a36f723c450f61ce2e0e7181d66c21 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#177703
Original PR description
*= event_crm_sale, website_event_crm * -Probably miss by script since https://github.com/odoo/odoo/pull/104741/commits/332c117f60a36f723c450f61ce2e0e7181d66c21 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#177703
### Steps to reproduce the issue: 1. Make sure you have access to the Analytic Distribution fields 2. Create an expense 3. Open the Split Expense Wizard and add Analytic Distribution to the new Expenses - Click out of the Analytic Distribution widget to close it, don't use the close icon 4. Finish the splitting process 5. On the Tree view that follows, the Analytic Distribution fields are empty ### Explanation: `onWindowClick` checks if the `analytic_distirbution` widget should
Original PR description
### Steps to reproduce the issue: 1. Make sure you have access to the Analytic Distribution fields 2. Create an expense 3. Open the Split Expense Wizard and add Analytic Distribution to the new…
### Steps to reproduce the issue:
1. Make sure you have access to the Analytic Distribution fields
2. Create an expense
3. Open the Split Expense Wizard and add Analytic Distribution to the new Expenses
- Click out of the Analytic Distribution widget to close it, don't use the close icon
4. Finish the splitting process
5. On the Tree view that follows, the Analytic Distribution fields are empty
### Explanation:
`onWindowClick` checks if the `analytic_distirbution` widget should close. If the conditions are met, `forceCloseEditor` is called and the data is saved.
In this case, one of the `selectors` is retrieved by `ev.target.closest`, namely `.modal:not(.o_inactive_modal)`, therefore not meeting the conditions to call `forceCloseEditor`, but the widget still closes.
### Fix reasoning:
We want `forceCloseEditor` to be called in this situation, since the user is not clicking on an element related to `analytic_distribution`. We can use `o_act_window` to filter Search More modals from Wizards, as it is absent from the former.
opw-4001757
Forward-Port-Of: odoo/odoo#177161Before, the default user assigned to the self order was a standard pos user. This commit changes the default user to pos_manager to avoid any access rights issues. RB error: 70391 Forward-Port-Of: odoo/odoo#173102
Original PR description
Before, the default user assigned to the self order was a standard pos user. This commit changes the default user to pos_manager to avoid any access rights issues. RB error: 70391 Forward-Port-Of: odoo/odoo#173102
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is computed it causes `psycopg2.errors.AmbiguousColumn` during `GROUP BY` operation here[^1]. Because **account_move_line** is one of the joined tables in that query and it causes issue while grouping. Actually the issue can occur if any of the joined tables in that[^2] query has custom field with the
Original PR description
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is…
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is computed it causes `psycopg2.errors.AmbiguousColumn` during `GROUP BY` operation here[^1]. Because **account_move_line** is one of the joined tables in that query and it causes issue while grouping. Actually the issue can occur if any of the joined tables in that[^2] query has custom field with the names above, it will cause same issue.
To resolve this issue, I added a table alias
to the all 3 elements in GROUP BY clause.
Steps to reproduce:
1. Install module account in any version >= `saas~15.3`
2. Add custom field to the model `account.move.line` with name `source_move_id`.
3. Try to create invoice
You will face issue similar to this:
```
File "/home/odoo/src/odoo/saas-15.3/addons/account/models/account_move.py", line 1430, in _compute_amount
self._cr.execute(' UNION ALL '.join(queries), [stored_ids, stored_ids])
File "/home/odoo/src/odoo/saas-15.3/odoo/sql_db.py", line 356, in execute
res = self._obj.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "source_move_id" is ambiguous
LINE 20: GROUP BY source_line_id, source_move_id,...
```
I targeted this PR to `16.0` because branch `saas-15.3` is disbaled
[^1]: https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L912
[^2]: https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L896-L912
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#17757923 changes
New functionality added to Odoo
A new payroll wizard helps calculate Tax Deducted at Source (TDS) from the provided employee and contract details. This makes monthly payroll processing easier and more transparent by showing the tax calculation before applying it to contracts.
Original PR description
In this PR, a new wizard is created to calculate the TDS based on the given parameters and apply it to the monthly contracts Task - 3910821
10 changes
Enhancements to existing features
Users can now customize which time period options (month, quarter, or both) appear in date filters within spreadsheets. This improvement gives teams more flexibility in how they filter and view data, allowing them to focus on the specific time granularities that matter most for their analysis.
Original PR description
This commit adds the possibility to disable the month or quarter granularity (or both) for fixedPeriod date filters. Task: [3887844](https://www.odoo.com/web#id=3887844&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form)
Enhancements to existing features
The appointment booking pages were updated to use standard browser technology instead of an older helper library. This keeps the experience the same for users while making the frontend easier to maintain and better aligned with modern web practices.
Original PR description
Specification: This PR focuses on transitioning all frontend code from jQuery to Vanilla JavaScript. The changes specifically target files in the web.assets_frontend. task-3770362
Automatic warehouse creation now applies only to the first company, so related multi-company test flows are updated to create the needed warehouse explicitly. This keeps sale, warehouse, and manufacturing planning scenarios reliable without changing day-to-day business workflows.
Original PR description
In https://github.com/odoo/odoo/pull/172457, automatic warehouse creation is restricted to be only for the first company, hence, some unit tests that create a multi-company environment needs to be modified. A warehouse creation step is added to these tests so that the flow being tested does not break. Task-4034713
Web Studio now notifies selected users when a record action is approved or refused, rather than when the approval request is first created. This makes notifications more timely and relevant, so stakeholders are alerted when a decision has actually been made.
Original PR description
We refactor the way the field users_to_notify is used. Now, the users to notify (if any) are notified when an action/method on a record is approved/refused. Previously they were notified when a request was created. They are not longer notified at that moment. Task ID: 4122972
The timesheet analysis report now has clearer list and form views with more relevant fields for reviewing time entries. This makes it easier for teams using timesheets and helpdesk timesheets to inspect and analyze reported work without seeing an overly technical default layout.
Original PR description
## [IMP] {helpdesk_}timesheet{_grid}: make list view for timesheets analysis report
This commit overrides the list view of timesheets analysis report to add fields that could be interested to analysis.
## [IMP] {helpdesk_}timesheet{_grid}: add form view for timesheet analys…
…is report
Before this commit, the form view was the default one that is the one
displaying all the fields defined inside the report.
This commit defined a form view to have the same render than one defined
for timesheets.
task-4053021The rental date picker now displays better when shoppers use the collapsed sidebar on the website shop. The off-canvas menu also keeps product categories first, making browsing and date selection clearer for customers.
Original PR description
Since the introduction of the new "Collapsed sidebar" feature in https://github.com/odoo/odoo/pull/177056, this commit adapts the date picker style when the sidebar is collapsed. task-3987018 Requires: - https://github.com/odoo/odoo/pull/177056 --- <img width="1776" alt="Capture d’écran 2024-08-20 à 09 38 23" src="https://github.com/user-attachments/assets/89fa009b-8c59-48ea-bc65-6c72f03a50d7">
Users returning to a spreadsheet from a drill-down records view now keep their filters, selected cells, scroll position, and loaded data. This avoids frustrating resets and delays, especially when working with pivot tables and shared spreadsheets.
Manufacturing users can now choose which existing operation should come before a newly added shop floor operation. This makes it easier to keep production steps in the right order when plans change during execution.
Original PR description
This commit permits to select a previous operation when the user adds a new operation from the shop floor. task-3848797
Published Knowledge articles now provide social platforms with article-specific preview information instead of generic website defaults. This improves how shared links appear on services like Facebook and WhatsApp, making them clearer and more appealing to open.
Original PR description
When a user publishes an article and shares the access link with a friend on Facebook, WhatsApp, or other social media platforms, most platforms fetch the website's Open Graph metadata to display a preview of the link. For the website's knowledge module, we have not defined any Open Graph metadata. The system currently uses default values loaded from the `ir.ui.view` model and the preview does not give any information about the article. To enhance the link preview on the external platforms and enhance the SEO of the articles, we will manually set the Open Graph metadata using the information about the article. This should make people more inclined to click on the link. task-4001922
The Settings menu now uses the same “Social Marketing” name as the app itself. This removes confusion caused by the previous “Social Media” label and makes the user experience more consistent.
Original PR description
### Before this PR: The name of the app is 'Social Marketing' but in settings it shows 'Social Media'. ### After this PR: Fix naming in Settings Menu. Social Media → Social Marketing Task-4143044
Rental and subscription pricing tables now appear inside the product details accordion when that layout is enabled. This keeps product pages cleaner and more consistent while preserving the pricing information shoppers need.
Original PR description
Follow the changes made in [community](https://github.com/odoo/odoo/pull/173823), this PR shows the rental and subscription pricing table inside the product details accordion if the accordion is enabled by the user. task-3987039
Kanban card layouts in Field Service, IoT, and Knowledge have been simplified using newer standard components. This makes these screens easier to maintain and helps keep the user interface consistent with current Odoo practices.
Original PR description
In this commit we have simplified the kanban arch for the industry_fsm, industry_fsm_report,iot and knowledge modules.the goal is to simplify them, make them easier to read and use bootstrap utility classnames. - Previously, we used kanban-box, but now we are using kanban-card instead. - Deprecated oe_kanban_global_click and oe_kanban_global_click_edit. - More use of `<field/>` tags - Removed the oe_kanban_colorpicker class and replaced it with the kanban_color_picker widget. - Changed type='edit' to type='open' to open records. since version 16, records always open in edit mode by default. - kanban_image from rendering context, is deprecated so we use `<field name=... widget=image/>` instead - kanban_color, kanban_getcolor and kanban_getcolorname are deprecated use new attribute highlight_color=color_field_name on root node Task-3992107
Companies can now distinguish the country used for tax mapping from the delivery country used for automatic fiscal position detection. This helps businesses exporting from warehouses outside their fiscal country apply the right taxes without rebuilding their fiscal position setup.
Original PR description
Description of the issue this commit addresses: Some companies export goods from warehouses outside of their fiscal country. It is currently not possible to use the "Detect Automatically" feature of the fiscal positions for them as the country they need to set to get the right tax mapping is not the country that needs to be detected for the auto apply. --- Desired behavior after this commit is merged: This commit allows users upon the installation of the new module to split the country of the tax mapping and the country of the auto apply. They are named "Fiscal Country" and "Delivery Country" and it grants companies the ability to have a working flow without starting from scratch if they need such a behavior. --- Community PR: https://github.com/odoo/odoo/pull/177746 task-4066525
Batch payslip generation now only includes employees with an active contract matching the selected salary structure type. This helps payroll teams avoid creating incorrect payslips and reduces manual cleanup.
Original PR description
This PR enhances the batch payslip generation process. Previously, payslips were generated for all employees, regardless of their salary structure type. Now, payslips will only be generated for employees with a running contract based on the same salary structure type. task-4002203
Resolved issues and error corrections
This fix makes the Philippine SAWT and QAP report export order consistent every time. It prevents random automated test failures, helping keep releases stable without changing business functionality.
Original PR description
Folllow up to #67860: the use of a `set` in `export_sawt_qap` makes export ordering non-deterministic, which will randomly fail the checks in `TestSawtQapGeneration` (`test_sawt` and `test_qap`). Use a list to ensure the export is deterministically ordered. Example build failures: - https://runbot.odoo.com/runbot/build/67649933 - https://runbot.odoo.com/runbot/build/67650267
Code cleanup and technical improvements
This internal cleanup standardizes how the frontend identifies the current user by renaming a session field from user_id to uid. It helps keep enterprise modules aligned with the core platform change without changing day-to-day user workflows.
Original PR description
community pr: https://github.com/odoo/odoo/pull/177985
Miscellaneous changes
Performs test of a related commit in communiy: [FIX] mail: include whatsapp in webpush notifications There are couple of components in the notification architecture. For the sake of illustration let's simplify it with the following: Sender -> Queuer -> Receiver Queuer is an FMC backend, so we should only be concerned about the other two. Receiver which is just a frontend service worker that will generate notifications as soon as he receives an event. The issue (before this commit) was in the
Original PR description
Performs test of a related commit in communiy: [FIX] mail: include whatsapp in webpush notifications There are couple of components in the notification architecture. For the sake of illustration let's simplify it with the following: Sender -> Queuer -> Receiver Queuer is an FMC backend, so we should only be concerned about the other two. Receiver which is just a frontend service worker that will generate notifications as soon as he receives an event. The issue (before this commit) was in the Sender part, which was skipping whatsapp type message generation. [Reproduce] - Configure Whatsapp account, include user A in "Notify users" - Allow notifications in your browser (chat icon/ OdooBot suggestion) - Send a whatsapp message to the configured whatsapp number - BUG: Push notification not showing up opw-3720699 Forward-Port-Of: odoo/enterprise#68807 Forward-Port-Of: odoo/enterprise#68453
The values computed in `super()._compute_l10n_br_goods_operation_type_id()` are immediately nullified by the successive `self.l10n_br_goods_operation_type_id = False`. Forward-Port-Of: odoo/enterprise#69177
Original PR description
The values computed in `super()._compute_l10n_br_goods_operation_type_id()` are immediately nullified by the successive `self.l10n_br_goods_operation_type_id = False`. Forward-Port-Of: odoo/enterprise#69177
Behaviour before fix: The exported planning ics file included both the employee's shifts and unwanted shifts by other employees. Behaviour after fix: The exported planning ics file only includes the employee's shifts. Solution: Don't include the domain to add unwnated shifts in the search of the _get_cs_file method of the planning.planning model. Task-3981746 Forward-Port-Of: odoo/enterprise#69050
Original PR description
Behaviour before fix: The exported planning ics file included both the employee's shifts and unwanted shifts by other employees. Behaviour after fix: The exported planning ics file only includes the employee's shifts. Solution: Don't include the domain to add unwnated shifts in the search of the _get_cs_file method of the planning.planning model. Task-3981746 Forward-Port-Of: odoo/enterprise#69050
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10
Original PR description
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Community: https://github.com/odoo/odoo/pull/176777 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#68827 Forward-Port-Of: odoo/enterprise#68721
While the format for the guid is the right in the xml, for the CSV, we should add double quotes, as asked by the format. The 2 zip should really be separated, with one for the csv and the other for the attachments Renamed the 2 buttons to indicate more clearly what they are about. The csv only expects a single attachment per move. We should then only export the message_main_attachment_id task-4131986 Forward-Port-Of: odoo/enterprise#68941 Forward-Port-Of: odoo/enterprise#68794
Original PR description
While the format for the guid is the right in the xml, for the CSV, we should add double quotes, as asked by the format. The 2 zip should really be separated, with one for the csv and the other for the attachments Renamed the 2 buttons to indicate more clearly what they are about. The csv only expects a single attachment per move. We should then only export the message_main_attachment_id task-4131986 Forward-Port-Of: odoo/enterprise#68941 Forward-Port-Of: odoo/enterprise#68794
In this PR, fixes payroll tour as hr responsible field moves from notebook to main view. Note: target saas-17.4 related task-3621276 Forward-Port-Of: odoo/enterprise#69327
Original PR description
In this PR, fixes payroll tour as hr responsible field moves from notebook to main view. Note: target saas-17.4 related task-3621276 Forward-Port-Of: odoo/enterprise#69327
task-4063399 Forward-Port-Of: odoo/enterprise#67016
Original PR description
task-4063399 Forward-Port-Of: odoo/enterprise#67016
The signature request feature has been improved to prevent users from accidentally creating templates on-the-fly through the request wizard. Users must now select from existing templates, which reduces errors and ensures better template management. This change makes the signature workflow more controlled and reliable.
Original PR description
Before this commit, Using the "request signature" option allowed users to create templates on the fly, which could lead to errors. In this commit, the Creation of templates on the fly from the wizard is no longer allowed. task-4069128
The POS IoT module now has a visual icon that will be displayed in the Odoo interface. This improvement makes the module easier to identify and recognize within the system, enhancing the overall user experience when browsing available modules.
Original PR description
Added `pos_iot` module icon.
Resolved issues and error corrections
Fixed an issue where the document preview window would unexpectedly close when users tried to add tags to a document. This improves the user experience by allowing users to add tags without losing their place or having to reopen the document preview.
Original PR description
Current behaviour: --- When you open a document, and you want to add a tag, the preview closes. Steps to reproduce: --- 1. Go to Documents 2. Open a document 3. Add a tag 4. The preview closes Cause of the issue: --- In updateRecordTagId from documents_search_model.js Update trigger > load > documents-close-preview trigger opw-3879288
This fix ensures that only service products can be used when creating sales order lines directly from helpdesk tickets. Previously, non-service products could be incorrectly added, which could cause issues with timesheet tracking. Now the system properly validates that only service products are allowed and shows a clear error message if someone tries to use a non-service product.
Original PR description
### Before this PR: ->If we create a product that isn't a service > open the helpdesk ticket form view -> type the name of the product you created from the SOL field and click create -> a new SOL is generated for this product and is successfully set on the ticket ### After this PR: A new SOL is generated only for service products, it should only be allowed for services products, it will throw validation error that isn't service task-3972359
This fix resolves a problem where marketing campaign activities were not displaying correctly when campaigns contained more than 40 activities. The system was splitting activities across multiple pages, but the hierarchical organization of parent and child activities only worked when all activities were loaded together. By removing the page limit, all activities now display properly regardless of quantity.
Original PR description
Current behaviour: --- When you create a campaign, if you add more activity (56) than the default pager limit (40) The next pager page will be empty (instead of showing the remaining 16 activities)…
Current behaviour: --- When you create a campaign, if you add more activity (56) than the default pager limit (40) The next pager page will be empty (instead of showing the remaining 16 activities) Steps to reproduce: --- 1. Go to Marketing Automation 2. Create a campaign 3. Create more than 40 activities 4. Alternate parents/child when creating 5. The pager will appear, with at least 2 pages 6. Go to the second page 7. Nothing displayed NB: When inputting the number of activities in the pager, everything is rendered fine. Cause of the issue: --- To be displayed, the activities are hierarchised, by finding child and parents (`_getSortedRecordsByHierarchy`) However this system works great when all the records are given. Using a pager, some records are not used in the hierarchy, causing the outputted list to be incomplete. (ie if an activity A is in the first 40 and the child in the last 16, it will not be rendered correctly) Fix: --- Disabling the pager by setting a higher limit opw-4006610 Forward-Port-Of: odoo/enterprise#67979
This update fixes failing tests in the subscription module that were caused by incorrect time handling during test execution. The fix ensures that time is properly frozen during testing, preventing intermittent test failures that occurred when tests were run at specific times. This improves the reliability of the subscription testing process.
Original PR description
Before this commit, some tests were failing because the time was not correctly frozen. The failing test could be seen when run like this: faketime '2024-08-31 02:01:00 UTC' ./odoo-bin -c ... runbot errors: 76518, 76519, 76520
This update fixes how Odoo calculates line discounts when importing Chilean invoices through email. Previously, Odoo would calculate discounts incorrectly, causing amounts to not match official records. The fix prioritizes the actual discount amount from the invoice file and now properly handles surcharges on line items, ensuring accurate financial records for Chilean businesses.
Original PR description
Before this PR: There are two problems: first, if you have a line discount like this: <img width="350" alt="Captura de pantalla 2024-03-27 a la(s) 09 48 55"…
Before this PR: There are two problems: first, if you have a line discount like this: <img width="350" alt="Captura de pantalla 2024-03-27 a la(s) 09 48 55" src="https://github.com/odoo/enterprise/assets/382893/7564b133-c6e9-4bab-97f3-d8a0a2634fe5"> The calculation made by Odoo is: 319319 * 21.35 / 100 = 68175 which does not match the amount placed in "DescuentoMonto". In this case, it is 68173 (difference of 2 CLP) which is why it is better to prioritize the discount amount instead of the percentage in the XML, which is already rounding, leading to a problem. The second: if you have a surcharge in the line, like this: <img width="354" alt="Captura de pantalla 2024-03-27 a la(s) 09 52 40" src="https://github.com/odoo/enterprise/assets/382893/5a7ffa96-a2d9-498f-acf3-7003c95aa789"> Odoo ignores it. After the PR: The first issue is fixed by giving priority to the "DescuentoMonto" tag. The second issue is added as an improvement. Since Odoo does not have a column to show the surcharge separated in the line, we are taking advantage of the feature that supports negative discounts in the line to put that surcharge as negative. Forward-Port-Of: odoo/enterprise#65842 Forward-Port-Of: odoo/enterprise#59532
Fixed an issue where the Spanish VAT Registro de IVA export button was appearing as the main action for all companies worldwide, regardless of their country. The button now only displays for Spanish companies, preventing confusion for users in other countries.
Original PR description
Before this commit, as soon as this module is installed, the button to generate the Libros Registro de IVA was the main button for all the companies. Instead of having a new handler, just add the code in the default handler, and manage the buttons based on the country of the current company.
Customers were receiving subscription renewal invoices twice—once with the standard template and again with the subscription-specific template. This fix ensures invoices are sent only once using the appropriate subscription template, improving the customer experience and reducing confusion.
Original PR description
When validating a payment for a subscription and the sale's setting `sale.automatic_invoice` is enabled, the invoice is send twice to the customer on subscription renewal; first with the normal…
When validating a payment for a subscription and the sale's setting `sale.automatic_invoice` is enabled, the invoice is send twice to the customer on subscription renewal; first with the normal template then a second time with the subscription specific template. To reproduce: - As Administrator: - Enable the "Automatic Invoice" option in the setting - Install/enable the `demo` payment provider and method - Log-in as `portal` user - Go the /shop and add the `Office Cleaning Service (SUB)` to you cart - Pay your order using the `Demo` payment method => The invoice is send once - Go to your subscription (/my/subscriptions) - Click on your new subscription - Scroll to the `Anticipate payment` section and pay for it (again choose the `Demo` payment method) - You get back the the subscription page, click on the last invoice (2nd invoice you created) => Scroll to the history section and see that the invoice is sent twice This commit ensure we're only sending invoice with the subscription specific template on renewal. OPW-3900040