Monday, June 24, 2024
24 changes · saas-17.2
Resolved issues and error corrections
Email marketing activity views such as opened or clicked now display only records tied to the selected mailing. This prevents unrelated contact activity from appearing, giving users accurate campaign results and cleaner follow-up lists.
Original PR description
Previously, the action to retrieve traces fetched all records irrespective of their relationship with the specific Mass Mailing. This commit refines the retrieval process to only include traces associated with the corresponding Mass Mailing. [Reproduce] - Install mass_mailing - Open Email Marketing, Create new mass_mailing with Recipients set to "Contact" - Send to all - Select "Opened" (or any of the others control panel actions) - BUG: list is not empty, it should! (same for the other control traces) Generalization: Note that in the steps above we used Recipients set to "Contact" it will render buggy behavior with any recipients, however in this way we have existing contact traces that show up opw-3959467
This fix makes an automated mail test more reliable by ensuring a starred message is fully loaded before it is deleted during testing. It helps reduce false test failures, supporting smoother validation and releases without changing user-facing behavior.
Original PR description
Before this PR, the `delete starred message updates counter` test was sometimes failing. It occurs when the message is deleted before it is loaded. This PR ensures we wait for the message to be loaded before deleting it. runbot-61305,62004
Miscellaneous changes
## Description Upon initial loading, the kiosk attendance screen will load all employee's related data for the current company. This would also include their avatars, which are encoded in base64. By default, the images size used are the 1024px versions, requires the download of a multi MiB page content which can be quite slow for users connected that have a bad service or slow internet connection. ## Solution Reduce the size of the loaded avatar to their 256px version, which should be 8x le
Original PR description
## Description Upon initial loading, the kiosk attendance screen will load all employee's related data for the current company. This would also include their avatars, which are encoded in base64. By default, the images size used are the 1024px versions, requires the download of a multi MiB page content which can be quite slow for users connected that have a bad service or slow internet connection. ## Solution Reduce the size of the loaded avatar to their 256px version, which should be 8x less content to download than before. ## Reference opw-3978883 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170163
Before this PR, searching for a partner using a mention ("@") could take up to 18 seconds on a channel with 200 members. As a result, the UI would freeze while waiting for the search function to return partners to display. After this PR, trying to mention a partner on the same channel only takes 80ms. Most of the time was consumed by the `sortPartnerSuggestions` function, specifically by the `discuss.members` compare function that looped over every channel member twice per comparison. T
Original PR description
Before this PR, searching for a partner using a mention ("@") could take up to 18 seconds on a channel with 200 members. As a result, the UI would freeze while waiting for the search function to return partners to display.
After this PR, trying to mention a partner on the same channel only takes 80ms.
Most of the time was consumed by the `sortPartnerSuggestions` function, specifically by the `discuss.members` compare function that looped over every channel member twice per comparison.
The rest of the time was consumed by owl's `reactive` (~1/3 of the time).
To solve this issue, this PR focuses on two points:
- Providing a set of member partner IDs to the compare functions to speed up membership tests.
- Removing unnecessary reactive callbacks by using `toRaw` (searching partners is not coupled to rendering).
Forward-Port-Of: odoo/odoo#170314On some DB, it is not possible to update some modules that depend on `account` To reproduce the issue: 1. Checkout before [1] and install `account_accountant` 2. Checkout after [1] 3. Update `account_accountant` Error: a server error is displayed > Field 'code' used in domain of field 'payment_acquirer_id' ([ > ('provider', '=', code)]) must be present in view but is missing."") Commit [1] contains unstable changes: it adds a domain on the field `payment_acquirer_id` of `accoun
Original PR description
On some DB, it is not possible to update some modules that depend on `account` To reproduce the issue: 1. Checkout before [1] and install `account_accountant` 2. Checkout after [1] 3. Update…
On some DB, it is not possible to update some modules that depend on
`account`
To reproduce the issue:
1. Checkout before [1] and install `account_accountant`
2. Checkout after [1]
3. Update `account_accountant`
Error: a server error is displayed
> Field 'code' used in domain of field 'payment_acquirer_id' ([
> ('provider', '=', code)]) must be present in view but is missing."")
Commit [1] contains unstable changes: it adds a domain on the field
`payment_acquirer_id` of `account.payment.method.line` and, to make
it work, it also adds the needed field `code` on the view
`view_account_journal_form`. But, if the view is not updated on an
existing database, the domain can not work, hence the client error.
This explains why the above use case does not work:
The module `account_accountant` has a view that also inherits the
view of account `account.view_account_journal_form`. As a result,
when updating the module (and, therefore, the view of
`account_accountant`), we `:View._validate_view` the whole view, which
will lead to:
https://github.com/odoo/odoo/blob/2cbf9d840b79520854731fd6a23431c69e451775/odoo/addons/base/models/ir_ui_view.py#L2282-L2286
[1] https://github.com/odoo-dev/odoo/commit/88782d3a76fb3941b9ed7d998ec0610aa26ff611
opw-3993709
opw-3993707
sentry-5416409171
Forward-Port-Of: odoo/odoo#170308
Forward-Port-Of: odoo/odoo#169978The value of the returned product may be different from the one initially received. In such case, the stock accounting may be broken. To reproduce the issue: (Need account_accountant) 1. Create an auto-FIFO product category 2. Create a storable product 3. Confirm a PO with 1 @ 10 4. Receive it 5. Confirm a PO with 4 @ 25 6. Receive 1 with backorder 7. Return it 8. On the backorder, receive 4 9. Bill Error: Looking at the AML of the stock-in account, some lines are not reconcile
Original PR description
The value of the returned product may be different from the one initially received. In such case, the stock accounting may be broken. To reproduce the issue: (Need account_accountant) 1. Create an…
The value of the returned product may be different from the one initially received. In such case, the stock accounting may be broken. To reproduce the issue: (Need account_accountant) 1. Create an auto-FIFO product category 2. Create a storable product 3. Confirm a PO with 1 @ 10 4. Receive it 5. Confirm a PO with 4 @ 25 6. Receive 1 with backorder 7. Return it 8. On the backorder, receive 4 9. Bill Error: Looking at the AML of the stock-in account, some lines are not reconciled and there is a $15 difference between the totald debit and the total credit. Step 7, when returning the product, we actually return the one at $10. Step 8, we then receive 4 products at $25 (hence the difference of $15). So, back to step 7, when returning the product, we should also compensate the stock-in account (with the expense one) in case of a difference. Let's look at another case: after step 7, the user "returns the return". In such case, the value of the new receipt is based on the returned one (see [1]), i.e.: the value of the newly received product will be $10. In such case, we also need to (1) compensate the stock-in account and (2) prevent the pdiff process to generate a pdiff of $15 (otherwise, we would add a value to the received product, which would go against the logic of [1]). This commit does not address the behaviour difference between the two above use cases (-> depending on how the user receives again the returned product, its value is not the same). This would probably need a deeper analysis a change, on master. Note: a third use case does not work either: (step 1-4), PO 1 @ 25, receive, bill, return, refund. [1] https://github.com/odoo/odoo/blob/07464844c69ac3b667adfede0e4e330831819802/addons/purchase_stock/models/stock_move.py#L32-L40 Initially added by https://github.com/odoo/odoo/commit/200aac56771fd1ef759f73b277a6808d96ee5f31 OWP-3698324 Forward-Port-Of: odoo/odoo#162697 Forward-Port-Of: odoo/odoo#162368
Currently, when the VAT number of a company is displayed on the POS receipt, its label `vat_label` on `res.country` is always displayed in English, despite the rest of the receipt being in the user's language. We want to display the VAT label also in the user's language. The reason is that the retrieval of the `res.country` records is done with an empty context (removing the current lang). Passing in the current context solves that. Forward-Port-Of: odoo/odoo#170147
Original PR description
Currently, when the VAT number of a company is displayed on the POS receipt, its label `vat_label` on `res.country` is always displayed in English, despite the rest of the receipt being in the user's language. We want to display the VAT label also in the user's language. The reason is that the retrieval of the `res.country` records is done with an empty context (removing the current lang). Passing in the current context solves that. Forward-Port-Of: odoo/odoo#170147
**Steps to reproduce:** - Install Invoicing - Go to "Invoicing / Configuration / Settings" - Deactivate "Document Digitalization" - Create an invoice - Upload a PDF via paperclip button or drag and drop in the chatter **Issue:** The preview box appears but it is empty. **Cause:** In "onUploaded" function of Chatter component, the parent view is not reloaded once the attachment is uploaded because "hasParentReloadOnAttachmentsChanged" property is False. This property depends on "post
Original PR description
**Steps to reproduce:** - Install Invoicing - Go to "Invoicing / Configuration / Settings" - Deactivate "Document Digitalization" - Create an invoice - Upload a PDF via paperclip button or drag and drop in the chatter **Issue:** The preview box appears but it is empty. **Cause:** In "onUploaded" function of Chatter component, the parent view is not reloaded once the attachment is uploaded because "hasParentReloadOnAttachmentsChanged" property is False. This property depends on "post_refresh" option. **Solution:** Add "post_refresh" option for "message_ids" field in the view as it is done when "account_invoice_extract" module is installed. opw-3887671 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169612
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the `Introduction` page by adding a new block under the event name for example - Save it and go back to backend - Create a new event with same name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button Issue: ------ The second event will have the edited
Original PR description
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the…
Steps to reproduce: ------------------- - Install `website_event` module - Create an event with name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button - Edit the `Introduction` page by adding a new block under the event name for example - Save it and go back to backend - Create a new event with same name `Test Event` and enable `Website Submenu` option - Click on `Go to Website` stat button Issue: ------ The second event will have the edited `Introduction` page from the first event. Cause: ------ When creating the menu, since we do not create a page, the URL retrieved in the process will be always the same and therefore redirect to the edited page of the first event (since the last part of the URL is used to retrieve the right view). Solution: --------- Ensure the URL is unique by using the view key (who is unique) as last part of the URL. opw-3945840 Forward-Port-Of: odoo/odoo#170149 Forward-Port-Of: odoo/odoo#169770
**Steps to reproduce the bug:** - Create a storable product P1: - uom = KG - tracked by lot: L1 - update the quantity to 50 kg - Create a storable product P2 with BoM: - quantity: 1 unit of P2 - Component: - 50 000 g of P1 - create a MO to produce one unit of P2 - Need 50 000 g of P1, select the lot L1 in the detailed operation **Problem:** - only 50 g of P1 is reserved intsead of 50 000g. opw-3935230 Forward-Port-Of: odoo/odoo#169892 Forward-Por
Original PR description
**Steps to reproduce the bug:**
- Create a storable product P1:
- uom = KG
- tracked by lot: L1
- update the quantity to 50 kg
- Create a storable product P2 with BoM:
- quantity: 1 unit of P2
- Component:
- 50 000 g of P1
- create a MO to produce one unit of P2
- Need 50 000 g of P1, select the lot L1 in the detailed operation
**Problem:**
- only 50 g of P1 is reserved intsead of 50 000g.
opw-3935230
Forward-Port-Of: odoo/odoo#169892
Forward-Port-Of: odoo/odoo#168055Introduced by 09f31597163a3251e58bb7b08939301574e1f65a Steps to reproduce: 1. Activate user's permission **"Discount on line"** 2. Configure a pricelist with _discount_policy_ as **"Show public price & discount to the customer"** and set _selectable_ `True`. 3. Configure a price rule for a given product (e.g. Storage Box) Storage box _Sales Price_ is set on 10$ and I set a price rule in 5$ so its like a 50% of discount in that product 4. Go to website shop + select configured pri
Original PR description
Introduced by 09f31597163a3251e58bb7b08939301574e1f65a Steps to reproduce: 1. Activate user's permission **"Discount on line"** 2. Configure a pricelist with _discount_policy_ as **"Show public price & discount to the customer"** and set _selectable_ `True`. 3. Configure a price rule for a given product (e.g. Storage Box) Storage box _Sales Price_ is set on 10$ and I set a price rule in 5$ so its like a 50% of discount in that product 4. Go to website shop + select configured pricelist + add to cart "Storage box" + Go to cart page 5. Apply a loyalty program (ie: discount code program type) configure as its reward's applicability on "Order". 6. Claim that discount code on cart page. Reward product price is 1$ when it should be 2$ Forward-Port-Of: odoo/odoo#170268 Forward-Port-Of: odoo/odoo#169284
**Before this PR:** - Some fields are associated with groups in XML files, but they are visible even though the groups are disabled. (Recurring Revenue is not ticked in settings, i.e., the feature is not activated). - automated_probability and message_bounce fields are visible in the measure in the pipeline graph view. **After this PR:** - recurring_revenue fields in the measure will only be visible when it is ticked in settings, i.e., only when the feature is activated. -
Original PR description
**Before this PR:** - Some fields are associated with groups in XML files, but they are visible even though the groups are disabled. (Recurring Revenue is not ticked in settings, i.e., the feature is not activated). - automated_probability and message_bounce fields are visible in the measure in the pipeline graph view. **After this PR:** - recurring_revenue fields in the measure will only be visible when it is ticked in settings, i.e., only when the feature is activated. - automated_probability and message_bounce fields will be hidden from the measure in the pipeline graph view. Task-3810415 Forward-Port-Of: odoo/odoo#170307 Forward-Port-Of: odoo/odoo#160638
Problem --- Since the [portal redesign](https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8), made the "Quotations to review" button in the portal an alert, it no longer makes sense to display it when there are 0 quotes to review opw-3991880 Forward-Port-Of: odoo/odoo#169481
Original PR description
Problem --- Since the [portal redesign](https://github.com/odoo/odoo/commit/df8535fbd40e1e5c09dbe616a3332c76c23525c8), made the "Quotations to review" button in the portal an alert, it no longer makes sense to display it when there are 0 quotes to review opw-3991880 Forward-Port-Of: odoo/odoo#169481
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to 31/12/23 4. Reset the move to draft - The deferral moves of 2024 are deleted. - The deferral moves of 2023 are still linked to the move - The reversed deferral moves of 2023 are created but not linked to the move and they are dated on the 1st January (first day after the lock date) 5. Post
Original PR description
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to…
Steps to reproduce: ------------------- 1. Create a move with date = 01/01/24, start = 01/06/23, end = 31/05/24. 2. Post the move, the deferred entries are created 3. Set the All User Lock Date to 31/12/23 4. Reset the move to draft - The deferral moves of 2024 are deleted. - The deferral moves of 2023 are still linked to the move - The reversed deferral moves of 2023 are created but not linked to the move and they are dated on the 1st January (first day after the lock date) 5. Post the move again A traceback is raised because of an assert that verifies that we shouldn't regenerate deferral entries if a move already has them. Solution: --------- 1. The generated reversal of the deferrals of 2023 should be linked to the move. 2. Now that this is done, we can remove the assert because all deferral entries will cancel out each other (i.e. the aggregation will result in no deferral entries). 3. When reverting, we will now use the accounting date instead of the first day after the lock date (if there is one) opw-3861179 https://github.com/odoo/enterprise/pull/61928 Forward-Port-Of: odoo/odoo#164316
**Before this PR**: While creating the E-way bill, when sending a request with the distance set to "Zero," the government portal updates the distance based on their own database and sends it back in the response as an alert in the format " , Distance between these two pincodes is \d+, ". However, the Odoo system did not update the distance field with this value. **After this PR**: The Odoo system now correctly parses the alert from the government portal response and updates the distance fie
Original PR description
**Before this PR**: While creating the E-way bill, when sending a request with the distance set to "Zero," the government portal updates the distance based on their own database and sends it back in the response as an alert in the format " , Distance between these two pincodes is \d+, ". However, the Odoo system did not update the distance field with this value. **After this PR**: The Odoo system now correctly parses the alert from the government portal response and updates the distance field on the E-way bill with the computed distance. **task**-3961833 Forward-Port-Of: odoo/odoo#168419
Adding tests to ensure that the feature that allows to automatically confirm sale orders through partial payments work correctly. See Task - 2672713 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#121640
Original PR description
Adding tests to ensure that the feature that allows to automatically confirm sale orders through partial payments work correctly. See Task - 2672713 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#121640
Currently we send the currency code as an integer and this must be sent as a string 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#169337 Forward-Port-Of: odoo/odoo#169253
Original PR description
Currently we send the currency code as an integer and this must be sent as a string 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#169337 Forward-Port-Of: odoo/odoo#169253
PURPOSE The card is simply too wide for the display in mobile view. SPECIFICATIONS - made the avatar card responsive - enabled the avatar card popover for m2x avatar user widget - close avatar card when clicking on 'send message' Task-3713375 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169878 Forward-Port-Of: odoo/odoo#155822
Original PR description
PURPOSE The card is simply too wide for the display in mobile view. SPECIFICATIONS - made the avatar card responsive - enabled the avatar card popover for m2x avatar user widget - close avatar card when clicking on 'send message' Task-3713375 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169878 Forward-Port-Of: odoo/odoo#155822
**Steps to reproduce the bug:** - Create a consumable product “Kit 1” with the following BoM: - component: X1 - Create a repair order to repair one unit of Kit 1: - Don’t add any part - confirm and Start the repair - try to end the repair **Problem:** A traceback is triggered: “raise ValueError("Expected singleton: %s" % self) Value Error: Expected singleton: stock.location() “ When the "action_repair_end" is called, a move is created with the kit product, and
Original PR description
**Steps to reproduce the bug:** - Create a consumable product “Kit 1” with the following BoM: - component: X1 - Create a repair order to repair one unit of Kit 1: - Don’t add any part - confirm and…
**Steps to reproduce the bug:**
- Create a consumable product “Kit 1” with the following BoM:
- component: X1
- Create a repair order to repair one unit of Kit 1:
- Don’t add any part
- confirm and Start the repair
- try to end the repair
**Problem:**
A traceback is triggered:
“raise ValueError("Expected singleton: %s" % self)
Value Error: Expected singleton: stock.location()
“
When the "action_repair_end" is called, a move is created with the kit
product, and then we attempt to confirm it:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L80
Since the product is a kit, it is exploded into two moves with products
“X1” and “X2”. We then try to assign them a “repair” picking_type_id:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L74
So, the write method is used and since the “picking_type_id” is in the
vals, and the product in the move (X1) is not the same as the one in the
repair order, we consider this product a “Part” of the repair.
Therefore, we try to use its location_id and location_dest_id, which we
fetch based on the “repair_line_type” that will be False because it is
not a part of the repair but rather the product to be repaired:
https://github.com/odoo/odoo/blob/eaa6e1a08c3d2cdcb558689523e5bd332978f5e4/addons/repair/models/stock_move.py#L93-L94
The first error is triggered during the “should_by_pass” check because
there is no location set in the move:
https://github.com/odoo/odoo/blob/c7b947364d34cc6ccfb1eb7a2c16b6bba226d8e7/addons/stock/models/stock_move.py#L1051-L1052
If we fix this error, we will still encounter an error because both
moves will be confirmed. However, we will return to the first loop to
continue calling the “_trigger_scheduler” function for the first move
with the “Kit” product, which will be already deleted because it was
exploded, resulting in a user error:
“odoo.exceptions.MissingError: Record does not exist or has been deleted.
(Record: stock.move(253,), User: 1)
“
opw-[3942297](https://www.odoo.com/web#id=3942297&view_type=form&model=project.task)
Forward-Port-Of: odoo/odoo#168227### Steps to reproduce: - Enable multi-step routes in the settings - Go to Invertory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a product: - Routes: MTO + Buy route - Variants: Color > Black, White - In the purchase tab of the product create two lines with: - Vendor 1 sells the Black variant - Vendor 2 sells the White variant - Create and confirm a sale order with 2 lines: - 1 x Black variant - 1 x White variant ### Expected behavior: Two purchase order
Original PR description
### Steps to reproduce: - Enable multi-step routes in the settings - Go to Invertory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a product: - Routes: MTO + Buy route -…
### Steps to reproduce: - Enable multi-step routes in the settings - Go to Invertory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a product: - Routes: MTO + Buy route - Variants: Color > Black, White - In the purchase tab of the product create two lines with: - Vendor 1 sells the Black variant - Vendor 2 sells the White variant - Create and confirm a sale order with 2 lines: - 1 x Black variant - 1 x White variant ### Expected behavior: Two purchase order should be created: - 1 x Black variant sold by Vendor 1 - 1 x White variant sold by Vendor 2 ### Current behavior: Only one purchase order is created so that Vendor 1 as the seller of both procurements even thought vendor 2 is the only real potential seller of the white variant. ### Cause of the issue: Running the procurements of both lines of the Sale order will trigger the `_run_buy` method which will determine the seller by "default": https://github.com/odoo/odoo/blob/3383d5bd68bfc13b7881f72e5adbb7c27a6df30e/addons/purchase_stock/models/stock_rule.py#L70-L72 using the `_prepare_sellers` method. However, it relies solely on the `seller_ids` field of the `product.template` model https://github.com/odoo/odoo/blob/3383d5bd68bfc13b7881f72e5adbb7c27a6df30e/addons/product/models/product_product.py#L633-L634 Since both variants have the same template they will therefore both be associated with the same default seller. opw-3940786 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166970
There are some small issues when transforming a normal column into a grid item: 1) When borders are set on columns, these columns do not look good when they become grid items: - In edit mode, drop the "Text-Image" snippet. - Set the columns "Border" option to a rather big number (e.g. 50px). - Toggle the grid mode. => The layout does not look good: the grid items are too small and not placed like how they were in normal mode (toggling the grid mode is supposed to place the items as close
Original PR description
There are some small issues when transforming a normal column into a grid item: 1) When borders are set on columns, these columns do not look good when they become grid items: - In edit mode, drop…
There are some small issues when transforming a normal column into a grid item: 1) When borders are set on columns, these columns do not look good when they become grid items: - In edit mode, drop the "Text-Image" snippet. - Set the columns "Border" option to a rather big number (e.g. 50px). - Toggle the grid mode. => The layout does not look good: the grid items are too small and not placed like how they were in normal mode (toggling the grid mode is supposed to place the items as close as possible as before the toggle). - Drop the "Steps" snippet and set a border on a column. - Drag the column and drop it in the "Text-Image" grid dropzone. => The content of the column overflows the grid area which does not look good. This issue happens because when computing the grid areas, the border was not taken into account, resulting in grid items being too small (-> the width/height without the borders) and not having the right position (-> the starting position of the element "inside" the borders). 2) When a column becomes a grid item, its grid area is sometimes a bit too small to contain its content, making it overflow a bit: - Drop the "Text-Image" snippet. - In the first column, drop the "Rating" snippet and delete all the other content. - Toggle the grid mode. => The "Rating" snippet overflows a bit the grid item (it is easier to see when using the browser inspector). This overflow happens because when computing the grid areas, the grid padding was not taken into account, resulting in the content overflowing if it was barely fitting or if the grid padding was really big (e.g. when dropping a normal column in a grid mode "Big Boxes" snippet). This commit fixes these issues by taking the borders and the grid padding into account in the grid areas computation when toggling the grid mode and when converting a normal column to a grid item when drag and dropping it. task-3970022 Forward-Port-Of: odoo/odoo#169988 Forward-Port-Of: odoo/odoo#169090
A traceback is occurig when the user creating a SO without Qutation date. To reproduce this issue:- 1) Install `Sales` 2) Enable `Sales Credit Limit` in the settings 3) Try to create a `Quotation` by removing the default `Quotation Date` and then add a `Customer` 4) A traceback occurs Error:- ``` AttributeError: 'bool' object has no attribute 'date' ``` When the user removes the `date_order` its value will be false. This leads to the traceback when the `date` is extracte
Original PR description
A traceback is occurig when the user creating a SO without Qutation date. To reproduce this issue:- 1) Install `Sales` 2) Enable `Sales Credit Limit` in the settings 3) Try to create a `Quotation` by removing the default `Quotation Date` and then add a `Customer` 4) A traceback occurs Error:- ``` AttributeError: 'bool' object has no attribute 'date' ``` When the user removes the `date_order` its value will be false. This leads to the traceback when the `date` is extracted from `date_order`. https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/sale/models/sale_order.py#L385 After applying this commit will resolve this issue by taking the current date if the 'date_order' is false. This makes code more robust. senrty-5500467446 Forward-Port-Of: odoo/odoo#170355 Forward-Port-Of: odoo/odoo#169911
- Create several invoices that would throw an error when generating UBL (e.g. recipient bank is missing) - Send those invoices at once - Peppol state is stuck in `queued` because of the error, even though they should be `skipped` This is because we don't update peppol state when errors happen. This commit extends `_hook_if_errors` to update peppol state. opw-3958334 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/
Original PR description
- Create several invoices that would throw an error when generating UBL (e.g. recipient bank is missing) - Send those invoices at once - Peppol state is stuck in `queued` because of the error, even though they should be `skipped` This is because we don't update peppol state when errors happen. This commit extends `_hook_if_errors` to update peppol state. opw-3958334 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170098
[FIX] project,hr_timesheet: create projects with company-specific customer Problem --- When creating projects with a customer whose company field is set, `_check_company` raises an Error because of a mismatch with the analytic account's company (False). Steps --- (from fresh db, with demo data) 1. install `project` and `sale_management` (so that projects can be billable) 2. in the settings, create a second company, (so that contacts' 'Company' field can be set) 3. on a con
Original PR description
[FIX] project,hr_timesheet: create projects with company-specific customer Problem --- When creating projects with a customer whose company field is set, `_check_company` raises an Error because of a…
[FIX] project,hr_timesheet: create projects with company-specific customer
Problem
---
When creating projects with a customer whose company field is set,
`_check_company` raises an Error because of a mismatch with
the analytic account's company (False).
Steps
---
(from fresh db, with demo data)
1. install `project` and `sale_management` (so that projects can be
billable)
2. in the settings, create a second company,
(so that contacts' 'Company' field can be set)
3. on a contact, set the 'Company' field (under: Sales & Purchase > Misc)
to the current company ('YourCompany')
4. In Setting > Project: enable 'Timesheets'
5. Try to create a new billable project with 'Timesheets' enabled
and the customer from step 3
Fix
---
Never set the partner on the analytic account when creating a new
project.
Note that we have to modify the corresponding test.
This is acceptable because in some flows (create project with
no partner, **then** set the partner) this is what
already happens and seems to not be a problem.
opw-3865150
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#162961