Anh Thao Pham (pta) ff58ff20ab [FIX] account: fix totals computation
Steps to reproduce:
- Install Invoicing
- Create a product with $0 cost (e.g. Product X)
- Create a vendor bill:
  * Vendor: [any]
  * Invoice Lines:
    - Product: [none]
    - Label: [anything]
    - Price: [any]
    - Taxes: [any]
=> The displayed "Untaxed Amount", "Taxes" and "Total" are correct
- Save the vendor bill
- Edit the invoice line of the bill
- Add Product X
=> "Untaxed Amount", "Taxes" and "Total" are correctly set to 0 as expected
- Change Price to 100 manually

Issue:
"Untaxed Amount", "Taxes" and "Total" stay at $0.
Upon save, "Untaxed Amount" is correctly set to $100, but "Taxes" stays at $0.
If "Units of Measure" option is activated in the Settings (available with Sales,
Purchase or Inventory app), the user will be in "uom.group_uom" and the issue will
not happen.

Cause:
When the user isn't in "uom.group_uom" group, "product_uom_id" field is
declared after "price_unit" field in the view.
Due to that, adding a product in the invoice line and changing the price to $100,
will first set "price_unit" to $100 and then set "product_uom_id" that will trigger
"_compute_price_unit" method where "price_unit" is recomputed to $0 (its cost).

Solution:
Move "product_uom_id" field before "price_unit" field in the view as it is the case
when the user is in "uom.group_uom" group.

opw-3750740

closes odoo/odoo#156447

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2024-04-02 15:40:22 +00:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%