Friday, April 12, 2024
3 changes · saas-17.1
Resolved issues and error corrections
Point of sale receipts now keep long company headers and email addresses centered, making printed or emailed receipts look more professional. Receipt details such as units of measure and payment methods now appear in the customer's selected language, improving consistency for non-English users.
Original PR description
Description of the issue/feature this PR addresses: In the Point Of Sale app, when a receipt is created and the header or the email is long, the text is not centered. Moreover, the Unit Of Measure text of the receipt is not translated as well as the mean of payment. Current behavior before PR: Long header and email => text is **not** centered Unit Of Measure text is not translated Mean of payment text is not translated Desired behavior after PR is merged: Long and short header and email => text is centered Unit Of Measure text is translated Mean of payment text is translated opw-3822694 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where settling a customer's outstanding balance from a Point of Sale session did not update the due amount shown on the customer record. This ensures payments made through POS are correctly reflected in accounting and customer balances after the session closes.
Original PR description
Currently, when trying to settle due accounts though the PoS session, the due balance doesn't change on the customer form. Steps to reproduce: ------------------- * Install **Point of Sale** and…
Currently, when trying to settle due accounts though the PoS session, the due balance doesn't change on the customer form.
Steps to reproduce:
-------------------
* Install **Point of Sale** and **Accounting**
* Go to the **Point of Sale** App
* Open a shop session
* Navigate to a customer with a due ammount and select **Details**
* Select **Settle due accounts**
* Select any payment method
* Validate
* Close session
* Under **Orders** select **Customers**
* Select the customer for which you just settled the due accounts
> Observation: The due amount hasn't changed.
Why the fix:
------------
The following commit introduced a new relational system to be able to access data within the PoS frontend in the same way as it is done within the ORM in python: https://github.com/odoo/enterprise/commit/bb06fdead097bdec1582e3cdecb99fa63c2ff799
This commit modified the definition of `paylaterPaymentMethod`. Before the commit, it was defined as: https://github.com/odoo/enterprise/blob/4a5bb11bd59dd76f2df957225bf25d38ad5beb0c/pos_settle_due/static/src/overrides/components/payment_screen/payment_screen.js#L23-L26 and would return `{id: 3, name: 'Customer Account', is_cash_count: false, use_payment_terminal: false, split_transactions: true, …}`
Now it is defined as
https://github.com/odoo/enterprise/blob/daf09109a209f87e4f2fbb3275f55095e48d8b4d/pos_settle_due/static/src/overrides/components/payment_screen/payment_screen.js#L23-L26 and returns `undefined`.
We also notice a change in the value of `this.pos.config.payment_method_ids`. Where it previously returned
```js
Proxy(Array) {0: 1, 1: 2, 2: 3}
[[Handler]]: Object
[[Target]]: Array(3)
0: 1
1: 2
2: 3
length: 3
[[Prototype]]: Array(0)
[[IsRevoked]]: false
```
It now returns
```js
Proxy(Array) {0: Base, 1: Base, 2: Base}
[[Handler]]: Object
[[Target]]: Array(3)
0: Base {models: {…}, records: Proxy(Object), model: {…}, _raw: {…}, id: 1, …}
1: Base {models: {…}, records: Proxy(Object), model: {…}, _raw: {…}, id: 2, …}
2: Base {models: {…}, records: Proxy(Object), model: {…}, _raw: {…}, id: 3, …}
length: 3
[[Prototype]]: Array(0)
[[IsRevoked]]: false
```
Thus we need to use `.some()` to retreive the id.
opw-3802560This update resolves an issue where changes to how IDs are stored in the Analytic Accounting module caused errors in features like project accounting and vendor bills. The fix ensures that the system correctly identifies and processes analytic accounts, preventing disruptions to financial reporting.
Original PR description
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill…
### Steps to reproduce issue: 1. Have Sales installed 2. Enable Analytic Accounting and create two Projects 3. Go into both Project Settings and add distinct Analytic Accounts 4. Create a Vendor Bill 5. Add a Product Line and put both accounts in the Analytic Distribution 6. Add an account in another column to one of the existing Analytic Distribution Lines 7. Go to Projects and open the Project Updates of the Project whose account was alone in the Analytic Distribution Line 8. You get the error: > invalid literal for int() with base 10: '[int],[int]' ### Explanation: With commit odoo@dc696c8ed4850a83b6af721002a90f2944891923, the way IDs are stored changed. They are now computed in a csv string. A part of the Analytic Accounting pipeline didn't get updated after that change, making a lot of the features not working properly. ### Suggested fix: - We must take into account the multiple analytic plans in any order possible in the ID search. - Because the amount of `account.move.line` can increase rapidly, the new ID search must be indexable. - We reworked the counting query to avoid `account.move` being counted multiple times. opw-3626619 Forward-Port-Of: odoo/odoo#147664