Add search on supplier on product search view

Move margin fields to sale order line form view (instead of tree view)
This commit is contained in:
Alexis de Lattre
2018-07-06 19:33:35 +02:00
parent 52eff801b6
commit e9049570ee
2 changed files with 11 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ class SaleOrderLine(models.Model):
string='Margin in Company Currency', readonly=True, store=True, string='Margin in Company Currency', readonly=True, store=True,
compute='_compute_margin', currency_field='company_currency_id') compute='_compute_margin', currency_field='company_currency_id')
margin_rate = fields.Float( margin_rate = fields.Float(
string="Margin (%)", readonly=True, store=True, string="Margin Rate", readonly=True, store=True,
compute='_compute_margin', compute='_compute_margin',
digits=(16, 2), help="Margin rate in percentage of the sale price") digits=(16, 2), help="Margin rate in percentage of the sale price")

View File

@@ -20,13 +20,17 @@
groups="account.group_account_user"/> groups="account.group_account_user"/>
<field name="company_currency_id" invisible="1"/> <field name="company_currency_id" invisible="1"/>
</field> </field>
<xpath expr="//field[@name='order_line']/tree/field[@name='price_subtotal']" position="after"> <xpath expr="//field[@name='order_line']/form//field[@name='analytic_tag_ids']/.." position="after">
<field name="standard_price_sale_currency" groups="base.group_no_one" string="Cost Price Sale Cur."/> <field name="standard_price_sale_currency" groups="base.group_no_one"/>
<field name="standard_price_company_currency" groups="base.group_no_one" string="Cost Price Comp. Cur."/> <field name="standard_price_company_currency" groups="base.group_no_one"/>
<field name="margin_sale_currency" groups="base.group_no_one" string="Margin Sale Cur."/> <field name="margin_sale_currency" groups="base.group_no_one"/>
<field name="margin_company_currency" groups="base.group_no_one" string="Margin Comp. Cur."/> <field name="margin_company_currency" groups="base.group_no_one"/>
<field name="margin_rate" groups="base.group_no_one"/> <label for="margin_rate"/>
<div name="margin_rate">
<field name="margin_rate" groups="base.group_no_one" class="oe_inline"/> %
</div>
<field name="company_currency_id" invisible="1"/> <field name="company_currency_id" invisible="1"/>
<field name="currency_id" invisible="1"/>
</xpath> </xpath>
</field> </field>
</record> </record>