Browse Source

[FIX] b_product: Show same field on product.template and product.product

Previously special fields for the product template where only added on
the product template form view only. But these fields should be
available also on the product product form view. So I moved fields that
were easy to move from template view only to the product template view
that is used for product template and product product.
pull/120/head
Rémy Taymans 5 years ago
parent
commit
516e3e9024
  1. 59
      beesdoo_product/views/beesdoo_product.xml

59
beesdoo_product/views/beesdoo_product.xml

@ -1,32 +1,44 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record model="ir.ui.view" id="beesdoo_product_form">
<field name="name">bees.product.template.form</field>
<record model="ir.ui.view" id="beesdoo_product_template_only_form">
<field name="name">bees.product.template.only.form</field>
<field name="model">product.template</field> <field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view" /> <field name="inherit_id" ref="product.product_template_only_form_view" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="barcode" position="after"> <field name="barcode" position="after">
<button string="Generate Barcode" name="generate_barcode" type="object" colspan="2" attrs="{'invisible' : [('barcode','!=',False)]}" /> /> <button string="Generate Barcode" name="generate_barcode" type="object" colspan="2" attrs="{'invisible' : [('barcode','!=',False)]}" /> />
</field> </field>
<field name="list_price" position="after">
<field name="suggested_price" widget='monetary' options="{'currency_field': 'currency_id'}" />
</field>
<!-- Added in sale.product_template_form_view_invoice_policy -->
<field name="invoice_policy" position="attributes"> <field name="invoice_policy" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</field> </field>
<!-- Added in purchase.view_product_supplier_inherit -->
<field name="purchase_method" position="attributes"> <field name="purchase_method" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</field> </field>
<!-- Added in stock.view_template_property_form -->
<field name="route_ids" position="attributes"> <field name="route_ids" position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</field> </field>
<group name="sale_condition" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<!-- Added in purchase.product_template_form_view -->
<field name="property_account_creditor_price_difference" <field name="property_account_creditor_price_difference"
position="attributes"> position="attributes">
<attribute name="invisible">1</attribute> <attribute name="invisible">1</attribute>
</field> </field>
</field>
</record>
<record model="ir.ui.view" id="beesdoo_product_template_form">
<field name="name">bees.product.template.form</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view" />
<field name="arch" type="xml">
<field name="list_price" position="after">
<field name="suggested_price" widget='monetary' options="{'currency_field': 'currency_id'}" />
</field>
<group name="sale_condition" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<xpath expr="//group[@name='inventory']/.." position="after"> <xpath expr="//group[@name='inventory']/.." position="after">
<page string="Label"> <page string="Label">
<group> <group>
@ -72,37 +84,6 @@
</field> </field>
</record> </record>
<record model="ir.ui.view" id="beesdoo_product_product_form">
<field name="name">bees.product.product.form</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<xpath expr="//group[@name='inventory']/.." position="after">
<page string="Label">
<group>
<group name="label">
<field name="total_with_vat"/>
<field name="display_weight"/>
<field name="display_unit"/>
<field name="default_reference_unit"/>
<field name="total_with_vat_by_unit" />
<field name="total_deposit" />
</group>
<group>
<field name="main_seller_id"/>
<field name="eco_label"/>
<field name="local_label"/>
<field name="fair_label"/>
<field name="origin_label"/>
<field name="label_to_be_printed"/>
<field name="label_last_printed"/>
</group>
</group>
</page>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="beesdoo_product_label_form"> <record model="ir.ui.view" id="beesdoo_product_label_form">
<field name="name">bees.product.label.form</field> <field name="name">bees.product.label.form</field>
<field name="model">beesdoo.product.label</field> <field name="model">beesdoo.product.label</field>

Loading…
Cancel
Save