Thursday, September 19, 2024
11 changes · saas-17.4
Resolved issues and error corrections
Creating a new event ticket will no longer automatically mark its related product as sellable in Point of Sale. This prevents unexpected products from appearing in active POS sessions when events are created, reducing confusion for cashiers and sales teams.
Original PR description
When you create a new event ticket, it'll automatically set the related products to "sellable in pos", this leads to add new products in POS that are runnig when anybody creates an event. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes invoice setup so French customers with a VAT number are assigned the intended domestic fiscal position when appropriate. It prevents the system from choosing a lower-priority intra-EU setting, helping ensure taxes and accounting rules are applied correctly.
Original PR description
### Steps to reproduce the issue: 1. Install French Localization and use the FR company 2. Add a Contact located in France with a VAT number 3. Create an Invoice and select the Contact as Customer 4. The Fiscal Position under the Other Info tab is "Intra-EU B2B" instead of "Domestic - France" ### Explanation: In `_get_fiscal_position`, the rankings are done to give priority to the highest sequence due to the `max` method when fiscal positions are equal in every other ranking. https://github.com/odoo/odoo/blob/c7e90ff39b7e47312d475d8c2dd26263cb6d1b4a/addons/account/models/partner.py#L269-L280 ### Fix reasoning: Returning their opposite to give priority to the lowest sequence without adapting every other condition for the use of `min`. opw-4150262 opw-4154081 opw-4182825 opw-4186137
This fix ensures the default anonymous final consumer customer is always available when opening an Argentine POS session. It prevents errors when starting the POS or creating sales orders, improving reliability for stores using Argentina localization.
Original PR description
Before this commit, when loading a POs session, the default "consumido final anonimo" might not get loaded. This leads to errors either when opening the session or when attempting to create POs orders. This commit ensures the defult partner is loaded in the POS at all times. related PRs (fix from PEBR): https://github.com/odoo/enterprise/pull/65296 https://github.com/odoo/enterprise/pull/70251 opw-4188710 opw-4178688
The Peru Point of Sale setup now reliably loads the default anonymous end customer when a session starts. This prevents errors when opening POS sessions or creating sales orders, helping cashiers complete transactions without interruption.
Original PR description
Before this commit, when loading a POs session, the default "consumidor final anonimo" might not get loaded. This leads to errors either when opening the session or when attempting to create POs orders. This commit ensures the default partner is loaded in the POS at all times. related PRs (fix from PEBR): https://github.com/odoo/enterprise/pull/65296 https://github.com/odoo/enterprise/pull/70251 https://github.com/odoo/odoo/pull/180645 opw-4178199
Image attachments in Mail now show action controls in a dropdown when space is limited or multiple actions are available. This makes it easier for users, especially on mobile, to preview or delete small images without controls getting in the way.
Original PR description
On small images, the actions to delete image is barely usable. In mobile, these actions are always shown, so they could even prevent clicking on attachment to view in dialog. Also on big a image the 2 actions are far away, which is can be exhausting. This commit fixes the issue by using a dropdown when there is more than 1 action or when the image is considered very small. Images visual is at most 75px width and height, so smaller images now show a background, which ensures image actions and clicking on image for preview are both reachable with ease. <img width="522" alt="Screenshot 2024-09-18 at 20 50 44" src="https://github.com/user-attachments/assets/0ddb65b5-29f5-4e01-9d2f-db32b74e70fd">
On mobile, selecting certain activity groups now closes the activity popup as expected. This prevents the popup from covering the newly opened leads or calendar activities, making mobile navigation clearer and less frustrating.
Original PR description
Previous solution didn't work on mobile: document.body.click(); // hack to close dropdown Reproduce --- - -i mail,crm,helpdesk - On mobile: Click on "Activities" (fa-clock-o): - Selecting "Helpdesk Ticket" -> OK - Selecting "Lead/Opportunity" -> BUG - Selecting "Calendar activity" -> BUG (it opens the leads with activities, but it doesn't close the Activity popover, so user can't see it) opw-4171180
Restaurant orders paid on one device are now prevented from being paid again from another device that still shows an outdated draft. This avoids cashier confusion and keeps payment records consistent across devices.
Original PR description
### Steps to reproduce 1. Open restaurant in one device. Make order on table 1, don't pay and go back to floor screen. There is now one draft order in table 1. 2. Open the same config as in Step 1 in another device. Open table 1 to see the order. Pay and validate the order. 3. Check the first device and open table 1, the order is still there, can be manipulated and be paid. However, it doesn't sync to the server. ### Investigation - `tableSyncing` leads to skipping the draft order in the original session in https://github.com/odoo/odoo/blob/511005f3c6c6bf32198e4fec3190f0fa42fc3c3e/addons/pos_restaurant/static/src/overrides/models/pos_store.js#L227-L229 task-4110381
Opening or resuming an Ecuadorian point-of-sale session now reliably loads the default final consumer record. This prevents session loading errors and helps cashiers start or continue sales without interruption.
Original PR description
before this commit, when opening/resuming a POS session, the final_consumer was not always loaded, leading to loading errors. This commit ensures that the final_consumer gets loaded when opening the POS session. related PR: https://github.com/odoo/enterprise/pull/65296 opw-4171779
This change prevents budget calculations from generating an invalid database query when certain budget filters are empty during an upgrade. It helps ensure upgrades complete successfully and budget information remains accessible without manual intervention.
Original PR description
During upgrade this issue raises. when there is no value for account_ids and fnames pod_condition because null and all_conditions condition also become null so need to set `sql(FALSE)` if there is no…
During upgrade this issue raises.
when there is no value for account_ids and fnames
pod_condition because null and
all_conditions condition also become null
so need to set `sql(FALSE)` if there is no fnames
this is the query where problem occure
during parsing
```
WITH purchase_order_data AS (SELECT (pol.product_qty - pol.qty_invoiced) / po.currency_rate * pol.price_unit::FLOAT * (a.rate)::FLOAT AS committed,
0 AS achieved,
"a"."account_id", "a"."x_plan3_id", "a"."x_plan4_id", "a"."x_plan5_id"
FROM purchase_order_line pol
JOIN purchase_order po ON pol.order_id = po.id
CROSS JOIN JSONB_TO_RECORDSET(pol.analytic_json) AS a(rate FLOAT, "account_id" INT, "x_plan3_id" INT, "x_plan4_id" INT, "x_plan5_id" INT)
WHERE po.date_order >= '2024-09-01'::date
AND po.date_order <= '2024-09-30'::date
AND pol.qty_invoiced < pol.product_qty
AND po.company_id = 1
AND po.state in ('purchase', 'done')
AND
),
account_analytic_line_data AS (
SELECT 0 AS committed,
aal.amount AS achieved,
"aal"."account_id", "aal"."x_plan3_id", "aal"."x_plan4_id", "aal"."x_plan5_id"
FROM account_analytic_line aal
WHERE aal.date >= '2024-01-01'::date
AND aal.date <= '2024-01-31'::date
AND aal.company_id = 1
AND
AND aal.category in ('vendor_bill')
```
```
File "/home/odoo/src/enterprise/saas-17.4/account_budget/models/budget_line.py", line 136, in _compute_all
self.env.cr.execute(SQL(
File "/home/odoo/src/odoo/saas-17.4/odoo/sql_db.py", line 564, in execute
return self._cursor.execute(*args, **kwargs)
File "/home/odoo/src/odoo/saas-17.4/odoo/sql_db.py", line 347, in execute
res = self._obj.execute(query, params)
psycopg2.errors.SyntaxError: syntax error at or near ")"
LINE 14: ),
```This fix prevents an incorrect error when connecting an online bank account to a journal that has no currency set but already contains transactions in the same currency. In that valid case, Odoo now automatically sets the journal currency to match the online account, allowing the connection to proceed smoothly.
Original PR description
Commit https://github.com/odoo/enterprise/commit/a47e68a18fa478341efe21d82fa7f0e3e86e4c2c added an user error when trying to connect a bank journal with an online account that does not share the same currency, if there are already some moves created in that journal. The field currency_id being not required on the journal model, this error would also trigger when the currency_id was not set on the journal, but it contained only moves of the same currency as the account that we are trying to connect. An additionnal condition was added to the check, being that the journal has no currency set but the moves in that journal all use the same currency than the online account. If this is the case, the currency of the journal is set to the one from the online account. opw-[4177736](https://www.odoo.com/odoo/49/tasks/4177736)
Colombian electronic invoicing journals can now retrieve key authorization and numbering details directly from DIAN. This helps keep invoice sequence information accurate and notifies users when values are changed.
Original PR description
Use GetNumberingRange to fetch the journal values: * l10n_co_edi_dian_authorization_number * l10n_co_edi_dian_authorization_date * l10n_co_edi_dian_authorization_end_date * l10n_co_edi_min_range_number * l10n_co_edi_max_range_number * code * l10n_co_dian_technical_key Log a message in the chatter if some fields are updated. NB: the views needed to be adapted compared to the subsequent version: the fields are enclosed in a group and the button is added before this group. But users may not have the latest version of `l10n_co_edi` when they install `l10n_co_dian`. Hence, the xpath in the `l10n_co_dian` module is flexible enough to avoid any traceback, instead, the button will appear in the wrong group in the "Advanced Settings" page, and one can simply upgrade `l10n_co_edi` to put the button to be at the right place. task-4133688 partial backport of https://github.com/odoo/enterprise/pull/70171