Daily updates from Odoo
Monday, October 14, 2024
27 changes
4 changes
Resolved issues and error corrections
The mobile search panel no longer shows an extra red dot when a filter is selected. This removes a redundant visual cue, making the interface cleaner while keeping the selected filter clearly visible.
Original PR description
On mobile, whwen a domain is selected in the SearchPanel, there is a red dot that indicates there is a domain applied. This red dot is useless because we actually see that the domain is selected. This commit removes it. task-4246980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update brings the embedded spreadsheet engine to a newer maintenance version and fixes several issues affecting formatting, exporting, find-and-replace, and session handling. Users should see more reliable spreadsheet behavior, especially when copying table styles, exporting styled sheets, and searching formulas.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/7e88becba [REL] 17.2.24 Task: 0 https://github.com/odoo/o-spreadsheet/commit/1b554f7e1 [FIX] session: ignore already…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/7e88becba [REL] 17.2.24 Task: 0 https://github.com/odoo/o-spreadsheet/commit/1b554f7e1 [FIX] session: ignore already processed SNAPSHOT_CREATED Task: 4243943 https://github.com/odoo/o-spreadsheet/commit/f562b8eed [FIX] clipboard: cannot paste whole table style Task: 4218988 https://github.com/odoo/o-spreadsheet/commit/2289fc357 [FIX] export: Fix default style ignored at export Task: 4178743 https://github.com/odoo/o-spreadsheet/commit/b57230ff5 [FIX] table: update table style on header group removal Task: 4081345 https://github.com/odoo/o-spreadsheet/commit/d73ba2ab8 [FIX] Find&Replace: always search cell content if `searchFormula` Task: 4175968 Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Product catalog prices are now hidden when the catalog is opened from manufacturing or repair orders. This keeps the catalog focused on selecting components, where price information is not relevant and could distract users.
Original PR description
This commit hides the unit price of products in the catalog, in case that the catalog was opened from a manufacturing or a repair order. This is because the catalog in this case is used to add a component so the price information is irrelevant. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves Odoo's internal Hoot test tool by making failed test results easier to understand and rerun. It helps developers diagnose issues faster, which supports more reliable quality checks before changes reach users.
Original PR description
## Pull Request HOOT (PRHOOT) - part 25 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 25 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 Part 22: https://github.com/odoo/odoo/pull/176777 / https://github.com/odoo/enterprise/pull/68721 Part 23: https://github.com/odoo/odoo/pull/179660 / https://github.com/odoo/enterprise/pull/69728 Part 24: https://github.com/odoo/odoo/pull/181971 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
1 change
Resolved issues and error corrections
Recruitment users can now refuse an application without encountering an error. The fix removes an outdated field reference left after an earlier model change, improving reliability in the referral recruitment flow.
Original PR description
Steps: - Install hr_referral, hr_contract_salary - click on refuse button in application form Description of the issue/feature this PR addresses: In the recruitment module, clicking the refuse button on an application results in a traceback error. Cause The issue arises due to the name field, which was removed from the hr_applicant model (as per https://github.com/odoo/odoo/pull/173288). The system still attempts to retrieve this field, causing the error. Fix: This PR resolves the issue by removing the unnecessary name field from the applicant model task-4195716
13 changes
Resolved issues and error corrections
This fix prevents list views from visually breaking when users drag and drop records in configurations where automatic column sizing is disabled. It keeps tables aligned and usable during record reordering, improving reliability in a niche list view setup.
Original PR description
This is more a theoretical issue than a real issue per se. The list renderer has a flag (`useMagicColumnWidths`) that allows to disable the column widths logic. It is enabled by default, and there's only one usecase in Odoo where we disable it (and this usecase is very custom, and doesn't allow to d&d records). However, when the feature is disabled, the table layout is broken when the user drags a record. This commit is a simple patch that ensures that the layout of the list remains intact when drag&dropping a record, whether the column widths logic is enabled or not. 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
This update combines several fixes and small improvements across Odoo, including more accurate purchase valuation calculations, better portal invoice-sending preferences, and smoother user interface hover behavior. It also resolves Point of Sale issues for company branches and superuser sessions, and updates German tax report presentation to better match local expectations.
Original PR description
Description of the issue/feature this PR addresses: Clean the drop down menu hover on the "mobile menu" word by remplacing the "mobile menu" to "QR menu" for better constancy with the settings 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
This update refreshes Odoo's spreadsheet engine with fixes and improvements for pivot tables, charts, formatting, autofill, clipboard handling, and Excel export. Users should see more reliable spreadsheet behavior, better chart handling, and fewer issues when duplicating or exporting spreadsheet content.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/1771f68b4 [REL] 18.0.1 Task: 0 https://github.com/odoo/o-spreadsheet/commit/7ea2733a9 [FIX] session: ignore already…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/1771f68b4 [REL] 18.0.1 Task: 0 https://github.com/odoo/o-spreadsheet/commit/7ea2733a9 [FIX] session: ignore already processed SNAPSHOT_CREATED Task: 4243943 https://github.com/odoo/o-spreadsheet/commit/77c19d8f8 [FIX] pivot: finer grained cycle detection Task: 4214188 https://github.com/odoo/o-spreadsheet/commit/246d233be [FIX] data validation: unify checkbox style Task: 4235283 https://github.com/odoo/o-spreadsheet/commit/2a83a3efc [FIX] pivot: date time measures are not supported Task: 4241036 https://github.com/odoo/o-spreadsheet/commit/7dfcb2a7c [IMP] pivot: duplicate pivot with table Task: 4048028 https://github.com/odoo/o-spreadsheet/commit/d29a874ba [FIX] paint format: properly paint borders and tables Task: 4213894 https://github.com/odoo/o-spreadsheet/commit/a006d0b46 [IMP] autofill: support date autofill Task: 4173602 https://github.com/odoo/o-spreadsheet/commit/941317f65 [FIX] pivot: remove forbidden chars when duplicating Task: 4221325 https://github.com/odoo/o-spreadsheet/commit/3fd1ef930 [FIX] clipboard: cannot paste whole table style Task: 4218988 https://github.com/odoo/o-spreadsheet/commit/eb412abf4 [FIX] xlsx: fix table total row export Task: 4206619 https://github.com/odoo/o-spreadsheet/commit/70e8b8f79 [FIX] pivot: wrong headers with hidden measures Task: 4190869 https://github.com/odoo/o-spreadsheet/commit/d85d4bc01 [FIX] pivot: running total display with multiple measures Task: 4207244 https://github.com/odoo/o-spreadsheet/commit/449782abe [IMP] charts: handles multiple bars in combo chart Task: 4164614 https://github.com/odoo/o-spreadsheet/commit/d89d673be [FIX] autocomplete: Stop the range selection after selecting a pivot proposal Task: 4176481 https://github.com/odoo/o-spreadsheet/commit/f0d1602ee [PERF] Actions: Fill missing ids with fast unique values Task: 4216427 https://github.com/odoo/o-spreadsheet/commit/cee2e47e8 [REL] 18.0 https://github.com/odoo/o-spreadsheet/commit/de00e5f17 [FIX] charts: fix combo chart export Task: 4092078 https://github.com/odoo/o-spreadsheet/commit/f1a7866f7 [IMP] Charts: ignore hidden row/cols in datasets and labels Task: 3976159 Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
The accounting dashboard now shows the correct number of vendor bills that are waiting to be paid or late. This prevents confusion when bills use split payment terms, where one bill could previously be counted more than once.
Original PR description
Description of the issue this commit addresses: Since recently, the <[X] To Pay> and <[X] Late> buttons don't send the user to an account.move.line model view anymore but to an account.move model one…
Description of the issue this commit addresses:
Since recently, the <[X] To Pay> and <[X] Late> buttons don't send the user to an account.move.line model view anymore but to an account.move model one but when that change was made, the computation of the number of items on the dashboard was not changed so it was still counting the amount of account.move. line there was in the account.move items that were shown in the view resulting in wrong totals.
---
Steps to reproduce:
1. Install account
2. Create new Vendor Bill with a split payment term ("30% now, Balance 60 Days" for example) on today's date for Bill Date.
3. Go to the dashboard, click the <[X] To Pay> button.
4. the amount of moves in the view that is opened with the button is one above the value of "X" in the button.
This is due to using a split payment term that creates two installment for a single vendor bill hence counting one more aml than there are moves.
---
Desired behavior after this commit is merged:
The right amount of To Pay and Late moves is shown at all times.
---
Enterprise PR: https://github.com/odoo/enterprise/pull/70725
No task
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix gives avatar-based employee/user fields enough room in list views and prevents action buttons from spilling outside their columns. Work order lists should look cleaner and remain usable when buttons change after an action starts.
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
Closing a restaurant register now ignores unfinished local orders that do not yet have a final system ID. This prevents an error when canceling ongoing table orders, helping staff close sessions reliably.
Original PR description
Steps to reproduce:
---
- Install the ``pos_restaurant`` module
- Open Register of Restaurant > Select any table
- Add two tables from the (+) sign
- Complete the order in the first table and In the second table just order the food(Don't make payment)
- Now Close the register and cancel the orders
Traceback:
---
``Expected singleton: pos.order('p', 'o', 's', '.', 'o', 'r', 'd', 'e', 'r', '_', '3')``
Previous Behaviour:
---
When we closed the register and canceled an order, it included orders with a status of 'Ongoing.' These ongoing orders have an ``order ID like "pos.order_3"`` which is causing an error.
After Commit:
---
We will now only pass the order whose id will be in number when closing the register. Due to this, we will only have the order whose id is in number.
sentry-5703437687
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix prevents module upgrades from failing when payroll work entry types update their country information while existing work entries are present. Businesses can upgrade affected payroll localization modules without manually removing or changing existing work entry records.
Original PR description
A new constraint on model `hr.work.entry.type` triggers an error while updating `country_id` if related work entries exist. Since a lot of the data records from enterprise don't have the noupdate flag and they include the country as a field to update, the constraint is triggered just by upgrading the module. Steps to reproduce: - Install one of the affected modules (eg `l10n_au_hr_payroll`) - Create a work entry from one of the types from the module - Upgrade the module.
The translation button now appears in the correct position when multi-language support is enabled. This improves the editing experience by removing a small visual misalignment that could confuse users working with translations.
Original PR description
Version: - 18.0 Steps to Reproduce: - Install the sign, project, and web_editor modules. - Enable multi-language support. Issue: - The translation button is misaligned. Cause: - The button is positioned using absolute within a div tag, which causes the alignment issue. Solution: - Remove the absolute positioning to fix the alignment. task-4244696
Follow-up emails now attach the Partner Ledger in the customer’s selected language instead of the sender’s language. This helps customers receive account information they can understand and reduces confusion in multilingual collections processes.
Original PR description
If a language is set on the customer when doing the followup, the attached Partner Ledger was always generated in the language of the active user. Instead, if a language is set on the customer, we want to use it.
A previously disabled automated test for the mobile web interface has been re-enabled after the underlying testing issue was fixed. This improves confidence that mobile event handling continues to work correctly without changing user-facing behavior.
Original PR description
Since the fix in HOOT was merged the test can actually be run. https://github.com/odoo/odoo/pull/183099
Fixed an error that could stop recruitment data extraction when adding candidate skills. The system now uses the correct candidate reference, helping recruiters avoid failed or interrupted candidate processing.
Original PR description
Error is generated because ``applicant_id`` field is used to create record of ``hr.candidate.skill`` model. Error: ``ValueError: Invalid field 'applicant_id' on model 'hr.candidate.skill'`` https://github.com/odoo/enterprise/blob/0c7c006dcd0ba53ff9a7aa8ca2446794505a6916/hr_recruitment_extract/models/hr_candidate.py#L60-L61 Here, ``applicant_id`` field is used instead of ``candidate_id`` field. sentry-5983999720
The dashboard now shows accurate counts for bills waiting to be paid or overdue, including bills with split payment terms. This helps users trust the dashboard figures and avoid confusion when opening the related bill lists.
Original PR description
Description of the issue this commit addresses: Since recently, the <[X] To Pay> and <[X] Late> buttons don't send the user to an account.move.line model view anymore but to an account.move model one…
Description of the issue this commit addresses:
Since recently, the <[X] To Pay> and <[X] Late> buttons don't send the user to an account.move.line model view anymore but to an account.move model one but when that change was made, the computation of the number of items on the dashboard was not changed so it was still counting the amount of account.move. line there was in the account.move items that were shown in the view resulting in wrong totals.
---
Steps to reproduce:
1. Install account
2. Create new Vendor Bill with a split payment term ("30% now, Balance 60 Days" for example) on today's date for Bill Date.
3. Go to the dashboard, click the <[X] To Pay> button.
4. the amount of moves in the view that is opened with the button is one above the value of "X" in the button.
This is due to using a split payment term that creates two installment for a single vendor bill hence counting one more aml than there are moves.
---
Desired behavior after this commit is merged:
The right amount of To Pay and Late moves is shown at all times.
---
Note on the fix:
The fix for this issue is in the community PR of the bundle, the fix modifies a method which was overriden in enterprise and this PR addresses the override to match with the new version of the method.
---
Community PR: https://github.com/odoo/odoo/pull/181535
No taskFixed an error that prevented users from opening Vietnamese sales and purchase tax return reports in certain tax period views. This ensures companies using Vietnam localization can access required tax reports reliably.
Original PR description
Currently, a traceback is occurring when the user tries to open a Vietnamese tax returns report. To reproduce this issue: 1) Install l10n_vn_reports and switch to VN company 2) Create an invoice with a product and tax 3) Now open the Tax Returns and change the report as `Sales/Purchase Tax Report (VN)` and tax period in years Error:- ``` ProgrammingError: can't adapt type 'dict' ``` This error is occurring because in `column_group_options` we get the values as dict. For the method `_currency_table_apply_rate` we expect the value to be in the string. To handle the dict for returning the join conditions we use `_currency_table_aml_join`. sentry-5962808992
9 changes
Resolved issues and error corrections
This update fixes a technical issue that occurred when upgrading the Belgium and Hong Kong payroll modules with demo data. The leave type records are now marked as non-updatable to prevent constraint violations during module upgrades, ensuring smoother system updates for users in these regions.
Original PR description
The definition of these records include the field `requires_allocation`, so updating them will trigger the constraint for that field. There's already a [fix for this](https://github.com/odoo/odoo/pull/182533) but it will be interesting to still mark these records as noupdate to be coherent with all the other `hr.leave.type` records. To reproduce: - Install `l10n_hk_hr_payroll` with demo data - Upgrade the module Forward-Port-Of: odoo/enterprise#71844
This fix prevents duplicate accounting records from being created when setting up companies with parent-subsidiary relationships. The system now loads the chart of accounts from parent companies first during initialization and migration, ensuring clean and accurate financial data structures across all localization modules.
Original PR description
In migration and init scripts, when loading the chart of accounts or parts of it, we should always start with the parent companies to avoid creating duplicate chart records
This update resolves a crash that occurred when users tried to print or export the trial balance report to Excel. The issue was caused by a recent code change that didn't properly handle certain data conditions, resulting in an error message instead of a successful export. Users can now export trial balance reports without encountering errors.
Original PR description
before this commit, on printing trial balance report in excel, raises an exception when the level is None it cannot be compared with >= and thus exception is shown: elif level >= 3: TypeError: '>=' not supported between instances of 'NoneType' and 'int'  introduced in the commit: https://github.com/odoo/enterprise/commit/9d1f27082cc2e837951a3a5c3337cc90531de04a after this commit, no error wont be shown when printing trial balance in excel Forward-Port-Of: odoo/enterprise#71846
This fix prevents helpdesk timesheets from being incorrectly merged together when tracking time on different helpdesk tickets. Previously, when users tracked time on different tickets within the same helpdesk project, the system would combine them into a single timesheet entry instead of creating separate ones. This update ensures each ticket gets its own timesheet record, improving time tracking accuracy for helpdesk teams.
Original PR description
Steps to reproduce: - Helpdesk app > Any team > : Menu > Enable 'Timesheets' setting - Timesheets app > Start timer - Set your helpdesk project and any task (Do not add a description) - Stop timer >…
Steps to reproduce: - Helpdesk app > Any team > : Menu > Enable 'Timesheets' setting - Timesheets app > Start timer - Set your helpdesk project and any task (Do not add a description) - Stop timer > Do it again with same the project and a different task - Stop timer > Time is added to previous timesheet The expected behavior would be to create a new timesheet since the task is different. The reason both timesheets are merged is that we check 'task_id' for redundance while helpdesk 'tasks' are instead recorded in the 'helpdesk_ticket_id'. Since it is forbidden for a timesheet to have both a 'task_id' and 'helpdesk_ticket_id', it is guaranteed that task_id will be False for both of our entries, leading to a merge. Similarily we can use that property since adding helpdesk_ticket_id to the domain won't change the usual behavior (the field will always be False if the project is not from Helpdesk) to add an extra condition here. Source: we have a contraint '_check_no_link_task_and_ticket' which ensures that. opw-4203678
This fix improves the default configuration for document projects by automatically setting the correct group assignment. Previously, users could easily forget to configure the proper group settings, leading to incorrect access permissions. This change reduces manual configuration errors and ensures documents are properly organized from the start.
Original PR description
It’s too easy to forget to set the right group opw-4206894 Forward-Port-Of: odoo/enterprise#70894
Fixed a system error that occurred when calculating taxes on invoices with multiple product lines using different cost centers, where the same tax applied to each line. The system now properly handles multiple tax lines for the same tax by distributing any rounding differences evenly across all affected lines, preventing calculation failures.
Original PR description
Set up Avatax environment Create an Invoice with 2 lines: - Prod A, Analytic Account A - Prod B, Analytic Account B Compute taxes Now open one of the newly added taxes On the repartition line click on the 3 dots menu, show 'Tax Closing Entry' Disable 'Tax Closing Entry' on the invoice repartition line Now go back to the invoice Compute taxes again Issue: Traceback will raise 'ValueError: Expected singleton: account.move.line(...' This occurs because, with this tax configuration, on the move we will have 2 tax lines for the same tax, as the lines needs a different analytic account and cannot be grouped together. When we compare the amount per tax we'll have a recordset and it will raise an error. A solution is to acknowledge that we might have more than 1 line and split the possible difference evenly on the tax lines opw-3976597
This fix resolves an issue where users received a CSRF error when uploading documents through the document request feature. The problem was caused by JavaScript files loading in the wrong order, preventing security tokens from being properly added. The fix reorders the file loading sequence to ensure all necessary components are available before they're needed.
Original PR description
Current behaviour: --- When you click on the "request a document" link, then upload a document, you get a CSRF error Steps to reproduce: --- 1. Install documents 2. In documents, click the arrow next to "new", then "request" 3. Add a name, and a "request to", then click "request" 4. Go to messages, copy the link in the generated email 5. Paste the link in an incognito window 6. Upload a document, CSRF error Cause of the issue: --- The js file that adds the CSRF token (documents_public_pages.js) could not be loaded due to an error caused by website_sale_renting: `TypeError: odoo.define is not a function` The mixin file was loaded before the odoo module loader. Caused by: https://github.com/odoo/enterprise/commit/93d09071a08bd5de948886729d827b1c46e907d9 Fix: --- Put js code from website_sale_renting before owl.js which is right after assets_frontend_minimal, containing module_loader.js opw-4138333
This fix resolves a problem where the real-time connection breaks when users delete and recreate a spreadsheet in different browser tabs. The system now properly checks if a spreadsheet exists before attempting to update it, preventing connection failures when working with spreadsheets.
Original PR description
Steps to reproduce: - open a first tab - create a new spreadsheet - open a second tab - from that new tab, delete the spreadsheet (send to trash, then permanently delete it from the trash) - create a new spreadsheet => update a few cells, the websocket connection is broken. Task: 4252590
This update resolves two critical issues that prevented users from generating Mexican electronic invoices (CFDI) when using the Autozone Addenda feature with sales orders. The fix ensures that date information is properly formatted and handles cases where invoices are created from multiple sales orders, allowing the invoice generation process to complete successfully.
Original PR description
This commit targets to fix two errors: 1.- When trying to create the EDI document for an invoice that has a sale order related to it, when using the Addenda Autozone a traceback appeared. ### Cause:…
This commit targets to fix two errors:
1.- When trying to create the EDI document for
an invoice that has a sale order related to it, when using the Addenda Autozone a traceback appeared.
### Cause:
In attribute t-att-PODATE for the Autozone Addenda we are sending a datetime object
to the strptime function of datetime which in reality it needs to receive a string
object instead. This raises a TypeError
### Solution:
Since the objective is to set a string date, we convert the date_order into a string date
using strftime function from datetime module
### Steps to reproduce:
- Install 'Sales' application and 'l10n_mx_edi' module
- In a company with mexican localization selected go to Sales > Quotations and create a new Order
- Select a contact with the Addenda Autozone selected
- Confirm it and create the corresponding invoice
- Confirm the invoice and generate the CFDI
***
2.- When creating an invoice from multiple sale orders with contact with Addenda Autozone selected, a traceback is raised
### Steps to reproduce:
- Install 'Sales' application and 'l10n_mx_edi' module
- In a company with mexican localization selected go to Sales > Quotations
- Create two orders at least with a contact with Addenda Autozone selected and confirmed them
- In tree view select created orders and click on Create Invoices
- Go to Created Invoice and confirm it and generate the CFDI
### Cause:
In attribute t-att-PODATE for the Autozone Addenda is not expecting a recordset when initializing the
value of sale_id, this causes a ValueError: expected singleton error when retrieving value of date_order
when we create a invoice for multiple sale orders
### Solution:
Initialize sale_id with the first order retrieved to use it