Tuesday, February 25, 2025
27 changes · saas-17.4
Resolved issues and error corrections
Empty fields in the new Kanban editor now show a visible placeholder instead of appearing blank or invisible. This makes it easier for users customizing Kanban views in Studio to see and edit all available fields, even when the sample record has no value.
Original PR description
The kanban has been reworked with https://github.com/odoo/odoo/pull/167751 and odoo/enterprise@23426182d92198cf977d7eecbfb3d47117d80c59 Before this commit when a field is empty (the record has no value for a field) in the kanban editor -- new version -- that field had no size and was virtually invisible. This was because one little line of code was missing to enable the feature of applying a placeholder in the empty field to make it visible. opw-4526492
Miscellaneous changes
The Wi-Fi disconnection method was still unlinking an old configuration file, which is now replaced by the `odoo.conf` file. This fix replaces the file unlinking by a coniguration file update. Task: 4592796 Forward-Port-Of: odoo/odoo#198962
Original PR description
The Wi-Fi disconnection method was still unlinking an old configuration file, which is now replaced by the `odoo.conf` file. This fix replaces the file unlinking by a coniguration file update. Task: 4592796 Forward-Port-Of: odoo/odoo#198962
Issue: ----- This issue happens in mobile view only. When a user without any HR access rights tries to assign an Employee to a piece of equipment, they don't see the list of employees as expected. Instead, they get a "No records found!" message. Steps to reproduce: ----- - Install Employees & Maintenance apps - Create a new user and set the following acces rights - Employees -> None - Switch to that user - Go to Maintenance -> Equipment and select an equipment - Ensure the page
Original PR description
Issue: ----- This issue happens in mobile view only. When a user without any HR access rights tries to assign an Employee to a piece of equipment, they don't see the list of employees as expected.…
Issue:
-----
This issue happens in mobile view only. When a user without any HR access rights
tries to assign an Employee to a piece of equipment, they don't see the list of
employees as expected. Instead, they get a "No records found!" message.
Steps to reproduce:
-----
- Install Employees & Maintenance apps
- Create a new user and set the following acces rights
- Employees -> None
- Switch to that user
- Go to Maintenance -> Equipment and select an equipment
- Ensure the page is in mobile display mode (refresh if not already in mode)
- Select an equipment & try to assign an Employee
-> The widget displays a "No records found!" message
Other issue discovered:
-----
There is also a problem for the department field, where the user has access to
the field when in desktop mode but gets an "Access error" in mobile mode.
Cause:
-----
The equipment model stores the owner by referencing a hr.employee. Depending on
the display type, the user will get a simple dropdown list in desktop mode or a
kanban view in mobile mode.
When the kanban view is loaded in mobile mode, since the user does not have read
access to the hr.employee model, the ORM tries to load from the cache. Since it
doesn't find the content of a field (avatar_128 here) in the cache, it clears
the whole record, leading to the "No records found!" message. The hr team has a
workaround for this issue in the form of a custom many2one widget for employee
avatars.
Ticket:
opw-4309746
Forward-Port-Of: odoo/odoo#195718Indonesia officially added new provinces in 2022. - Papua Barat Daya was forgotten in an old PR. - Papua Pengunungan was assigned ISO code PE, not PP. In 16.0, we just change the ISO code. The XMLID will be corrected in master. Codes: https://www.geonames.org/ID/administrative-division-indonesia.html Official Document: https://peraturan.bpk.go.id/Details/232726/uu-no-29-tahun-2022 Wikipedia in English: https://en.wikipedia.org/wiki/Provinces_of_Indonesia Original PR: odoo/
Original PR description
Indonesia officially added new provinces in 2022. - Papua Barat Daya was forgotten in an old PR. - Papua Pengunungan was assigned ISO code PE, not PP. In 16.0, we just change the ISO code. The XMLID will be corrected in master. Codes: https://www.geonames.org/ID/administrative-division-indonesia.html Official Document: https://peraturan.bpk.go.id/Details/232726/uu-no-29-tahun-2022 Wikipedia in English: https://en.wikipedia.org/wiki/Provinces_of_Indonesia Original PR: odoo/odoo#193103 Forward-Port-Of: odoo/odoo#199035
config['demo'] is always set at runtime, there is no point in saving it as it is basically ignored from the config file. Forward-Port-Of: odoo/odoo#189032
Original PR description
config['demo'] is always set at runtime, there is no point in saving it as it is basically ignored from the config file. Forward-Port-Of: odoo/odoo#189032
The CRON has to search for documents that are not in error because they are filtered out in _process_jobs. Without that, the documents are retrieved, not processed but the cron is triggered again and again endlessly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198973
Original PR description
The CRON has to search for documents that are not in error because they are filtered out in _process_jobs. Without that, the documents are retrieved, not processed but the cron is triggered again and again endlessly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#198973
### Issue: Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode app. #### Use case 1 (split move): - Create a storable product P tracked by lot - Adjust the onHand quantity to put 2 quants in stock: - quant1: Location: WH/Stock, lot_id: LOT0001, quantity: 3.0 - quant2: Location: WH/Stock, lot_id: LOT0002, quantity: 3.0 - Create and confirm a Deli
Original PR description
### Issue: Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode…
### Issue:
Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode app.
#### Use case 1 (split move):
- Create a storable product P tracked by lot
- Adjust the onHand quantity to put 2 quants in stock:
- quant1: Location: WH/Stock, lot_id: LOT0001, quantity: 3.0
- quant2: Location: WH/Stock, lot_id: LOT0002, quantity: 3.0
- Create and confirm a Delivery order for 3 x P
> The move of the delivery should have reserved 3 units form LOT0001
- Enter the barcode app, scan you DO-name
- Scan your product barcode then scan LOT002 three times
- Leave the barcode app and come back
#### > The barcode line 3/3 was updated to 3/6: 0/3 LOT001 and 3/3 LOT002.
#### Use case 2 (split move line):
- Create 2 storable products P and COMP.
- Adjust the onHand quantity to put 10 units of COMP in stock.
- Create a bill of material for P with one line: - 1 x COMP
- Create and confirm an MO for 10 units of P.
- Set the qty_producing to 5 units -> 5 units of comp are reserved
- Enter the barcode app, scan you MO-name
- The component line should be 5/5 since 5 units are reserved.
- Adjust the registration to 1/5.
- Leave the barcode app and come back
#### > The barcode line 1/5 was updated to 1/1 and 0/9 instead of 0/4.
### Cause of the Issue:
In both cases, the problem comes from the fact we leave the barcode with a different reservation than the initial one.
In the first use case, a new move will be created with a quantity of 3 in order to handle the new line created with LOT002 as soon as you have scanned your products. Therefore even though you entered the barcode app with a reservation demand of 3 units you leave it with 2 move lines with a cumulative quantity of 3 + 3 = 6:
- line1: quantity: 3, lot_id: LOT001, picked: False
- line2: quantity: 3, lot_id: LOT002, picked: True The next time you enter the app you will therefore see a reservation demand of 6 rather than 3.
In the second use case however, a move line is simply created by the `split_uncompleted_moves` when you exit the barcode app: https://github.com/odoo/enterprise/blob/0f4e8ce54be746db02e9f4a6974e387d90608a08/stock_barcode_mrp/models/stock_move.py#L18-L29
And the quantity of the new move line is based on the `prodcut_uom_qty` of the move rather than the initial reservation demand (quantity when entering barcode). This explains why reservation demand changed from 5 to 10 when you left and came back.
Enterprise: https://github.com/odoo/enterprise/pull/77068
opw-4353884 and opw-4417870
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#193465Following the ticket opw-4523417 there is a lack of logging related to printing in hw_drivers module which makes it difficult to analyse the issued on the client's side, especially on Windows IoT This PR adds 1) some logs upon receiving of a printing request via longpolling route 2) some logs when the methods of printing are being called 3) some logs when these methods have finished their job Since for printing the Odoo database isn't notified of a succeful printing this is very much ne
Original PR description
Following the ticket opw-4523417 there is a lack of logging related to printing in hw_drivers module which makes it difficult to analyse the issued on the client's side, especially on Windows IoT This PR adds 1) some logs upon receiving of a printing request via longpolling route 2) some logs when the methods of printing are being called 3) some logs when these methods have finished their job Since for printing the Odoo database isn't notified of a succeful printing this is very much needed Forward-Port-Of: odoo/odoo#197687
Before this commit: =================== - when creating a discount and loyalty program type coupon with rules for minimum quantity and purchase equals 1, along with a specific product reward, `multiple reward order lines` were erroneously generated if the coupon balance exceeded 1. - upon refreshing the page, the reward line quantity would increment incorrectly. After this commit: ================== - with this commit, only one reward order line is created per coupon application, a
Original PR description
Before this commit: =================== - when creating a discount and loyalty program type coupon with rules for minimum quantity and purchase equals 1, along with a specific product reward, `multiple reward order lines` were erroneously generated if the coupon balance exceeded 1. - upon refreshing the page, the reward line quantity would increment incorrectly. After this commit: ================== - with this commit, only one reward order line is created per coupon application, and the coupon now correctly applies only once, resolving the previous inconsistencies. task - 3869549 Forward-Port-Of: odoo/odoo#196100 Forward-Port-Of: odoo/odoo#162359
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue POST 17.0:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move is equal to 0, it will be confirmed:
https://github.com/odoo/odoo/blob/9cce72f984c7bd5fae126945e68f3eb2c143761b/addons/stock/models/stock_move.py#L1885-L1889 `product_uom_qty`, extra moves will be created,
However, this second `_action_confirm` will also generate a quality check for the same reason:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
### Fix:
The condition confirming non-draft moves without demand seemed to be only relevant in the flow protected by the
`test_add_sml_with_kit_to_confirmed_picking` where a move line is created by hand for a kit product on an already confirmed picking. Leading to an assined move for a kit that never triggered the `action_explode`. This
"action" transforming the kit move using the phantom bom before the _action_done and hence if not perfomed leading to an error when trying to update the quantity on the related quants:
https://github.com/odoo/odoo/blob/9cce72f984c7bd5fae126945e68f3eb2c143761b/addons/mrp/models/stock_quant.py#L11
### Note:
A similar action_explode is performed when validating a picking contnaining a move_line related to a move:
https://github.com/odoo/enterprise/blob/2877bf921633247ed733e1d1ee47a6da0e6f8051/stock_barcode_mrp/static/src/models/barcode_picking_model.js#L8-L21
opw-4266053
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#192034In v16 (and it's still the case in master) fields default values are not batched. They are added one by one for each vals dict in `_prepare_create_values`. The main reason for that is that a given default could be a callable returning a randomly generated value. Still, that can be a bottleneck when batch creating records, during imports for instance. That's especially true for a model such as account.move, which is already pretty heavy to create. When the sale module is installed, a new field
Original PR description
In v16 (and it's still the case in master) fields default values are not batched. They are added one by one for each vals dict in `_prepare_create_values`. The main reason for that is that a given…
In v16 (and it's still the case in master) fields default values are not batched. They are added one by one for each vals dict in `_prepare_create_values`. The main reason for that is that a given default could be a callable returning a randomly generated value. Still, that can be a bottleneck when batch creating records, during imports for instance. That's especially true for a model such as account.move, which is already pretty heavy to create. When the sale module is installed, a new field `team_id` is added. This field is a computed-stored field with a callable set as default. Because the default attr is defined, the ORM skips the call to the compute method and calls the default function instead when the team_id param is not given upon creation. That means that for each account.move, `_get_default_team_id` is called. Since the purpose of a compute function is already to give default values to record, removing the default callable allows to benefit from the batching of compute functions. #### speedup Test database with account_accountant and sale. Trying to create batches of account.moves | Batch size | Before PR | After PR | |:----------:|:---------:|:--------:| | 1 | 70ms | 58ms | | 50 | 150ms | 100ms | | 100 | 275ms | 188ms | | 250 | 660ms | 450ms | | 1000 | 2.43s | 1.75s | | 3000 | 7.55s | 5.33s | Average speedup: 68%. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160313 Forward-Port-Of: odoo/odoo#157887
The module base_vat add a div around the vat field and so the xpath place the field in the div which is not what we want. By putting it after the address we are sure that those field are rightly placed task: 4543204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196598
Original PR description
The module base_vat add a div around the vat field and so the xpath place the field in the div which is not what we want. By putting it after the address we are sure that those field are rightly placed task: 4543204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196598
Currently, if an email containing a `.eml` attachment is sent, that attachment won't be able to be downloaded correctly depending on the email client used; the attachment will download, but will have a size zero. ### Steps to reproduce * On any chatter, send a message containing a `.eml` attachment (another email file). * Using Thunderbird, attempt to download that attachment. The downloaded attachment will be empty (0 kB). ### Cause The `.eml` file format, which represents an em
Original PR description
Currently, if an email containing a `.eml` attachment is sent, that attachment won't be able to be downloaded correctly depending on the email client used; the attachment will download, but will have…
Currently, if an email containing a `.eml` attachment is sent, that attachment won't be able to be downloaded correctly depending on the email client used; the attachment will download, but will have a size zero. ### Steps to reproduce * On any chatter, send a message containing a `.eml` attachment (another email file). * Using Thunderbird, attempt to download that attachment. The downloaded attachment will be empty (0 kB). ### Cause The `.eml` file format, which represents an email message, has the MIME type `message/rfc822`. According to [RFC 2046 Section 5.2.1](https://datatracker.ietf.org/doc/html/rfc2046#section-5.2.1:~:text=No%20encoding%20other%20than%20%227bit%22%2C%20%228bit%22%2C%20or%20%22binary%22%20is%20permitted%20for%0A%20%20%20the%20body%20of%20a%20%22message/rfc822%22%20entity.), attachments of this MIME type must be encoded using `7bit`, `8bit`, or `binary`. However, the system currently encodes all attachments using Base64 by default, which is not compliant with the standard for `message/rfc822`. Although some email clients tolerate Base64 encoding for `message/rfc822`, others, such as Thunderbird, Roundcube, and Zimbra, strictly follow the RFC and reject Base64-encoded `message/rfc822` attachments. As a result, these attachments appear invalid and are downloaded as empty files. opw-4126522 Forward-Port-Of: odoo/odoo#198862 Forward-Port-Of: odoo/odoo#194988
To reproduce: - on a record of a model that inherits mail.activity.mixin, create a new Activity of a 'meeting' type - open calendar - create 2 meetings on the calendar - only the second one is attached to the resource record's chatter Problem: When the calendar view is opened, the mail.activity record has already been created, and creating the calendar.event record writes to its calendar_event_id field with the id of the newly created calendar.event. Creating a second calendar.event reco
Original PR description
To reproduce: - on a record of a model that inherits mail.activity.mixin, create a new Activity of a 'meeting' type - open calendar - create 2 meetings on the calendar - only the second one is…
To reproduce: - on a record of a model that inherits mail.activity.mixin, create a new Activity of a 'meeting' type - open calendar - create 2 meetings on the calendar - only the second one is attached to the resource record's chatter Problem: When the calendar view is opened, the mail.activity record has already been created, and creating the calendar.event record writes to its calendar_event_id field with the id of the newly created calendar.event. Creating a second calendar.event record in the same view does not create a second mail.activity record, instead it overwrites the calendar_event_id field of the original mail.activity record, overwriting the original calendar.event. This also causes the first calendar.event record to no longer have any associated mail.activity record in its activity_ids field. Solution: In the calender.event create() method, modify the condition of whether a new mail.activity record should get created so that it makes a new mail.activity record if the linked mail.activity record already has a calender_event_id opw-4500292 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197761 Forward-Port-Of: odoo/odoo#196719
The message "Transferred by <Wave Nb>" was posted on pickings that are detached before the wave is validated. How to reproduce: - Create Product P, storable, with 2 unit on hand - Create 2 delivery transfer for 1 unit of P each - Add both transfer to new wave - Set Picked to True on 1 of the move, and not on the other. - Validate the wave transfer => 1 transfer only is validated (OK), but both have a message saying that the transfer was "Transferred by <Wave Nb>" Removed `skip_immedi
Original PR description
The message "Transferred by <Wave Nb>" was posted on pickings that are detached before the wave is validated. How to reproduce: - Create Product P, storable, with 2 unit on hand - Create 2 delivery transfer for 1 unit of P each - Add both transfer to new wave - Set Picked to True on 1 of the move, and not on the other. - Validate the wave transfer => 1 transfer only is validated (OK), but both have a message saying that the transfer was "Transferred by <Wave Nb>" Removed `skip_immediate` context as it is obsolete, and allow the function to only have 1 return statement, which is needed for the fix. OPW-4503809 Forward-Port-Of: odoo/odoo#195757
Description of the issue/feature this PR addresses: ticket id: https://www.odoo.com/odoo/my-tasks/4179478 Current behavior before PR: - MENA l10n module descriptions were uncomplete or unconsistent Desired behavior after PR is merged: - improve l10n module description for MENA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197045 Forward-Port-Of: odoo/odoo#190703
Original PR description
Description of the issue/feature this PR addresses: ticket id: https://www.odoo.com/odoo/my-tasks/4179478 Current behavior before PR: - MENA l10n module descriptions were uncomplete or unconsistent Desired behavior after PR is merged: - improve l10n module description for MENA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#197045 Forward-Port-Of: odoo/odoo#190703
Currently, an error may occur when we try to export the trial balance with the SAT (XML) format. This is because the account_group ID is used to browse the account, due to a more specific account_group. Steps to reproduce: 1. Install l10n_mx_reports. 2. Create an account_group with a more specific account, such as 401.01.01 - The 4, 401, and 401.01 groups are created with demo data. 3. Go to trial balance and try exporting with "SAT (XML)". 4. An error will occur (Missing Record) beca
Original PR description
Currently, an error may occur when we try to export the trial balance with the SAT (XML) format. This is because the account_group ID is used to browse the account, due to a more specific account_group. Steps to reproduce: 1. Install l10n_mx_reports. 2. Create an account_group with a more specific account, such as 401.01.01 - The 4, 401, and 401.01 groups are created with demo data. 3. Go to trial balance and try exporting with "SAT (XML)". 4. An error will occur (Missing Record) because the account_group ID is used to browse the account. This fix does two things: 1. It ensures that only account.account lines are considered. 2. It changes the line length condition from `= 4` to `>= 4` to handle more specific grouping. opw-4537859 Forward-Port-Of: odoo/enterprise#80128
In 954e2110c we modified the `website_sale` template when l10n_co_edi_website_sale is installed, to always show the VAT fields. This modification was applied to all websites (regardless of whether in Colombia or not) and was bypassing the code that checks whether the VAT field can safely be modified or not from the e-commerce. We revert it and instead, if possible, will solve the original issue (VAT fields not available to be edited for billing addresses) by redirecting the user to the par
Original PR description
In 954e2110c we modified the `website_sale` template when l10n_co_edi_website_sale is installed, to always show the VAT fields. This modification was applied to all websites (regardless of whether in Colombia or not) and was bypassing the code that checks whether the VAT field can safely be modified or not from the e-commerce. We revert it and instead, if possible, will solve the original issue (VAT fields not available to be edited for billing addresses) by redirecting the user to the parent address to edit the VAT. opw-4309448 Forward-Port-Of: odoo/enterprise#79882
### Issue: Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode app. #### Use case 1 (split move): - Create a storable product P tracked by lot - Adjust the onHand quantity to put 2 quants in stock: - quant1: Location: WH/Stock, lot_id: LOT0001, quantity: 3.0 - quant2: Location: WH/Stock, lot_id: LOT0002, quantity: 3.0 - Create and confirm a Deli
Original PR description
### Issue: Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode…
### Issue:
Currently, leaving the barcode app will split moves/move lines in the backend in order to keep track of the changes made on the move lines to match the next time you go into the barcode app.
#### Use case 1 (split move):
- Create a storable product P tracked by lot
- Adjust the onHand quantity to put 2 quants in stock:
- quant1: Location: WH/Stock, lot_id: LOT0001, quantity: 3.0
- quant2: Location: WH/Stock, lot_id: LOT0002, quantity: 3.0
- Create and confirm a Delivery order for 3 x P
> The move of the delivery should have reserved 3 units form LOT0001
- Enter the barcode app, scan you DO-name
- Scan your product barcode then scan LOT002 three times
- Leave the barcode app and come back
#### > The barcode line 3/3 was updated to 3/6: 0/3 LOT001 and 3/3 LOT002.
#### Use case 2 (split move line):
- Create 2 storable products P and COMP.
- Adjust the onHand quantity to put 10 units of COMP in stock.
- Create a bill of material for P with one line: - 1 x COMP
- Create and confirm an MO for 10 units of P.
- Set the qty_producing to 5 units -> 5 units of comp are reserved
- Enter the barcode app, scan you MO-name
- The component line should be 5/5 since 5 units are reserved.
- Adjust the registration to 1/5.
- Leave the barcode app and come back
#### > The barcode line 1/5 was updated to 1/1 and 0/9 instead of 0/4.
### Cause of the Issue:
In both cases, the problem comes from the fact we leave the barcode with a different reservation than the initial one.
In the first use case, a new move will be created with a quantity of 3 in order to handle the new line created with LOT002 as soon as you have scanned your products. Therefore even though you entered the barcode app with a reservation demand of 3 units you leave it with 2 move lines with a cumulative quantity of 3 + 3 = 6:
- line1: quantity: 3, lot_id: LOT001, picked: False
- line2: quantity: 3, lot_id: LOT002, picked: True The next time you enter the app you will therefore see a reservation demand of 6 rather than 3.
In the second use case however, a move line is simply created by the `split_uncompleted_moves` when you exit the barcode app: https://github.com/odoo/enterprise/blob/0f4e8ce54be746db02e9f4a6974e387d90608a08/stock_barcode_mrp/models/stock_move.py#L18-L29
And the quantity of the new move line is based on the `prodcut_uom_qty` of the move rather than the initial reservation demand (quantity when entering barcode). This explains why reservation demand changed from 5 to 10 when you left and came back.
Community: odoo/odoo#193465
opw-4353884 and opw-4417870
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#77068In the follow up process, while the wizard's text is displayed correctly, the text in the chatter and in the pdf would contain too many carriage returns. The error is linked to the use of the text widget in the xml, which doesn't seem necessary in this case and is therefore removed. task-4574941 Forward-Port-Of: odoo/enterprise#79925 Forward-Port-Of: odoo/enterprise#79517
Original PR description
In the follow up process, while the wizard's text is displayed correctly, the text in the chatter and in the pdf would contain too many carriage returns. The error is linked to the use of the text widget in the xml, which doesn't seem necessary in this case and is therefore removed. task-4574941 Forward-Port-Of: odoo/enterprise#79925 Forward-Port-Of: odoo/enterprise#79517
Steps to reproduce: - With an MX Company Setup - Issue an invoice with external trade - Print pdf Issue: Partner original RFC is shown, but according to our documentation [1] and official documentation [2] as well, we should display the generic RFC for external partners XEXX010101000 [1] https://www.odoo.com/documentation/18.0/applications/finance/fiscal_localizations/mexico.html#external-trade [2] https://www.sat.gob.mx/articulo/99662/articulo-29-a page 59 "15. ¿Qué datos debe cont
Original PR description
Steps to reproduce: - With an MX Company Setup - Issue an invoice with external trade - Print pdf Issue: Partner original RFC is shown, but according to our documentation [1] and official documentation [2] as well, we should display the generic RFC for external partners XEXX010101000 [1] https://www.odoo.com/documentation/18.0/applications/finance/fiscal_localizations/mexico.html#external-trade [2] https://www.sat.gob.mx/articulo/99662/articulo-29-a page 59 "15. ¿Qué datos debe contener la versión impresa del comprobante fiscal? En la representación impresa se incluirán como mínimo los datos establecidos en la regla 2.7.1.7. de la RMF. Fundamento: Regla 2.7.1.7. de la RMF. " opw-4473180 Forward-Port-Of: odoo/enterprise#79979 Forward-Port-Of: odoo/enterprise#79527
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation. ### Cause of the issues: The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15 However, d
Original PR description
### Issues: Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC…
### Issues:
Creating and validating a picking from the barcode app does not behave correctly with respect to quality check trigger and creation. Depending on your flow, you might end up with QC created twice or with QC not being triggered before validation.
### Cause of the issues:
The quality checks are created during the "_action_confirm" of moves: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
However, depending on where you click in the barcode app, the moves might end up being assigned and hence skip the "_action_confirm" of the picking (which is computed to be assigned) prior to the `_pre_action_done_hook` of the `button_validate` of the picking wich is suppose to return already created quality check:
https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_picking.py#L1145-L1147
In which case, the quality check is not triggered (Issue 1). Furthermore, since the `_action_confirm` of moves can also be applied to extra moves created to update the demand and to be merged to the initial move during the validation, the quality check creation might be called twice on a move once during its own `action_confirm` and once during the `_action_confirm` of its extra move (Issue2).
### Issue 1:
1. Create a storable product P with a barcode: XXX
2. Go to Quality > Quality Control > Quality Points > New
3. Create a new quality point for your product:
- Control per: "Operation"
- Operations: "Receipts"
4. Go to the barcode app > Operations > Receipts > New
5. Scan your product
6. Click on the pencil (key step)
7. Either edit the quantity from the digipad and confirm or go back to the picking and edit it from there.
8. Validate the receipt
#### > Even thought a quality check was created using your quality point for your receipt, it was not triggered before validation.
### Cause of the Issue:
Clicking on the pencil will trigger a call of the `save_barcode_data` which will in turn create a stock move line related to the picking during the write performed on the picking:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/controllers/stock_barcode.py#L68-L74
After this edition of the quantity of the picking will write on the `qty_done` dummy field of that move line which will in turn trigger a call of its inverse method and modify its quantity: https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/stock_barcode/models/stock_move_line.py#L58-L61
Changing the quantity of the ml will then update the state of the move to "assigned" because of these lines:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L487-L488 https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_move_line.py#L530-L531 https://github.com/odoo/odoo/blob/08f0c6481a190349369ead5ab9328886392ddbeb/addons/stock/models/stock_move.py#L2022-L2023 In turns, the state compute method of the picking will determine that the picking is assigned and the picking will not be confirmed during its `button_validate` prior to the `_pre_action_done_hook` of the `button_validate` as it is not in draft anymore.
### Fix:
The state of the move should stay as draft just as if we didn't created the move line through the pencil if we were to edit the qty_done via the barcode app.
### Note:
The inverse method of the "qty_done" computed field was introduced in 17.0+ by commit: 4f19668c51a90e8c12e57b6353bbe5194f83ca10 during the quantity refactoring so that the issue is not reproducible prior to that version.
### Issue 2:
Same steps 1 -> 5.
6'. click on the +1 button.
7'. Validate > this opens the quality check
8'. Pass the quality check > Validate again
9'. Go to Quality > Quality Control > Quality check
#### > Two quality checks were created isntead of one for your receipt
### Cause of the issue POST 17.0:
At some later point in the button validate of the picking, an `_action_done` is called to put the pickings and its move in done state:
https://github.com/odoo/odoo/blob/a74684777c27e26639b75b0668bb15afadb78c4f/addons/stock/models/stock_picking.py#L1157
However, during the `_action_done` of the moves if the quantity of the move is equal to 0, it will be confirmed:
https://github.com/odoo/odoo/blob/9cce72f984c7bd5fae126945e68f3eb2c143761b/addons/stock/models/stock_move.py#L1885-L1889 `product_uom_qty`, extra moves will be created,
However, this second `_action_confirm` will also generate a quality check for the same reason:
https://github.com/odoo/enterprise/blob/dd4a1ec4aaa7cbb95d6e40a8bb6ab1d6c88fc7b7/quality_control/models/stock_move.py#L12-L15
### Fix:
The condition confirming non-draft moves without demand seemed to be only relevant in the flow protected by the
`test_add_sml_with_kit_to_confirmed_picking` where a move line is created by hand for a kit product on an already confirmed picking. Leading to an assined move for a kit that never triggered the `action_explode`. This
"action" transforming the kit move using the phantom bom before the _action_done and hence if not perfomed leading to an error when trying to update the quantity on the related quants:
https://github.com/odoo/odoo/blob/9cce72f984c7bd5fae126945e68f3eb2c143761b/addons/mrp/models/stock_quant.py#L11
### Note:
A similar action_explode is performed when validating a picking contnaining a move_line related to a move:
https://github.com/odoo/enterprise/blob/2877bf921633247ed733e1d1ee47a6da0e6f8051/stock_barcode_mrp/static/src/models/barcode_picking_model.js#L8-L21
opw-4266053
---
Forward-Port-Of: odoo/enterprise#76301Problem --------- Follow-ups can be configured to execute multiple type of follow-ups (email, whatsapp, sms, ...) One of those is to print a letter, but it's not the most used. When you try to execute a follow-up manually, a wizard opens and follows the setup of the to-be-executed level ; so for example if the next level is configured to send a SMS, SMS should be ticket by default. But the "Print" option is always ticked, even if the "Letter" option is not selected in the configuration
Original PR description
Problem --------- Follow-ups can be configured to execute multiple type of follow-ups (email, whatsapp, sms, ...) One of those is to print a letter, but it's not the most used. When you try to execute a follow-up manually, a wizard opens and follows the setup of the to-be-executed level ; so for example if the next level is configured to send a SMS, SMS should be ticket by default. But the "Print" option is always ticked, even if the "Letter" option is not selected in the configuration of the level. This always generates an additional PDF that is often not needed. Objective --------- Do not tick "Print" by default when manually executing a follow-up level, unless "Letter" is ticket in the configuration of the level. Solution --------- Set "Print" default value in the wizard to the "Letter" value of the follow up line instead of leaving it as True (which is the default). task-4574971 Forward-Port-Of: odoo/enterprise#79829
Forward-Port-Of: odoo/enterprise#75496
Original PR description
Forward-Port-Of: odoo/enterprise#75496
Forward-Port-Of: odoo/enterprise#75723 Forward-Port-Of: odoo/enterprise#75496
Original PR description
Forward-Port-Of: odoo/enterprise#75723 Forward-Port-Of: odoo/enterprise#75496
Description of the issue/feature this PR addresses: ticket id: https://www.odoo.com/odoo/my-tasks/4179478 Current behavior before PR: - MENA l10n module descriptions were uncomplete or unconsistent Desired behavior after PR is merged: - improve l10n module description for MENA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#78889 Forward-Port-Of: odoo/enterprise#75666
Original PR description
Description of the issue/feature this PR addresses: ticket id: https://www.odoo.com/odoo/my-tasks/4179478 Current behavior before PR: - MENA l10n module descriptions were uncomplete or unconsistent Desired behavior after PR is merged: - improve l10n module description for MENA --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#78889 Forward-Port-Of: odoo/enterprise#75666
This traceback arises when the user tries to change the orders from one stage to another. after deleting the last stage in another tab. To reproduce this issue:- 1) Install `pos_restaurant` 2) Duplicate the tab and open the preparation display in one tab 3) In another tab delete the last stage(`complete`) for the above preparation display 4) In the first tab click any product of an order from the `ready` stage 5) Now click the `ready` icon of that order 5) At the terminal you will
Original PR description
This traceback arises when the user tries to change the orders from one stage to another. after deleting the last stage in another tab. To reproduce this issue:- 1) Install `pos_restaurant` 2)…
This traceback arises when the user tries to change the orders from one stage to another.
after deleting the last stage in another tab.
To reproduce this issue:-
1) Install `pos_restaurant`
2) Duplicate the tab and open the preparation display in one tab
3) In another tab delete the last stage(`complete`) for the above preparation display
4) In the first tab click any product of an order from the `ready` stage
5) Now click the `ready` icon of that order
5) At the terminal you will see a traceback
Error:-
```
IndexError: list index out of range
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.1/pos_preparation_display/models/preparation_display_orderline.py", line 51, in send_stricked_line_to_next_stage
next_stage_id = stage_ids.ids[current_stage_index + 1]
```
When the user clicks on the current stage icon it is supposed to go to the next stage with the help of the current stage index + 1.
But, because the user deleted the next stage it leads to an index error
After applying this will resolve the issue by preventing the user to modify stages
when there is an active session for that preparation display. Which making the code more robust
sentry-5056416790
Forward-Port-Of: odoo/enterprise#59415