Tuesday, October 29, 2024
36 changes · saas-17.4
Resolved issues and error corrections
This fixes a point of sale issue where changing the cashier after adding products could leave the order linked to the previous cashier while the receipt showed the current one. Orders and printed receipts now show the same cashier, reducing confusion in sales records and staff accountability.
Original PR description
Before this commit, adding a product to an order and then changing the cashier would not update the cashier information on the captured order, resulting in the previous cashier being recorded. However, the printed receipt would display the current cashier, leading to inconsistency. opw-4257705 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Currently it can happen that slightly changing the amount in (document) currency (field `amount_currency`) i.e. on a tax line can lead to an unbalanced move. (See example and "Reproduce" below.) The issue is the syncing (function `_sync_invoice`) between - amount in currency (document currency; field `amount_currency`) and - balance (company currency; field `balance`). There we update the amount in currency in case the balance is changed and the amount in currency is not changed. But
Original PR description
Currently it can happen that slightly changing the amount in (document) currency (field `amount_currency`) i.e. on a tax line can lead to an unbalanced move. (See example and "Reproduce" below.) The…
Currently it can happen that slightly changing the amount in (document)
currency (field `amount_currency`) i.e. on a tax line can lead to an
unbalanced move. (See example and "Reproduce" below.)
The issue is the syncing (function `_sync_invoice`) between
- amount in currency (document currency; field `amount_currency`) and
- balance (company currency; field `balance`).
There we update the amount in currency in case the balance is changed
and the amount in currency is not changed.
But this is problematic in case we want (in the same write) set
a different amount in currency but explicitly set the same balance
(and not just not write anything to the `balance` field).
Since we write the same balance it is not detected as a
change and we update the balance based on the amount in currency.
But this should not happen; the balance should be "protected"
from being updated (since it is the value we explicitly want).
This can i.e. cause the balance of the receivable line to receive the wrong value
I.e. consider the following case; with currency rate = 2 (also see "Reproduce" below)
Journal Items:
- product 1: amount in currency = -1000.00 €, balance = -500.00
- product 2: amount in currency = -200.00 €, balance = -100.00
- tax line 1: amount in currency = -180.03 €, balance = -90.02
- tax line 2: amount in currency = -30.00 €, balance = -15.00
- Receivable: amount in currency = -1410.03 €, balance = 705.02
And we modify tax line 2: amount in currency = -29.99 €.
Then first we set the correct values because we basically compute the
receivable line by summing the other lines:
Journal Items:
- product 1: amount in currency = -1000.00 €, balance = -500.00
- product 2: amount in currency = -200.00 €, balance = -100.00
- tax line 1: amount in currency = -180.03 €, balance = -90.02
- tax line 2: amount in currency = -29.99 €, balance = -15.00
- Receivable: amount in currency = -1410.02 €, balance = 705.02
So we have set the balance to the same as before but changed the
amount in currency. So then we recompute the balance on the receivable
line from the amount in currency due to the syncing (`_sync_invoice`)
Journal Items:
- product 1: amount in currency = -1000.00 €, balance = -500.00
- product 2: amount in currency = -200.00 €, balance = -100.00
- tax line 1: amount in currency = -180.03 €, balance = -90.02
- tax line 2: amount in currency = -29.99 €, balance = -15.00
- Receivable: amount in currency = -1410.02 €, balance = 705.01
But now the move is not balanced (the sum of the balances should be 0)
-500.00 + -100.00 + -90.02 + -15.00 = -705.02 (and not -705.01)
After this commit we "protect" the balance and amount in currency from
being updated by `_sync_invoice` in case the surrounding `write`
sets the balance (`balance`) or amount in currency (`amount_currency`)
respectively.
Reproduce: (c.f. example above)
1. Select company "My Company (San Francisco)"
2. Ensure EUR currency is activated and has value 2 unit per USD
(at the time of the invoice that will be created further below)
3. Copy the 15% tax
4. Create a new invoice in EUR with 2 lines
(1) qty = 1, unit price = 1000, taxes = 15%
(2) qty = 1, unit price = 200, taxes = 15%, 15% (Copy)
5. There should be 2 tax lines in the "Journal Items" tab
(1) amount in currency = -180.00 €, credit = 90.00 USD
(2) amount in currency = -30.00 €, credit = 90.00 USD
6. Modify tax line (1); set amount in currency to -180.03 €
and save.
The credit will be updated to 90.02 USD.
7. Modify tax line (2); set amount in currency to -29.99 €
and try to save
8. An "Invalid Operation" error is raised:
The move (Draft Invoice ) is not balanced.
The total of debits equals $ 705.01 and the total of credits equals $ 705.02.
Forward-Port-Of: odoo/odoo#185619
Forward-Port-Of: odoo/odoo#171705Currently the `report_stock_quantity` view third `UNION ALL` does a `generate_series` between the moves date and `now()` in case the move is not in done. This can lead to significant slowdowns when querying the view in case some databases have old moves not in done, cancel, draft. In that case, the report will generate a row for each day between the move.date and `now()`, leading to thousands of rows for 1 stock.move. To alleviate that, this commit uses the `report_period` as a lower bound
Original PR description
Currently the `report_stock_quantity` view third `UNION ALL` does a `generate_series` between the moves date and `now()` in case the move is not in done. This can lead to significant slowdowns when querying the view in case some databases have old moves not in done, cancel, draft. In that case, the report will generate a row for each day between the move.date and `now()`, leading to thousands of rows for 1 stock.move. To alleviate that, this commit uses the `report_period` as a lower bound. This greatly reduces the number of rows generated by the third `UNION ALL` without losing forecasted accuracy since the moves are not in done. #### speedup In a v17 database where `all_sm` returns 600 000 rows, querying the `report_stock_quantity` view goes from 20s -> 7s. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#179359
When downloading a url type attachment, it will not open in a new tab and breaks the activity of the current tab,such as rtc call and breadcrumbs. To reproduce the error: Project > Task > click on the url attachment > open in the current tab, the breadcrumbs (previous filters) will be lost This commit fixes the issue by opening the url attachment in a new tab. And "downloading" a url does not make sense, so the download button is replaced by an open button. --- I confirm I have signed
Original PR description
When downloading a url type attachment, it will not open in a new tab and breaks the activity of the current tab,such as rtc call and breadcrumbs. To reproduce the error: Project > Task > click on the url attachment > open in the current tab, the breadcrumbs (previous filters) will be lost This commit fixes the issue by opening the url attachment in a new tab. And "downloading" a url does not make sense, so the download button is replaced by an open button. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185617 Forward-Port-Of: odoo/odoo#184264
Follow-up of: https://github.com/odoo/odoo/pull/180671 Actions were not translated, and also when mouse-hovering the image the cursor was not changing to `zoom-in` icon. This happens because the hovering style was put on img but it's not effectively reachable due to an absolute positioned div above it. task-3563828 Forward-Port-Of: odoo/odoo#185531 Forward-Port-Of: odoo/odoo#185219
Original PR description
Follow-up of: https://github.com/odoo/odoo/pull/180671 Actions were not translated, and also when mouse-hovering the image the cursor was not changing to `zoom-in` icon. This happens because the hovering style was put on img but it's not effectively reachable due to an absolute positioned div above it. task-3563828 Forward-Port-Of: odoo/odoo#185531 Forward-Port-Of: odoo/odoo#185219
As Debian wants to remove pypdf2 and keep only pypdf (4.3) in trixie, so we need to be compatible otherwise Odoo could not be released in the next Debian. Forward-Port-Of: odoo/odoo#184787 Forward-Port-Of: odoo/odoo#183165
Original PR description
As Debian wants to remove pypdf2 and keep only pypdf (4.3) in trixie, so we need to be compatible otherwise Odoo could not be released in the next Debian. Forward-Port-Of: odoo/odoo#184787 Forward-Port-Of: odoo/odoo#183165
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix. Based on Real World™️ evidence. Description of the issue/feature this PR addresses: <details> ``` odoo-1 | 2024-10-24 11:20:18,785 42 ERROR odoo odoo.addons.google_calendar.models.res_users: [res.users(2,)] Calendar Synchro - Exception : unsupported property: ! odoo-1 | Traceback (most recent call last): odoo-1 | File "/opt/odoo/auto
Original PR description
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix. Based on Real World™️ evidence. Description of the…
This completes https://github.com/odoo/odoo/pull/171784 by adding support for the same kind of rrule string, but without the `RRULE;` prefix.
Based on Real World™️ evidence.
Description of the issue/feature this PR addresses:
<details>
```
odoo-1 | 2024-10-24 11:20:18,785 42 ERROR odoo odoo.addons.google_calendar.models.res_users: [res.users(2,)] Calendar Synchro - Exception : unsupported property: !
odoo-1 | Traceback (most recent call last):
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 100, in _sync_all_google_calendar
odoo-1 | user.with_user(user).sudo()._sync_google_calendar(google)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[res_users.py](https://res_users.py/)", line 78, in _sync_google_calendar
odoo-1 | synced_recurrences = self.env['calendar.recurrence'].with_context(write_dates=recurrences_write_dates)._sync_google2odoo(recurrences)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[google_sync.py](https://google_sync.py/)", line 202, in _sync_google2odoo
odoo-1 | odoo_record.with_context(dont_notify=True)._write_from_google(gevent, vals)
odoo-1 | File "/opt/odoo/auto/addons/google_calendar/models/[calendar_recurrence_rule.py](https://calendar_recurrence_rule.py/)", line 86, in _write_from_google
odoo-1 | current_parsed_rrule = self._rrule_parse(current_rrule, self.dtstart)
odoo-1 | File "/opt/odoo/auto/addons/calendar/models/[calendar_recurrence.py](https://calendar_recurrence.py/)", line 375, in _rrule_parse
odoo-1 | rule = rrule.rrulestr(rule_str, dtstart=date_start)
odoo-1 | File "/usr/local/lib/python3.10/site-packages/dateutil/[rrule.py](https://rrule.py/)", line 1730, in __call__
odoo-1 | return self._parse_rfc(s, **kwargs)
odoo-1 | File "/usr/local/lib/python3.10/site-packages/dateutil/[rrule.py](https://rrule.py/)", line 1698, in _parse_rfc
odoo-1 | raise ValueError("unsupported property: "+name)
odoo-1 | ValueError: unsupported property:
```
</details>
Current behavior before PR: Odoo stops sync of users calendars as long as they have one event with an RRULE like this.
Desired behavior after PR is merged: Odoo keeps working.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@moduon MT-7215
Forward-Port-Of: odoo/odoo#185089When model selection field is used in a form, its default value is always one of the available values. Because of this, if the field is required, it does not force the user to pick a value, but it provides a possibly incorrect default value. This commit makes an empty value available for selection if no default value is chosen. The behavior is also made available on custom fields, if such an empty value had been manually created, it will be replaced by this implementation. Steps to
Original PR description
When model selection field is used in a form, its default value is always one of the available values. Because of this, if the field is required, it does not force the user to pick a value, but it provides a possibly incorrect default value. This commit makes an empty value available for selection if no default value is chosen. The behavior is also made available on custom fields, if such an empty value had been manually created, it will be replaced by this implementation. Steps to reproduce: - Install website_form_project - Add a form in a page - Select the "Create a Task" action - Add the "Analytic Account" field to the form - Make the field required => There was no way to have no default value by default. opw-4268164 Forward-Port-Of: odoo/odoo#184842
Steps to reproduce ================== - Install stock,mrp,web_studio - Go to Inventory > Delivery Orders - Open WH/OUT/00001 - Open studio - On the x2many field, click on "Edit form" -> Studio switches to that view, - Click on "Edit form" again for the new lines - Exit studio - Click on the hamburger button -> The styling is broken Cause of the issue ================== When clicking on "Edit form", studio inlines the selected form view. The nosheet form style is only applied if
Original PR description
Steps to reproduce ================== - Install stock,mrp,web_studio - Go to Inventory > Delivery Orders - Open WH/OUT/00001 - Open studio - On the x2many field, click on "Edit form" -> Studio switches to that view, - Click on "Edit form" again for the new lines - Exit studio - Click on the hamburger button -> The styling is broken Cause of the issue ================== When clicking on "Edit form", studio inlines the selected form view. The nosheet form style is only applied if the form contains no sheet element. In this case, there is a sheet element, but inside a nested form. Solution ======== Only consider sheets if they are part of the current form view. opw-4130337 Forward-Port-Of: odoo/odoo#185504
Before this commit : `is_html_empty` considers empty icons as empty html. After this commit: Empty icons are considered as non empty html Note: changed the tag_re to more performant regex task-4060037 Forward-Port-Of: odoo/odoo#182642
Original PR description
Before this commit : `is_html_empty` considers empty icons as empty html. After this commit: Empty icons are considered as non empty html Note: changed the tag_re to more performant regex task-4060037 Forward-Port-Of: odoo/odoo#182642
"Tax Receivable" account shouldn't be set as a receivable account, but as a current assets one, else it will appear in aged reports, which does not make sense. Similar to the fix already made here for "Tax Payable": https://github.com/odoo/odoo/commit/2318e671c3a5535590fe6d95949835417856dce6 Forward-Port-Of: odoo/odoo#185141
Original PR description
"Tax Receivable" account shouldn't be set as a receivable account, but as a current assets one, else it will appear in aged reports, which does not make sense. Similar to the fix already made here for "Tax Payable": https://github.com/odoo/odoo/commit/2318e671c3a5535590fe6d95949835417856dce6 Forward-Port-Of: odoo/odoo#185141
When archiving an operation in a bom, currently it will unlink if from bom lines that had it set as their `Consumed in Operation`. However, it's not the case for byproducts, meaning that the byproducts lines will still display the now archived operation. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185390 Forward-Port-Of: odoo/odoo#185093
Original PR description
When archiving an operation in a bom, currently it will unlink if from bom lines that had it set as their `Consumed in Operation`. However, it's not the case for byproducts, meaning that the byproducts lines will still display the now archived operation. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185390 Forward-Port-Of: odoo/odoo#185093
There were some cache inconsistencies when computing remaining leaves on the dashboard or in the accrual scheduled actions due to commit 7ef0ad2. The cache invalidation is necessary to avoid issues when the call to process_accrual is made twice in a row, but the cache invalidation was too broad. This commit aims at only invalidating the part of the cache that were causing issues when computing the remaining leaves. opw-4167557 opw-4167582 opw-4175815 opw-4149134 opw-4241970 Forward
Original PR description
There were some cache inconsistencies when computing remaining leaves on the dashboard or in the accrual scheduled actions due to commit 7ef0ad2. The cache invalidation is necessary to avoid issues when the call to process_accrual is made twice in a row, but the cache invalidation was too broad. This commit aims at only invalidating the part of the cache that were causing issues when computing the remaining leaves. opw-4167557 opw-4167582 opw-4175815 opw-4149134 opw-4241970 Forward-Port-Of: odoo/odoo#180832
Since [1] the `user_id` represents the buyer, the string in the field was updated but not in the filter and the search which could be confusing. [1]: https://github.com/odoo/odoo/commit/470b7562 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184833 Forward-Port-Of: odoo/odoo#179834
Original PR description
Since [1] the `user_id` represents the buyer, the string in the field was updated but not in the filter and the search which could be confusing. [1]: https://github.com/odoo/odoo/commit/470b7562 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184833 Forward-Port-Of: odoo/odoo#179834
Before this commit, it was showing a "enable push notification" messaging menu item on iOS devices. This item was persistent and could not be removed, because iOS does not allow to enable specifically push notifcation on web apps, except if there are installed as PWA in which case they necessarily authorized push notifications based on OS app preferences. opw-4236170 Backport of https://github.com/odoo/odoo/pull/178057 Forward-Port-Of: odoo/odoo#185331 Forward-Port-Of: odoo/odoo#185245
Original PR description
Before this commit, it was showing a "enable push notification" messaging menu item on iOS devices. This item was persistent and could not be removed, because iOS does not allow to enable specifically push notifcation on web apps, except if there are installed as PWA in which case they necessarily authorized push notifications based on OS app preferences. opw-4236170 Backport of https://github.com/odoo/odoo/pull/178057 Forward-Port-Of: odoo/odoo#185331 Forward-Port-Of: odoo/odoo#185245
Steps to reproduce: 1. Navigate to Pricelists. 2. Import a CSV or XLSX file that contains at least one product or product variant. 3. Duplicate the newly created pricelist. Issue: - When duplicating an imported pricelist, the duplicated record does not retain the product or product variant information. Cause: - If the applied_on field is not provided during the creation of the pricelist item, the default value of 3_global is applied. - As a result, when duplicating the pricelis
Original PR description
Steps to reproduce: 1. Navigate to Pricelists. 2. Import a CSV or XLSX file that contains at least one product or product variant. 3. Duplicate the newly created pricelist. Issue: - When duplicating an imported pricelist, the duplicated record does not retain the product or product variant information. Cause: - If the applied_on field is not provided during the creation of the pricelist item, the default value of 3_global is applied. - As a result, when duplicating the pricelist, the product_tmpl_id and product_id fields are set to None. Fix: - When the applied_on field is missing during the creation of a new pricelist item, set it based on the presence of the relevant fields (such as product or product variant). opw-4170242 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185100
Adds default value to a few required selection fields as currently a value is apparently set in the form (as the select field will pick the first value) but without having the value really set in the field, meaning that on save, the field will appear as invalid. Also, to be able to select the "almost default" value, you'd need to select another value then pick the first value again to properly set it in the field and be able to save the form. To avoid those issue, we can add a default value t
Original PR description
Adds default value to a few required selection fields as currently a value is apparently set in the form (as the select field will pick the first value) but without having the value really set in the field, meaning that on save, the field will appear as invalid. Also, to be able to select the "almost default" value, you'd need to select another value then pick the first value again to properly set it in the field and be able to save the form. To avoid those issue, we can add a default value to those fields corresponding to the current "default" value in the form. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185477 Forward-Port-Of: odoo/odoo#184939
**Current behavior:** Selling a kit bom product will result in inaccurate journal entries in the stock output and expense accounts, the amount_currency field will only reflect the price unit of the kit's components. **Expected behavior:** The price unit should reflect the total cost of the components on the BoM: e.g., if a kit product needs 4 of some component1, the price unit should be 4 * component1.standard_price. **Steps to reproduce:** 1. Create a kit product with 2 components, bot
Original PR description
**Current behavior:** Selling a kit bom product will result in inaccurate journal entries in the stock output and expense accounts, the amount_currency field will only reflect the price unit of the…
**Current behavior:** Selling a kit bom product will result in inaccurate journal entries in the stock output and expense accounts, the amount_currency field will only reflect the price unit of the kit's components. **Expected behavior:** The price unit should reflect the total cost of the components on the BoM: e.g., if a kit product needs 4 of some component1, the price unit should be 4 * component1.standard_price. **Steps to reproduce:** 1. Create a kit product with 2 components, both with qty > 1 2. Assign dropshipping to the kit 3. Create a sale order and confirm -> confirm the purchase order 4. Validate the dropship transfer, invoice the sale order and post it 5. See the 2 inaccurate journal entries, where the debit/credit respectively only total to one instance of each component's cost added together **Cause of the issue:** The price unit calculation didn't look at the bom line product qty, only using the price unit 1 time per component. **Fix:** Multiply the value by the quantity of it required on its line in the BoM. opw-4253827 Forward-Port-Of: odoo/odoo#185247 Forward-Port-Of: odoo/odoo#183916
Same issue as https://github.com/odoo/odoo/pull/126323 but with CSV, TXT and other types of files. This basically overrides the default decoding charset of the email python module to use utf-8 by default. As mentioned in the PR above, utf-8 is a superset of the ascii encoding and this should not cause other issues. opw-4237114 opw-4245261 Forward-Port-Of: odoo/odoo#185360 Forward-Port-Of: odoo/odoo#184295
Original PR description
Same issue as https://github.com/odoo/odoo/pull/126323 but with CSV, TXT and other types of files. This basically overrides the default decoding charset of the email python module to use utf-8 by default. As mentioned in the PR above, utf-8 is a superset of the ascii encoding and this should not cause other issues. opw-4237114 opw-4245261 Forward-Port-Of: odoo/odoo#185360 Forward-Port-Of: odoo/odoo#184295
Sometimes when renaming the IoT box, it would instead rename to `localhost.localdomain`. This was due to the script writing to the `/tmp` directory, which sometimes gets full and causes the `/etc/hostname` file to become empty. The fix is simply to bypass using the `/tmp` directory at all in the script. task-4210432 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184843
Original PR description
Sometimes when renaming the IoT box, it would instead rename to `localhost.localdomain`. This was due to the script writing to the `/tmp` directory, which sometimes gets full and causes the `/etc/hostname` file to become empty. The fix is simply to bypass using the `/tmp` directory at all in the script. task-4210432 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184843
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all details - Set the target URL as 'http://localhost:8069/odoo' - Copy Tracked URL > Open url in incognito mode or new browser error: `ValueError: Expected singleton: res.users()` This is because when we open this type of link, the code line [1] tries to set a cookie, and since we have not log
Original PR description
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all…
Currently, an exception is generated when the user tries to open the UTM link by following steps. - Install 'website_links' (for creating a link tracker). - Go to Link Tracker > New > Fill all details - Set the target URL as 'http://localhost:8069/odoo' - Copy Tracked URL > Open url in incognito mode or new browser error: `ValueError: Expected singleton: res.users()` This is because when we open this type of link, the code line [1] tries to set a cookie, and since we have not logged in (not even have a dummy user) at the time of checking, the method `has_group` generate an error from line [2] because `self(user)` is required. In the previous version, the `has_group` method did not require self, but after a code refactor with https://github.com/odoo/odoo/commit/cb31d4352c741a5f8a927a65debb8e027e87df22#diff-16e37db365c1ea1f2e6c79aeb60c80f68f1a5c75970e8e3f198eb18af56278ddL1037-L1043, it needed a record in self. This commit will fix the above issue by allowing cookie when its type is required or the request environment has user. [1]- https://github.com/odoo/odoo/blob/871d20d8ffb00737fe8192223385cdad69fe12e1/addons/utm/models/ir_http.py#L21 [2]- https://github.com/odoo/odoo/blob/871d20d8ffb00737fe8192223385cdad69fe12e1/odoo/addons/base/models/res_users.py#L1133 sentry-5281961509 Forward-Port-Of: odoo/odoo#184733
Steps to reproduce: - Switch to 'FR company' > New employee > New contract (Use defaults) - Payroll app > Payslips > All Payslips - New Payslip for your employee using a french structure (like 'cadre') - Compute sheet > Salary computation tab - (Maybe set 'Salary Journal' in Configuration > Structures if needed) Salary rule codes were translated leading to confusion in the fields to fetch when computing payroll sheets. opw-4240326 Forward-Port-Of: odoo/enterprise#72872
Original PR description
Steps to reproduce: - Switch to 'FR company' > New employee > New contract (Use defaults) - Payroll app > Payslips > All Payslips - New Payslip for your employee using a french structure (like 'cadre') - Compute sheet > Salary computation tab - (Maybe set 'Salary Journal' in Configuration > Structures if needed) Salary rule codes were translated leading to confusion in the fields to fetch when computing payroll sheets. opw-4240326 Forward-Port-Of: odoo/enterprise#72872
Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
Original PR description
Purpose ======= If there is already a user for a given employee (including a trigram for instance), we should avoid erasing it to the value the employee encodes on the salary configurator. Forward-Port-Of: odoo/enterprise#72799
It was previously already done in commit 148810637bf9e7a9cc53338f665ec612221a1ba2 . But in the meantime new modules were added or the 'countries' info were added back to the manifest. Currently the auto_install does not work correctly. E.g. installing `account_reports` and then `l10n_lv` does not automatically install `l10n_lv_reports` (which it should). After this commit the auto_install works again. Forward-Port-Of: odoo/enterprise#72299 on this FW-port, "added": l10n_tr_repor
Original PR description
It was previously already done in commit 148810637bf9e7a9cc53338f665ec612221a1ba2 . But in the meantime new modules were added or the 'countries' info were added back to the manifest. Currently the auto_install does not work correctly. E.g. installing `account_reports` and then `l10n_lv` does not automatically install `l10n_lv_reports` (which it should). After this commit the auto_install works again. Forward-Port-Of: odoo/enterprise#72299 on this FW-port, "added": l10n_tr_reports l10n_tr_hr_payroll_account additional commit reomving an unnecessary invisible field (to get rid of a runbot error)
As Debian wants to remove pypdf2 and keep only pypdf (4.3) in trixie, so we need to be compatible otherwise Odoo could not be released in the next Debian. Forward-Port-Of: odoo/enterprise#72538 Forward-Port-Of: odoo/enterprise#71676
Original PR description
As Debian wants to remove pypdf2 and keep only pypdf (4.3) in trixie, so we need to be compatible otherwise Odoo could not be released in the next Debian. Forward-Port-Of: odoo/enterprise#72538 Forward-Port-Of: odoo/enterprise#71676
This pr is created to help de user to know the origin of the afip error 10016. The error 10016 can be caused by different origins, so here we give the user more precision about the origin. The objective of this pr is to be able to differentiate what is the origin of error 10016 and to be able to give a more precise message to the client. 1) If the last afip invoice validated has a higher date than the date of the invoice that is being validated then the message shown to the user is '10016-
Original PR description
This pr is created to help de user to know the origin of the afip error 10016. The error 10016 can be caused by different origins, so here we give the user more precision about the origin. The…
This pr is created to help de user to know the origin of the afip error 10016.
The error 10016 can be caused by different origins, so here we give the user more precision about the origin. The objective of this pr is to be able to differentiate what is the origin of error 10016 and to be able to give a more precise message to the client.
1) If the last afip invoice validated has a higher date than the date of the invoice that is being validated then the message shown to the user is '10016-1': 'The invoice date cannot be after the last invoice validated in AFIP.'
2) If the last afip invoice number is higher than the current invoice number being validated in Odoo, then the message shown to the user is '10016-2': 'There may have been a mismatch in the numbering of this type of document between Odoo and AFIP.'
3) If any other reason cause the error '10016' then the message shown to the user is:
* Please note that if you are trying to validate an invoice with a date other than today, you must verify if it falls within the date range according to the AFIP concept or document type:
a) If it is Product: N+5 or N-5 with N being today's date.
b) If it is Services or Products and services: N+10 or N-10 with N being today's date.
c) If it is a MiPyme Invoice: N-5 0 N+1 with N being today's date. For Debit Note or Credit Note only N-5"
Task Adhoc side: 37771
Task latam side: 1194
This pr replaces https://github.com/odoo/enterprise/pull/65675
Forward-Port-Of: odoo/enterprise#72733
Forward-Port-Of: odoo/enterprise#72656When this report contained too many lines (~6000), the browser couldn't handle the load and did not manage to render it. This is a known case, which normally only happens with line expansion, for which the prefix groups and load more features have been made. In this case, though, it's a bit different, as those lines are directly at the root of the report (they don't come from a line expansion). We make the choice here to use the load_more_limit anyway as a means to put a limit to the number of l
Original PR description
When this report contained too many lines (~6000), the browser couldn't handle the load and did not manage to render it. This is a known case, which normally only happens with line expansion, for…
When this report contained too many lines (~6000), the browser couldn't handle the load and did not manage to render it. This is a known case, which normally only happens with line expansion, for which the prefix groups and load more features have been made. In this case, though, it's a bit different, as those lines are directly at the root of the report (they don't come from a line expansion). We make the choice here to use the load_more_limit anyway as a means to put a limit to the number of lines that are shown. When this limit is reached, we just don't display the exceeding lines, and replace them by a summary line. To avoid confusion, a warning is now shown on top of the report when some lines need to be hidden. Since such a warning requires a module update (because it's a template, and needs to exist in db), we only apply our new trimming mechanism if the warning template exists (and can hence be displayed). This way, we won't change the behavior on existing databases without being sure the user is properly notified. Plus, thanks to that, we're sure the old load_more_limit value (originally 80 by default) set on the VAT Book will have been increased to a value fitting our use case more, so we won't bother people with excessive trimming. Original fix suggestion raised here by Adhoc: https://github.com/odoo/enterprise/pull/45936 Forward-Port-Of: odoo/enterprise#72727 Forward-Port-Of: odoo/enterprise#72096
To reproduce: 1) Activate storno accounting in the settings 2) Create a new partner 3) Create a Vendor Credit Note for that partner, post it 4) Register a full payment for the credit note 5) Open the Aged Payable report ====> The partner appears in the report, even though it has an amount of 0. It shouldn't, since there is no open amount for it. This was due to the way we checked the amount of the credit note was zero. In storno, the payable line of the refund is a negative credit inst
Original PR description
To reproduce: 1) Activate storno accounting in the settings 2) Create a new partner 3) Create a Vendor Credit Note for that partner, post it 4) Register a full payment for the credit note 5) Open the Aged Payable report ====> The partner appears in the report, even though it has an amount of 0. It shouldn't, since there is no open amount for it. This was due to the way we checked the amount of the credit note was zero. In storno, the payable line of the refund is a negative credit instead of being a debit. Still, it's linked through the debit_move_id field to the partial reconcile. So, removing the debit from the debit or credit from the credit wasn't enough in that setup. opw-4166891 Forward-Port-Of: odoo/enterprise#72642 Forward-Port-Of: odoo/enterprise#72422
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to: - Make it a variant of the Generic BS - Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplica
Original PR description
To reproduce the issue: 1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the…
To reproduce the issue:
1) Set a prefix group threshold of 2000 on the Generic Balance Sheet 2) Modify the groupby of the Receivable line of that report so that it does account_id,id 3) Duplicate the report ; modify the duplicate to:
- Make it a variant of the Generic BS
- Set its prefix group threshold to 3 4) Ensure at least 3 move lines exist in the same period for the Receivable account 5) Open the Balance Sheet. By default, the Generic one will be shown 6) Switch to the duplicate you made in 3).
7) Unfold both levels of the Receivable line.
====> Prefix groups aren't used, while the number of move lines reaches the threshold value.
This happens because the variant is opened from the Generic BS. So, options have first been generated and kept in the session for the Generic BS. When openin the variant, it receives the previously generated options as previous_options, and restores the threshold originally defined on the Generic BS.
We don't want to restore the threshold for previous options, so we just remove that code and now always initialize it to the value contained in the apporpriate field when computing the options.
Forward-Port-Of: odoo/enterprise#72822Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will
Original PR description
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without…
Before this commit: - Creating a GST return period with a quarterly periodicity without selecting a quarter will raise a traceback. - Creating a GST return period with a monthly periodicity without selecting a month will raise a traceback. Reason: - While calculating the start_date and end_date of the quarterly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.month), year=int(record.year))` If there is no month, then int(record.month) will return 0 and The month should be between 1 and 12, so it will raise an error. - While calculating the start_date and end_date of the monthly return period: `period_start = fields.Date.context_today(self).replace(day=1, month=int(record.quarter), year=int(record.year))` If there is no quarter, then int(record.quarter) will return 0 and The month should be between 1 and 12, so it will raise an error. After this commit: - The start_date and end_date will not be calculated if a month or quarter is not defined for the monthly or quarterly return periods. Traceback - https://pastebin.com/LyKUDrH5 Task-4243468 Forward-Port-Of: odoo/enterprise#72815 Forward-Port-Of: odoo/enterprise#71883
Steps ----- 1. Create a deduplication rule for a model with a non-stored company field (e.g. Document). Add a field to the deduplication rules. 2. Run the "Data Merge: Find Duplicate Records" scheduled action. ** ValueError: <class 'psycopg2.errors.UndefinedColumn'>: "column documents_document.company_id does not exist ** Change ----- Handle the case where the company field of the model is not stored but still accessible through its related field in another table. opw-4114062 Forward
Original PR description
Steps ----- 1. Create a deduplication rule for a model with a non-stored company field (e.g. Document). Add a field to the deduplication rules. 2. Run the "Data Merge: Find Duplicate Records" scheduled action. ** ValueError: <class 'psycopg2.errors.UndefinedColumn'>: "column documents_document.company_id does not exist ** Change ----- Handle the case where the company field of the model is not stored but still accessible through its related field in another table. opw-4114062 Forward-Port-Of: odoo/enterprise#72368 Forward-Port-Of: odoo/enterprise#68816
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward
Original PR description
**Steps to reproduce:** - Install l10n_mx_reports - Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE) - Go to "Accounting / Reporting / Audit Reports / Trial Balance" - Download "COA SAT (XML)" - Validate the xml on an online SAT document validator (e.g. https://ceportalvalidacionprod.clouda.sat.gob.mx/) **Issue:** The validation fails because "Sello" attribute is invalid. **Cause:** A wrong XSLT is used to generate the digital stamp for COA SAT (XML). opw-4209089 Forward-Port-Of: odoo/enterprise#72882
Before this commit currently when creating a new app using Studio the previous button icon in the navbar appears in the wrong direction After this commit The previous button icon should appear in the right direction Task - 3845561 Forward-Port-Of: odoo/enterprise#72674 Forward-Port-Of: odoo/enterprise#61835
Original PR description
Before this commit currently when creating a new app using Studio the previous button icon in the navbar appears in the wrong direction After this commit The previous button icon should appear in the right direction Task - 3845561 Forward-Port-Of: odoo/enterprise#72674 Forward-Port-Of: odoo/enterprise#61835
This commit aims to fix an issue in the sanitize_communication function and move its logic to the account_batch_payment module to improve reusability and testability. The function trims the communication text after removing the '/' characters. However, if the communication text contains '/' and is truncated, the '/' could end up at the end of the string (see tests for more examples). The solution is to remove the '/' after truncating the text. Additionally, the sanitize_communication funct
Original PR description
This commit aims to fix an issue in the sanitize_communication function and move its logic to the account_batch_payment module to improve reusability and testability. The function trims the communication text after removing the '/' characters. However, if the communication text contains '/' and is truncated, the '/' could end up at the end of the string (see tests for more examples). The solution is to remove the '/' after truncating the text. Additionally, the sanitize_communication function has been moved to the account_batch_payment module, since this module is a dependency for both account_sepa and account_sepa_direct_debit, these two modules can now use it as well. The functions sanitize_communication and _sanitize_communication have been marked as deprecated and will be removed in the master branch. opw-4220421 Forward-Port-Of: odoo/enterprise#72493 Forward-Port-Of: odoo/enterprise#71552
Steps to reproduce: 1. Go to documents on mobile 2. Click on doc thumbnail 3. The inspector open where preview should open When the preview is open, click on an arrow to see the previous or the next doc 1. The inspector opens again where the previous or next should Technical Reason: In 'documents_inspector.js' file, a condition set only open the inspector if there is only one selected element, so every time it get executed and opens the inspector. After this commit: 1. Click on a
Original PR description
Steps to reproduce: 1. Go to documents on mobile 2. Click on doc thumbnail 3. The inspector open where preview should open When the preview is open, click on an arrow to see the previous or the next doc 1. The inspector opens again where the previous or next should Technical Reason: In 'documents_inspector.js' file, a condition set only open the inspector if there is only one selected element, so every time it get executed and opens the inspector. After this commit: 1. Click on a doc thumbnail, the preview will open. 2. When the preview is open, click on an arrow to see the previous or the next doc will not open the inspector. Task-3919285 Forward-Port-Of: odoo/enterprise#72677 Forward-Port-Of: odoo/enterprise#62957
Fixed onboarding document tours which is not working properly. Task-4210376 Forward-Port-Of: odoo/enterprise#70900
Original PR description
Fixed onboarding document tours which is not working properly. Task-4210376 Forward-Port-Of: odoo/enterprise#70900