Monday, August 26, 2024
40 changes · saas-17.1
Resolved issues and error corrections
This change prevents billing field requirements from one checkout context from being reused in later checkouts. It helps avoid incorrect mandatory fields appearing for customers or tests in other countries, improving reliability in portal and point of sale flows.
Original PR description
Since [1], the `MANDATORY_BILLING_FIELDS` are now returned through the method `/portal._get_mandatory_fields`:…
Since [1], the `MANDATORY_BILLING_FIELDS` are now returned through the method `/portal._get_mandatory_fields`: https://github.com/odoo/odoo/blob/b454a060a41961b7e0c9cc1ee6ec77b5cca1ec75/addons/portal/controllers/portal.py#L421-L423 Where `MANDATORY_BILLING_FIELDS` is a list defined on the class: https://github.com/odoo/odoo/blob/b454a060a41961b7e0c9cc1ee6ec77b5cca1ec75/addons/portal/controllers/portal.py#L134-L136 This is a problem: the value is an object, so if the list is modified during a call, the method will then return that modified list instead of the initial one. For instance, in `l10n_ec_website_sale`, we add some values to that list: https://github.com/odoo/odoo/blob/10b7c27a4fc873c6220d63a0686f484e92ae906b/addons/l10n_ec_website_sale/controllers/portal.py#L14-L17 Then, if we call again `_get_mandatory_fields` with a company that is not EC, we will still have `l10n_latam_identification_type_id` and `vat` in the list of mandatory fields. That is incorrect. Looking at builds on runbot, some of them failed because of that error. This is the case with the FW of [2] on 17.4 which is blocked because of the above issue. Indeed, this commit contains a tour that checkouts a cart with an EC company. And, in 17.4, this flow leads to a call of `_get_mandatory_fields`. As explained, we will therefore add the EC mandatory fields. So, if [2] is part of the code, and if we try to run this: `--test-tags=.test_checkout_address_ec,.test_qr_code_receipt_mx` Where the first test comes from [2] and the second one is an existing test in the code, it will fail: the first test will add some values in `MANDATORY_BILLING_FIELDS`. Then, during the second test, at some point we also check the mandatory fields: the method will return the modified list (i.e., with the EC fields), and we will not have any value for these unexpected fields -> the test will fail [1] 9b9b0ee4c2d8a8a66e5e0456acbb780e5d8d6456 [2] 732b4fbbf3009769708f9c9cba57609d22f2a570
This update removes an unnecessary critical error log from the Six payment terminal integration and replaces it with more appropriate logging. It also reduces connection-related errors when internet access is unavailable, helping keep point-of-sale operations clearer and less noisy for support teams.
Original PR description
A `_logger.critical` call was mistakenly committed in the `SixDriver.py` file. It has now been removed. Task: 3995682
This update replaces an outdated internal reference with the current approach for determining optional billing fields. It helps keep the website checkout flow compatible with newer platform behavior and reduces the risk of future maintenance issues.
Original PR description
`portal.CustomerPortal.OPTIONAL_BILLING_FIELDS` is deprecated, we should rather use the method `_get_optional_fields` c.f. the OC-side commit
Miscellaneous changes
Problem: The tax group name is not translated to Arabic. Purpose: Display the Arabic translation of the tax group name as well to stay consistent with the report. Steps to Reproduce: 1. Install l10n_sa 2. Switch to SA company 3. Add Arabic as a language 4. Add an Arabic translation for a tax group name 5. Change a contact's language to Arabic 6. Create an invoice with the Arabic contact and a tax from the same tax group 7. Preview or Print and observe that the tax group name is n
Original PR description
Problem: The tax group name is not translated to Arabic. Purpose: Display the Arabic translation of the tax group name as well to stay consistent with the report. Steps to Reproduce: 1. Install l10n_sa 2. Switch to SA company 3. Add Arabic as a language 4. Add an Arabic translation for a tax group name 5. Change a contact's language to Arabic 6. Create an invoice with the Arabic contact and a tax from the same tax group 7. Preview or Print and observe that the tax group name is not translated to Arabic opw-4094196 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177307
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#177854
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 Forward-Port-Of: odoo/odoo#177854
#### Partner feedbacks - Add small box notification in settings when NAV 3.0 authentication succeeds. - Add warning if the user un-checks the 'NAV 3.0' checkbox in the Send & Print. - Amend module manifest to clarify that we are electronically reporting paper invoices. - Report the *date of payment*, not date of issue of advance invoices as `advancePaymentDate` when issuing the final invoice. In addition, advanceExchangeRate should be the HUF exchange rate used for the payment. - Add a wa
Original PR description
#### Partner feedbacks - Add small box notification in settings when NAV 3.0 authentication succeeds. - Add warning if the user un-checks the 'NAV 3.0' checkbox in the Send & Print. - Amend module…
#### Partner feedbacks - Add small box notification in settings when NAV 3.0 authentication succeeds. - Add warning if the user un-checks the 'NAV 3.0' checkbox in the Send & Print. - Amend module manifest to clarify that we are electronically reporting paper invoices. - Report the *date of payment*, not date of issue of advance invoices as `advancePaymentDate` when issuing the final invoice. In addition, advanceExchangeRate should be the HUF exchange rate used for the payment. - Add a warning if not all advance invoices are paid when issuing the final invoice. - Add more checks in tests that the invoice checks pass when opening the Send & Print wizard. - Make the 'HU Tax Reason' field invisible if the tax has VAT type. #### Bugfixes - connection testing should be done on res.config.settings `create()`, not on `set_values()` because the related fields are written during the create, which is called in a prior transaction to the set_values. This ensures that if the connection cannot be established, the UserError causes the rollback of the transaction before the values are written to res_company. - the parse_error_response method wasn't correctly parsing error results leading to empty error messages Many thanks to: - Eiler Attila (online-erp.hu) - Geza Nagy (oregional.hu) taskid: 3985127 Forward-Port-Of: odoo/odoo#168932
Before when using `html-to-canvas` to render the receipt, sometime the css was missing. This was due to the loading time of the css. Each time we want to render the receipt, we need to load the css and then render it. Now we are using `html-to-image` which is more reliable and faster. It doesn't have the issue of missing css. It use the stylesheet of the current page instead of reloading it. --- ### Attributions [bubkoo/html-to-image](https://github.com/bubkoo/html-to-image) Forward-Por
Original PR description
Before when using `html-to-canvas` to render the receipt, sometime the css was missing. This was due to the loading time of the css. Each time we want to render the receipt, we need to load the css and then render it. Now we are using `html-to-image` which is more reliable and faster. It doesn't have the issue of missing css. It use the stylesheet of the current page instead of reloading it. --- ### Attributions [bubkoo/html-to-image](https://github.com/bubkoo/html-to-image) Forward-Port-Of: odoo/odoo#173512
Make _onChangeState to be inheritable by adding it to website_sale.js and returning a promise. Adapt the _onChangeState in PE localization for the inheritance by calling _super method and returning a promise. related: https://github.com/odoo/enterprise/pull/64786 task-2856566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169205
Original PR description
Make _onChangeState to be inheritable by adding it to website_sale.js and returning a promise. Adapt the _onChangeState in PE localization for the inheritance by calling _super method and returning a promise. related: https://github.com/odoo/enterprise/pull/64786 task-2856566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169205
Currently, when various timestamps in Odoo are processed through the `DeserializeDate` function, the offset is being doubled by mistake. The Odoo timestamps are passed as strings which have already been converted to UTC. If a user inputs a `DateTime` on a pricelist for instance, that time will be converted to its UTC equivalent before being converted to a string. The issue arises when we try to parse that string in the frontend during a PoS session. Odoo will correctly parse the timestamp, howev
Original PR description
Currently, when various timestamps in Odoo are processed through the `DeserializeDate` function, the offset is being doubled by mistake. The Odoo timestamps are passed as strings which have already…
Currently, when various timestamps in Odoo are processed through the `DeserializeDate` function, the offset is being doubled by mistake. The Odoo timestamps are passed as strings which have already been converted to UTC. If a user inputs a `DateTime` on a pricelist for instance, that time will be converted to its UTC equivalent before being converted to a string. The issue arises when we try to parse that string in the frontend during a PoS session. Odoo will correctly parse the timestamp, however through the `DeserializeDate` function it calls the `FromSQL` function with the parameter `zone: 'default'` which makes Odoo process this timestamp as being in the `SystemZone` (which is used by default in Luxon) instead of correctly recognizing that it is already in UTC. Thus, it will offset it again, which causes the functionality to fail This commit allows the timezone in `DeserializeDate` to be passed as a parameter, so in these cases we can pass the correct timezone and avoid this issue. Task-ID: 4106252 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176866
Do a modification of the picking type reservation method will not remove the reservation date on stock.move. It could create issue on the reservation or the forecast report where the reservation date is used without doing a check on the picking type reservation method. Clean the data when we update the reservation method 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 an
Original PR description
Do a modification of the picking type reservation method will not remove the reservation date on stock.move. It could create issue on the reservation or the forecast report where the reservation date is used without doing a check on the picking type reservation method. Clean the data when we update the reservation method 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#170341
Issue: Signature command doesn't work in 16.0 and raises an error in 17.0+ Steps to reproduce the issue: - install website - add forum in the website - create a new post in the forum - add signature - (nothing happens in 16.0, error in 17.0) Origin of the issue: ==================== The session in the forum post view doesn't have `uid`. Solution: ======== Add `uid` to the frontend session opw-4066436 Forward-Port-Of: odoo/odoo#177268 Forward-Port-Of: odoo/odoo#175573
Original PR description
Issue: Signature command doesn't work in 16.0 and raises an error in 17.0+ Steps to reproduce the issue: - install website - add forum in the website - create a new post in the forum - add signature - (nothing happens in 16.0, error in 17.0) Origin of the issue: ==================== The session in the forum post view doesn't have `uid`. Solution: ======== Add `uid` to the frontend session opw-4066436 Forward-Port-Of: odoo/odoo#177268 Forward-Port-Of: odoo/odoo#175573
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses timesheets without creating a task; 3. confirm the sale order; 4. in Field Service, create a new task; 5. set Customer to `partner_id` used for shipping address; 6. select the relevant Sales Order Item; 7. add a product in catalog. Issue ----- After adding a product to the field service tas
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses…
Versions -------- - 17.0+ Steps ----- 1. Have industry_fsm_sale from enterprise installed; 2. create a SO using a different `partner_id` for the shipping address; 3. add a product that uses timesheets without creating a task; 3. confirm the sale order; 4. in Field Service, create a new task; 5. set Customer to `partner_id` used for shipping address; 6. select the relevant Sales Order Item; 7. add a product in catalog. Issue ----- After adding a product to the field service task, a new SO is created instead of adding it to the existing SO (as would be the case if the task was created by the SOL). Cause ----- When computing a task's `sale_order_id`, it checks whether the task's `partner_id` matches that of the sale order. FSM tasks generally use the `partner_shipping_id` instead, so if this one is different, `sale_order_id` is set to `False`. Solution -------- Aside from sale order's `partner_id`, also check its `partner_invoice_id` and `partner_shipping_id` when deciding whether the task should get linked to the SO. Also changes one of the dependent fields of the compute method from `project_id` to `project_id.sale_order_id`, assuming that when a task's `sale_order_id` is derived from its project's, changing the project's SO should trigger a recompute for the task's as well. opw-3901885 Forward-Port-Of: odoo/odoo#175658
* PROPBLEM: The error is raised when user has access to Project Update, but not to Journal Item. * SOLUTION: Add `sudo` when searching `account.move.line` in the method `_get_already_included_profitability_invoice_line_ids`. 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#177150
Original PR description
* PROPBLEM: The error is raised when user has access to Project Update, but not to Journal Item. * SOLUTION: Add `sudo` when searching `account.move.line` in the method `_get_already_included_profitability_invoice_line_ids`. 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#177150
To reproduce the issue: - In the project app, click on a project to enter the Kanban view - Refresh the page The "+ stage" button to add a stage to a project disappears upon page refresh. This is caused by a context check that functions correctly during the normal flow. However, when directly accessing the link or refreshing the page, the `active_model` context is lost. Since the action `act_project_project_2_project_task_all` always filter project on active_id, we can add as a default
Original PR description
To reproduce the issue: - In the project app, click on a project to enter the Kanban view - Refresh the page The "+ stage" button to add a stage to a project disappears upon page refresh. This is caused by a context check that functions correctly during the normal flow. However, when directly accessing the link or refreshing the page, the `active_model` context is lost. Since the action `act_project_project_2_project_task_all` always filter project on active_id, we can add as a default context ´'active_model': 'project.project'´ opw-4075290 Forward-Port-Of: odoo/odoo#176577
Create a new payslip Select Employee and contract Compute Sheet Create Draft Entry > Post Draft Entry Cancel payslip Issue: The system will attempt to reset to draft and unlink the associated invoice In some cases this is not ideal: In Indian government for example, requires audit trail report for private limited companies, so user can't delete journal entries after posting once. Backporting method `_unlink_or_reverse` from 17.0 [1] to be used in the related PR https://github.com/odoo
Original PR description
Create a new payslip Select Employee and contract Compute Sheet Create Draft Entry > Post Draft Entry Cancel payslip Issue: The system will attempt to reset to draft and unlink the associated invoice In some cases this is not ideal: In Indian government for example, requires audit trail report for private limited companies, so user can't delete journal entries after posting once. Backporting method `_unlink_or_reverse` from 17.0 [1] to be used in the related PR https://github.com/odoo/enterprise/pull/68044 [1] https://github.com/odoo/odoo/blob/66bfab54748a56072ed9ff144f4a39366b606a06/addons/account/models/account_move.py#L3772-L3785 opw-4075244 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#177759 Forward-Port-Of: odoo/odoo#176792
**Version:** 16, 17, master **Description of the issue/feature this PR addresses:** Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the partner to one with "Responsable Monotributo" AFIP Responsibility, then "Document Type" field is changed and this is not the desired behavior because that field is readonly when the invoice was posted. Compute method should not overried the docum
Original PR description
**Version:** 16, 17, master **Description of the issue/feature this PR addresses:** Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP Responsibility…
**Version:** 16, 17, master **Description of the issue/feature this PR addresses:** Argentinean localization: if a customer invoice with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed, then reset to draft and changed the partner to one with "Responsable Monotributo" AFIP Responsibility, then "Document Type" field is changed and this is not the desired behavior because that field is readonly when the invoice was posted. Compute method should not overried the document type if the invoice was posted before. If it does then an incosistency will occurr because the name, document type and sequence will not match. A new sequence non-real will be used. Also the user it is not aware is happening because the field is readonly. **But when a vendor bill with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed then is needed to change "Document Type" field if that vendor bill is reset to draft and changed the partner to one with "Responsable Monotributo" AFIP Responsibility.** --> we introduced this bug on this pr [https://github.com/odoo/odoo/pull/172003](https://github.com/odoo/odoo/pull/172003) **Video showing how to replicate the bug:** https://drive.google.com/file/d/1endivnZ3EEBVn4kzt0hIkR-a5tecYUR7/view **Steps to reproduce:** 1. Log in with admin on runbot odoo enterprise 16 instance and install l10n_ar_edi (Argentinean Electronic Invoicing) module. 2. Take position on company "Responsable Inscripto". 3. Go to "Accounting / Vendor / Bills" and create a new vendor bill with vendor "ADHOC SA" (this partner has "IVA Responsable Inscripto" AFIP Responsibility), with a journal "Vendor Bills", add an invoice line and confirm it. 4. Reset to draft the vendor bill mentioned in step 3 (now journal and document type are readonly fields), change customer to "Gritti Agrimensura" (this partner has "Responsable Monotributo" AFIP Responsibility) and save. Check that the document type has not changed from "(1) FACTURAS A" to "(11) FACTURAS C" and this is not the desired behavior because is a readonly field now because the invoice was posted before. **Current behavior before PR:** When a vendor bill with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed then "Document Type" field does not changes if that vendor bill is reset to draft and changed the partner to one with "Responsable Monotributo" AFIP Responsibility. **Desired behavior after PR is merged:** When a vendor bill with partner with "IVA Responsable Inscripto" AFIP Responsibility is confirmed then "Document Type" field does changes if that vendor bill is reset to draft and changed the partner to one with "Responsable Monotributo" AFIP Responsibility. Ticket Adhoc side: 77058 Task latam: 1242 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175855
This commit fixes an issue regarding global discount lines on invoices that should be represented as allowance charge elements on the UBL file sent to ZATCA. In V17 the structure of the dictionary passed to the XML template in charge of rendering AllowanceCharge changed and expects the value of the tax_scheme_id to be passed inside a dict called tax_scheme_vals, which was not the case previously. Description of the issue/feature this PR addresses: When trying to submit an invoice containing
Original PR description
This commit fixes an issue regarding global discount lines on invoices that should be represented as allowance charge elements on the UBL file sent to ZATCA. In V17 the structure of the dictionary…
This commit fixes an issue regarding global discount lines on invoices that should be represented as allowance charge elements on the UBL file sent to ZATCA. In V17 the structure of the dictionary passed to the XML template in charge of rendering AllowanceCharge changed and expects the value of the tax_scheme_id to be passed inside a dict called tax_scheme_vals, which was not the case previously. Description of the issue/feature this PR addresses: When trying to submit an invoice containing global discounts to ZATCA, the server throws an error since it expects a Tax Scheme ID on the Allowance Charge element linked to the global discount. This only happens on V17 as the structure of the data passed to the AllowanceCharge XML template changed Current behavior before PR: ZATCA servers return an error when submitting invoices containing a global discount line Desired behavior after PR is merged: ZATCA servers correctly process invoices containing global discount lines --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177326
### Steps to reproduce: - Create a storable product A - Create and confirm a delivery order for 1 unit of A - Add one unit of A in stock - Inventory > Operations > Run Scheduler #### > The reservation of the delivery order is not performed ### Cause of the issue: The "reservation_date" of moves whose "picking_type" does not have a reservation method 'At Date' is removed each time it is computed because of these lines: https://github.com/odoo/odoo/blob/17a18f9d065d25095f80e6982b6d
Original PR description
### Steps to reproduce: - Create a storable product A - Create and confirm a delivery order for 1 unit of A - Add one unit of A in stock - Inventory > Operations > Run Scheduler #### > The…
### Steps to reproduce: - Create a storable product A - Create and confirm a delivery order for 1 unit of A - Add one unit of A in stock - Inventory > Operations > Run Scheduler #### > The reservation of the delivery order is not performed ### Cause of the issue: The "reservation_date" of moves whose "picking_type" does not have a reservation method 'At Date' is removed each time it is computed because of these lines: https://github.com/odoo/odoo/blob/17a18f9d065d25095f80e6982b6dc0673e5c382e/addons/stock/models/stock_move.py#L547-L553 However, during the `_run_scheduler_tasks` only the moves whose `reservation_date` is set will be reserved: https://github.com/odoo/odoo/blob/17a18f9d065d25095f80e6982b6dc0673e5c382e/addons/stock/models/stock_rule.py#L549-L554 https://github.com/odoo/odoo/blob/17a18f9d065d25095f80e6982b6dc0673e5c382e/addons/stock/models/stock_rule.py#L572-L574 opw-4105299 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#177612
**Current behavior:** In the purchase report pivot view, grouping by order does not display the order reference on the row's label. **Expected behavior:** Rows corresponding to a purchase order should be labeled with the order reference (name). **Steps to reproduce:** 1. In the Purchase app, go to Reporting -> Purchase 2. Switch to the pivot view 3. Expand the row to Add Custom Group -> Order 4. See that the reference does not get displayed **Cause of the issue:** When we s
Original PR description
**Current behavior:** In the purchase report pivot view, grouping by order does not display the order reference on the row's label. **Expected behavior:** Rows corresponding to a purchase order should be labeled with the order reference (name). **Steps to reproduce:** 1. In the Purchase app, go to Reporting -> Purchase 2. Switch to the pivot view 3. Expand the row to Add Custom Group -> Order 4. See that the reference does not get displayed **Cause of the issue:** When we select group by for the `order` option, the rows are aggregated via `count_distinct`, so the label for the pivot becomes '1' (as they are grouped by id which is unique). **Fix:** Make the order_id field in the view `type=row` instead of `type=measure` so that they do not get aggregated. opw-4075321 Forward-Port-Of: odoo/odoo#176915
## Before this PR: Sometimes Delivered SMS Text Messages are not counted as Sent SMS, thus causes confusion among users. ## Technical: Sometimes we got 'Delivered' Status first instead of getting 'Sent' Status from 3rd party providers (IAP). Because of this 'sent_datetime' is not Set and return False. Sent SMS in tooltip as well in other views(i.e., traces list) are counted if Sent On(sent_datetime) has a value. ## After this PR: 'sent_datetime' will be set if SMS status i
Original PR description
## Before this PR: Sometimes Delivered SMS Text Messages are not counted as Sent SMS, thus causes confusion among users. ## Technical: Sometimes we got 'Delivered' Status first instead of getting 'Sent' Status from 3rd party providers (IAP). Because of this 'sent_datetime' is not Set and return False. Sent SMS in tooltip as well in other views(i.e., traces list) are counted if Sent On(sent_datetime) has a value. ## After this PR: 'sent_datetime' will be set if SMS status is not in '**Outgoing**', '**Processing**', '**Exception**' , '**Canceled**', thus counted as Sent SMS. This will also solve any potential future issue if we can't get any delivery status from 3rd party providers for some reasons (i.e., Delivered) but we can get click/open,... status directly from recipient. https://github.com/odoo/odoo/assets/157007055/a28f6c3c-883d-4f09-a591-25dfe35e029d Task-3972519 Forward-Port-Of: odoo/odoo#169186
Fixes 2 bugs (2nd noticed while investigating the 1st bug): 1. When selecting `create_backorder="always"` for a manufacturing operation type, the auto-printing didn't work for the MOs after they were marked as done. Steps to reproduce: - create a new lot tracked product - set the manufacture operation type `create_backorder="always"` - set the operation type > Hardware > Print When Done > Lot/SN Labels to true - create a MO for the lot tracked product with a product_qty > 1 - set a `l
Original PR description
Fixes 2 bugs (2nd noticed while investigating the 1st bug): 1. When selecting `create_backorder="always"` for a manufacturing operation type, the auto-printing didn't work for the MOs after they were…
Fixes 2 bugs (2nd noticed while investigating the 1st bug): 1. When selecting `create_backorder="always"` for a manufacturing operation type, the auto-printing didn't work for the MOs after they were marked as done. Steps to reproduce: - create a new lot tracked product - set the manufacture operation type `create_backorder="always"` - set the operation type > Hardware > Print When Done > Lot/SN Labels to true - create a MO for the lot tracked product with a product_qty > 1 - set a `lot_producing_id` and mark `qty_producing=1` - click "Produce" button Expected result: MO is backordered + the lot label is auto-printed (i.e. generated and downloaded as a pdf if no iot printer is set up) Actual result: MO is backordered and has a status=Done, but nothing is printed + the values that should be written within `button_mark_done` are not written (i.e. `priority` is not set to 0 and `date_finished` is not set to now()) Issue was due to use of the backorder wizard without passing the MOs that are always backordered as `mrp_production_ids`, this resulted in the MOs being backordered due to the context logic within the backorder wizard, but not applying the rest of the logic within `button_mark_done` that is applied to the `self` records (i.e. the MOs being backordered) 2. If more than 2 manufacturing operation types were set, then depending on the combination of `create_backorder` values, the backordering mechanism might not work. E.g. if `always` + `ask`, the `always` backordering logic would return and ended the logic before the `ask` or `never` MOs backordering logic was ever reached. Steps to reproduce: - set up 2 manufacture operation types, one with `always` and one with `ask`/`never` - set up 2 MOs with product_qty > 1 using the 2 different operation types - mark `qty_producing=1` for each MO and then select both MOs in the list view + action > "Mark as Done" Expected result: the `always` MO is backordered automatically and the `ask` MO has the backorder wizard pop up for it Actual result: the `always` MO is backordered automatically and the `ask` MO does nothing (it is not even set to done) opw-3987144 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#174632
This PR is created in order to sing the odoo CLA and contribute to Odoo. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176903
Original PR description
This PR is created in order to sing the odoo CLA and contribute to Odoo. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176903
Backport from 16.1: https://github.com/odoo/odoo/commit/bfa7a47c860452a8b27a942cd50dc61eba72f5cb hinder allocation date_to to precede date_from Purpose: In order to reduce the possibility to make errors, make the end date of the validity period always come after the start date. @Tecnativa TT50433 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176808 Forward-Port-Of: odoo/odoo#175841
Original PR description
Backport from 16.1: https://github.com/odoo/odoo/commit/bfa7a47c860452a8b27a942cd50dc61eba72f5cb hinder allocation date_to to precede date_from Purpose: In order to reduce the possibility to make errors, make the end date of the validity period always come after the start date. @Tecnativa TT50433 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176808 Forward-Port-Of: odoo/odoo#175841
Currently, the `_run_action_object_create` method (used in particular to propose record creation using a `name` field in automations) assumes that all models have a `name` field, which is not true. In fact, before this commit, we used ```py res = {'name': self.value} res = self.env[self.crud_model_id.model].create(res) ``` This will cause a traceback in models without a `name` field. This commit uses `name_create` directly, which is what it's for. opw-4100885 Forward-Port-Of: od
Original PR description
Currently, the `_run_action_object_create` method (used in particular to propose record creation using a `name` field in automations) assumes that all models have a `name` field, which is not true.
In fact, before this commit, we used
```py
res = {'name': self.value}
res = self.env[self.crud_model_id.model].create(res)
```
This will cause a traceback in models without a `name` field.
This commit uses `name_create` directly, which is what it's for.
opw-4100885
Forward-Port-Of: odoo/odoo#177602### Steps to reproduce: - Create and validate a delivery order for some product - Click on the "Detailed Operations" button on top of the picking form #### > You are able to create new move lines on your picking even thought it is done and locked. ### Cause of the issue: The `create` attribute of the view determines if the record can or can not be created. However, it is currently not set in the context of the view called by the `action_detailed_operations`. ### Note: This `a
Original PR description
### Steps to reproduce: - Create and validate a delivery order for some product - Click on the "Detailed Operations" button on top of the picking form #### > You are able to create new move lines on your picking even thought it is done and locked. ### Cause of the issue: The `create` attribute of the view determines if the record can or can not be created. However, it is currently not set in the context of the view called by the `action_detailed_operations`. ### Note: This `action_detailed_operations` did not exist in 16.0. opw-4103700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#176709
Versions -------- - 17.0+ Steps ----- 1. Activate a second language on the database; 2. enable debug mode; 3. go to Settings / Technical / Database Structure / Fields; 4. look for the `state` field of the `project.task` model; 5. change the name's translation of the of the `01_in_progress` value; 6. go to a task to select the state. Issue ----- It still shows the original translation. Cause ----- The JS side fetches the translations straight from the .po file instead of loo
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Activate a second language on the database; 2. enable debug mode; 3. go to Settings / Technical / Database Structure / Fields; 4. look for the `state` field of the `project.task` model; 5. change the name's translation of the of the `01_in_progress` value; 6. go to a task to select the state. Issue ----- It still shows the original translation. Cause ----- The JS side fetches the translations straight from the .po file instead of looking for translations stored in the database. Solution -------- The translations of the labels are already stored in `this.props.record.fields[this.props.name].selection`, as used in `super`'s `options` getter. Retrieving these, custom translations do take effect. opw-4009326 Forward-Port-Of: odoo/odoo#176507
Before this commit, the cog dropdown was getting clipped on mobile for longer widths Steps to reproduce: - Project> Open any project > Open any task. - Click on the cog button - Minimize the window or switch to mobile view After this commit, the width of the dropdown adjusts accordingly to prevent clipping. And the text of dropdown items is truncated. Task: 3763899 Forward-Port-Of: odoo/odoo#166135
Original PR description
Before this commit, the cog dropdown was getting clipped on mobile for longer widths Steps to reproduce: - Project> Open any project > Open any task. - Click on the cog button - Minimize the window or switch to mobile view After this commit, the width of the dropdown adjusts accordingly to prevent clipping. And the text of dropdown items is truncated. Task: 3763899 Forward-Port-Of: odoo/odoo#166135
**Current behavior:** When a kit bom product move line is broken down into move lines for its component products, changes written to the move line (not on the move) will not carry over to the new move nor move lines. **Expected behavior:** The change should be observed beyond the decomposition. **Steps to reproduce:** 1. Create a new internal transfer in barcode 2. Add a product with some bom via form, also edit the destination location in the form to be something non-
Original PR description
**Current behavior:** When a kit bom product move line is broken down into move lines for its component products, changes written to the move line (not on the move) will not carry over to the new…
**Current behavior:**
When a kit bom product move line is broken down into move lines
for its component products, changes written to the move line
(not on the move) will not carry over to the new move nor move
lines.
**Expected behavior:**
The change should be observed beyond the decomposition.
**Steps to reproduce:**
1. Create a new internal transfer in barcode
2. Add a product with some bom via form, also edit the
destination location in the form to be something
non-default.
3. Save the form, validate the transfer
4. See that the broken down move lines don't keep the changed
destination location
**Cause of the issue:**
When the kit bom moves are exploded, the location information of
its move lines is not taken into account at any point- and thus
it's lost.
**Fix:**
For kit bom products, use a move line's location information
during creation of a move as opposed to the picking. Only link a
new move line for a kit bom product to an existing move if (in
addition to the product) the location source and destination
values match.
opw-4016702
Forward-Port-Of: odoo/odoo#173347Previously the code setting the default taxes on product was called only if the database was in demo, which makes zero sense. Without demo data, creating a new company and assigning it its accounting package was not configuring correctly the existing products with the default taxes. ticket 4037904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173803
Original PR description
Previously the code setting the default taxes on product was called only if the database was in demo, which makes zero sense. Without demo data, creating a new company and assigning it its accounting package was not configuring correctly the existing products with the default taxes. ticket 4037904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#173803
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones. Forward-Port-Of: odoo/enterprise#61975
Original PR description
The methods 'get_accounts' and 'get_query' were extracted from the _compute_practical_amount method for inheritance purposes. Consequently, their names were changed to more descriptive ones. Forward-Port-Of: odoo/enterprise#61975
Add the Colombian E-Commerce localization module that includes: * Add fields to the checkout form: City, Identification Type, Fiscal Regimen, and Obligation Type. * Validate new fields. * Change the label name for 'Vat' to 'Identification Number' * Show obligation type and fiscal regimen blocks only when the identification type is 'NIT'. * Take into account the identification type when validating the VAT in the checkout form. related: https://github.com/odoo/odoo/pull/169205 task-28
Original PR description
Add the Colombian E-Commerce localization module that includes: * Add fields to the checkout form: City, Identification Type, Fiscal Regimen, and Obligation Type. * Validate new fields. * Change the label name for 'Vat' to 'Identification Number' * Show obligation type and fiscal regimen blocks only when the identification type is 'NIT'. * Take into account the identification type when validating the VAT in the checkout form. related: https://github.com/odoo/odoo/pull/169205 task-2856566 Forward-Port-Of: odoo/enterprise#64786
This commit fixes the broken tour in payroll as the previous one depended on actions that have been removed. task-3621276 Forward-Port-Of: odoo/enterprise#61673
Original PR description
This commit fixes the broken tour in payroll as the previous one depended on actions that have been removed. task-3621276 Forward-Port-Of: odoo/enterprise#61673
When the user was connecting an IoT to the database there was no notification or any information to tell him that he succeded / failed / had to wait to see it in the "connected" list. We now display those notifications. Task: 4104811 Forward-Port-Of: odoo/enterprise#68394
Original PR description
When the user was connecting an IoT to the database there was no notification or any information to tell him that he succeded / failed / had to wait to see it in the "connected" list. We now display those notifications. Task: 4104811 Forward-Port-Of: odoo/enterprise#68394
Accessing a linked repair record through Helpdesk can lead to a blocking bug where the user is unable to generate a quote through the repair record. ### Description of the issue : 1) When generating a `repair.order` record through a Helpdesk ticket or accessing an existing linked repair order through the smart button, the context key for `default_team_id` will be inherited. In this case referencing the id of the current `helpdesk.team` record. 2) When trying to generate a quote through
Original PR description
Accessing a linked repair record through Helpdesk can lead to a blocking bug where the user is unable to generate a quote through the repair record. ### Description of the issue : 1) When generating…
Accessing a linked repair record through Helpdesk can lead to a blocking bug where the user is unable to generate a quote through the repair record. ### Description of the issue : 1) When generating a `repair.order` record through a Helpdesk ticket or accessing an existing linked repair order through the smart button, the context key for `default_team_id` will be inherited. In this case referencing the id of the current `helpdesk.team` record. 2) When trying to generate a quote through the repair order, an edge case can happen where a ValidationError is triggered at sale order creation. ``` The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Sales Order (sale.order) Constraint: sale_order_team_id_fkey ``` This is due to the fact that the `sales.order` also uses a `default_team_id` context key to designate the default sales team. If by happen stance, the referenced `id` values does not match an existing `crm.team` record, you will hit the above foreign key constraint blocking the user from generating the quote. ### Proposed fix : Functionally it makes no sense to pass the `default_team_id` context value from helpdesk to sales order, as both implicitly reference different models and functional entities. Since the `_prepare_repairs_default_value` was already introduced in https://github.com/odoo/enterprise/commit/edd88ebdcc60b7c4d261bfb8755e910356684a3f to handle the context value preparation when using the repair smart button, the simplest solution is to set the `default_team_id` context key to `False`, thus not passing it later on to the sales order (i.e. the quote will not have a default sales team, but the user can still manually define one) ### How to reproduce: 1) Set up a DB with sales, helpdesk and repairs installed 2) If using demo data, just create a handful of new helpdesk teams (`helpdesk.team`). The important part is that you have at least one record with an id that will not be present in the `crm.team` table 3) For the helpdesk team matching the above criteria, activate the Repairs option (`use_product_repairs`) in the team configuration 4) Create a helpdesk ticket for that helpdesk team, create a repair order using the action button, then try using the Create Quotation action button (`action_create_sale_order`) → Validation Error is triggered OPW-4123410 Forward-Port-Of: odoo/enterprise#68822
The constraint here fails because when uploading the certificate, password and key through the settings, the values are written one by one on the company, which made it fail in case the password is written first (the constraint would test the password on empty values and throw an error). The groups right is not useful anymore as the flow uses sudo to modify it outside of the settings. Forward-Port-Of: odoo/enterprise#67874
Original PR description
The constraint here fails because when uploading the certificate, password and key through the settings, the values are written one by one on the company, which made it fail in case the password is written first (the constraint would test the password on empty values and throw an error). The groups right is not useful anymore as the flow uses sudo to modify it outside of the settings. Forward-Port-Of: odoo/enterprise#67874
Some improvements in EDI to support factoring operations. The tag "plazo" and "unidadTiempo" are mandatory in order to a company can be a factor . (Sell off all of its outstanding invoices at one time, rather than having to wait on collecting payments from customers) - Rename tag "RespuestaAutorizacion" to "autorizacion" - Add tag "plazo" and "unidadTiempo" in Sales Invoices and Debit Note (not only for Purchase liquidation) - Modify unit tests Forward-Port-Of: odoo/enterprise#67572
Original PR description
Some improvements in EDI to support factoring operations. The tag "plazo" and "unidadTiempo" are mandatory in order to a company can be a factor . (Sell off all of its outstanding invoices at one time, rather than having to wait on collecting payments from customers) - Rename tag "RespuestaAutorizacion" to "autorizacion" - Add tag "plazo" and "unidadTiempo" in Sales Invoices and Debit Note (not only for Purchase liquidation) - Modify unit tests Forward-Port-Of: odoo/enterprise#67572
In 8f74d9d the french translation for the accounting financial reports where forgotten. This add the missing translated terms opw-4124296 Forward-Port-Of: odoo/enterprise#68781
Original PR description
In 8f74d9d the french translation for the accounting financial reports where forgotten. This add the missing translated terms opw-4124296 Forward-Port-Of: odoo/enterprise#68781
**Current behavior:** In Barcode, it is possible for a split of incomplete moves to be triggered which leaves the original move with a quantity and demand of zero- effectively generating a superfluous record value. **Expected behavior:** A split should not occur when the original line has `quantity == 0`. **Steps to reproduce:** 1. Create a transfer for 2 units of some product, assign it 2. Open the transfer in Barcode and use the form to add 1 unit 3. Use the back button with
Original PR description
**Current behavior:** In Barcode, it is possible for a split of incomplete moves to be triggered which leaves the original move with a quantity and demand of zero- effectively generating a…
**Current behavior:**
In Barcode, it is possible for a split of incomplete moves to be
triggered which leaves the original move with a quantity and
demand of zero- effectively generating a superfluous record
value.
**Expected behavior:**
A split should not occur when the original line has
`quantity == 0`.
**Steps to reproduce:**
1. Create a transfer for 2 units of some product, assign it
2. Open the transfer in Barcode and use the form to add 1 unit
3. Use the back button within the Barcode app to return to the
previous action
4. Reopen the transfer, set the quantity on the move to 0 from 1
5. Use the back button to exit the transfer again
6. Open the transfer in the backend to see there is a move with
a line for 0 / 0 units.
**Cause of the issue:**
We split moves if their quantity is less than demand without
considering it may be zero.
**Fix:**
Reset the move in the case of `quantity == 0`- thus it will no
longer become a split candidate.
opw-4056241
Forward-Port-Of: odoo/enterprise#68554### Steps to Reproduce: - Create a field service task > switch the worksheet template to false > add products and timesheets > sign report > error because there is no worksheet template set. ### After this PR: - Allow signing the report when there is no worksheet template, it will be possible to sign and send the report as long as there is content to populate the report with ( products and timesheets). task-3974170 Forward-Port-Of: odoo/enterprise#65367
Original PR description
### Steps to Reproduce: - Create a field service task > switch the worksheet template to false > add products and timesheets > sign report > error because there is no worksheet template set. ### After this PR: - Allow signing the report when there is no worksheet template, it will be possible to sign and send the report as long as there is content to populate the report with ( products and timesheets). task-3974170 Forward-Port-Of: odoo/enterprise#65367
**Current behavior:** When a kit bom product move line is broken down into move lines for its component products, changes written to the move line (not on the move) will not carry over to the new move nor move lines. **Expected behavior:** The change should be observed beyond the decomposition. **Steps to reproduce:** 1. Create a new internal transfer in barcode 2. Add a product with some bom via form, also edit the destination location in the form to be something non-
Original PR description
**Current behavior:** When a kit bom product move line is broken down into move lines for its component products, changes written to the move line (not on the move) will not carry over to the new…
**Current behavior:**
When a kit bom product move line is broken down into move lines
for its component products, changes written to the move line
(not on the move) will not carry over to the new move nor move
lines.
**Expected behavior:**
The change should be observed beyond the decomposition.
**Steps to reproduce:**
1. Create a new internal transfer in barcode
2. Add a product with some bom via form, also edit the
destination location in the form to be something
non-default.
3. Save the form, validate the transfer
4. See that the broken down move lines don't keep the changed
destination location
**Cause of the issue:**
When the kit bom moves are exploded, the location information of
its move lines is not taken into account at any point- and thus
it's lost.
**Fix:**
For kit bom products, use a move line's location information
during creation of a move as opposed to the picking. Only link a
new move line for a kit bom product to an existing move if (in
addition to the product) the location source and destination
values match.
opw-4016702
Forward-Port-Of: odoo/enterprise#66746