mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] account_invoice_margin: show margin and margin % in the same line
This commit is contained in:
@@ -5,7 +5,7 @@ class AccountMoveLine(models.Model):
|
|||||||
_inherit = "account.move.line"
|
_inherit = "account.move.line"
|
||||||
|
|
||||||
margin = fields.Monetary(compute='_compute_product_margin', digits='Product Price', store=True,
|
margin = fields.Monetary(compute='_compute_product_margin', digits='Product Price', store=True,
|
||||||
groups='base.group_user')
|
string='Margin', groups='base.group_user')
|
||||||
margin_percent = fields.Float(compute='_compute_product_margin', store=True, string='Margin (%)',
|
margin_percent = fields.Float(compute='_compute_product_margin', store=True, string='Margin (%)',
|
||||||
groups='base.group_user')
|
groups='base.group_user')
|
||||||
purchase_price = fields.Monetary(string='Cost', digits='Product Price',
|
purchase_price = fields.Monetary(string='Cost', digits='Product Price',
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
<field name="inherit_id" ref="account.view_move_form"/>
|
<field name="inherit_id" ref="account.view_move_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='amount_residual']" position="after">
|
<xpath expr="//field[@name='amount_residual']" position="after">
|
||||||
<field name="margin" groups="base.group_user"/>
|
<span class="oe_inline oe_right" groups="base.group_user" colspan="2">
|
||||||
<span class="oe_inline" groups="base.group_user">
|
<span>Margin:</span>
|
||||||
|
<field name="margin" class="oe_inline"/>
|
||||||
(<field name="margin_percent" nolabel="1" class="oe_inline" widget="percentage"/>)
|
(<field name="margin_percent" nolabel="1" class="oe_inline" widget="percentage"/>)
|
||||||
</span>
|
</span>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
Reference in New Issue
Block a user