Skip to content

Commit

Permalink
[IMP] sale_order_line_price_history: Add discount to the history
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernesto Tejeda authored and Yadier-Tecnativa committed Apr 27, 2023
1 parent d6e90f5 commit bd55f26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class SaleOrderLinePriceHistoryline(models.TransientModel):
price_unit = fields.Float(
related="sale_order_line_id.price_unit",
)
discount = fields.Float(
related="sale_order_line_id.discount",
)

@api.multi
def action_set_price(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
<field name="sale_order_date_order"/>
<field name="product_uom_qty"/>
<field name="price_unit"/>
<label for="discount" groups="sale.group_discount_per_so_line"/>
<div name="discount" groups="sale.group_discount_per_so_line">
<field name="discount" class="oe_inline"/> %%
</div>
</group>
</form>
<tree>
Expand All @@ -39,6 +43,7 @@
<field name="sale_order_date_order"/>
<field name="product_uom_qty"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
</tree>
</field>
</group>
Expand Down

0 comments on commit bd55f26

Please sign in to comment.