[FIX] point_of_sale: remove monetary widget of discount field
Considering the field declaration: https://github.com/odoo/odoo/blob/fe5deb4ee4c8e07aed2f2cff6210271bfaa61476/addons/point_of_sale/models/pos_order.py#L1121 `discount` is a rate, not an amount. Therefore, suppose a discount of 10%, when opening a POS-generated SO, the discount shouldn't be "$10". OPW-2629493 closes odoo/odoo#76010 X-original-commit: 225fb81cc0e7d44678f2b53a9722f5dbd28a9bf6 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com> Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
<field name="total_cost" attrs="{'invisible': [('is_total_cost_computed','=', False)]}" optional="hide" widget="monetary"/>
|
||||
<field name="margin" attrs="{'invisible': [('is_total_cost_computed','=', False)]}" optional="hide" widget="monetary"/>
|
||||
<field name="margin_percent" attrs="{'invisible': [('is_total_cost_computed','=', False)]}" optional="hide" widget="percentage"/>
|
||||
<field name="discount" string="Disc.%" widget="monetary"/>
|
||||
<field name="discount" string="Disc.%"/>
|
||||
<field name="tax_ids_after_fiscal_position" widget="many2many_tags" string="Taxes"/>
|
||||
<field name="tax_ids" widget="many2many_tags" invisible="1"/>
|
||||
<field name="price_subtotal" widget="monetary" force_save="1"/>
|
||||
@@ -84,7 +84,7 @@
|
||||
<group col="4">
|
||||
<field name="full_product_name"/>
|
||||
<field name="qty"/>
|
||||
<field name="discount" widget="monetary"/>
|
||||
<field name="discount"/>
|
||||
<field name="price_unit" widget="monetary"/>
|
||||
<field name="price_subtotal" invisible="1" widget="monetary" force_save="1"/>
|
||||
<field name="price_subtotal_incl" invisible="1" widget="monetary" force_save="1"/>
|
||||
@@ -306,7 +306,7 @@
|
||||
<tree string="POS Order lines">
|
||||
<field name="product_id" readonly="1"/>
|
||||
<field name="qty" readonly="1" sum="Total qty"/>
|
||||
<field name="discount" readonly="1" widget="monetary"/>
|
||||
<field name="discount" readonly="1"/>
|
||||
<field name="price_unit" readonly="1" widget="monetary"/>
|
||||
<field name="price_subtotal" readonly="1" sum="Sum of subtotals" widget="monetary"/>
|
||||
<field name="price_subtotal_incl" readonly="1" sum="Sum of subtotals" widget="monetary"/>
|
||||
@@ -324,7 +324,7 @@
|
||||
<group col="4">
|
||||
<field name="product_id" />
|
||||
<field name="qty" />
|
||||
<field name="discount" widget="monetary"/>
|
||||
<field name="discount"/>
|
||||
<field name="price_unit" widget="monetary"/>
|
||||
<field name="create_date" />
|
||||
<field name="currency_id"/>
|
||||
|
||||
Reference in New Issue
Block a user