| 1 |
<?xml version="1.0"?> |
| 2 |
<odoo> |
| 3 |
<record id="view_barcode_gs1_nomenclature_form" model="ir.ui.view"> |
| 4 |
<field name="name">Barcode Nomenclatures</field> |
| 5 |
<field name="model">barcode.nomenclature</field> |
| 6 |
<field name="inherit_id" ref="barcodes.view_barcode_nomenclature_form"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<!-- Nomenclature form --> |
| 9 |
<xpath expr="//field[@name='upc_ean_conv']" position="attributes"> |
| 10 |
<attribute name="invisible">is_gs1_nomenclature</attribute> |
| 11 |
</xpath> |
| 12 |
<xpath expr="//group[@name='general_attributes']" position="after"> |
| 13 |
<group name="gs1_attributes" col="4"> |
| 14 |
<field name="is_gs1_nomenclature"/> |
| 15 |
<field name="gs1_separator_fnc1" invisible="not is_gs1_nomenclature"/> |
| 16 |
</group> |
| 17 |
</xpath> |
| 18 |
<!-- Rules table --> |
| 19 |
<xpath expr="//field[@name='rule_ids']" position="attributes"> |
| 20 |
<attribute name="context">{'is_gs1': is_gs1_nomenclature}</attribute> |
| 21 |
</xpath> |
| 22 |
<xpath expr="//field[@name='encoding']" position="attributes"> |
| 23 |
<attribute name="column_invisible">parent.is_gs1_nomenclature</attribute> |
| 24 |
</xpath> |
| 25 |
<xpath expr="//field[@name='pattern']" position="after"> |
| 26 |
<field name="gs1_content_type" column_invisible="not parent.is_gs1_nomenclature"/> |
| 27 |
<field name="gs1_decimal_usage" column_invisible="not parent.is_gs1_nomenclature" invisible="gs1_content_type != 'measure'"/> |
| 28 |
<field name="associated_uom_id" column_invisible="not parent.is_gs1_nomenclature" invisible="gs1_content_type != 'measure'"/> |
| 29 |
</xpath> |
| 30 |
</field> |
| 31 |
</record> |
| 32 |
|
| 33 |
<record id="view_barcode_gs1_nomenclature_tree" model="ir.ui.view"> |
| 34 |
<field name="name">Barcode Nomenclatures</field> |
| 35 |
<field name="model">barcode.nomenclature</field> |
| 36 |
<field name="inherit_id" ref="barcodes.view_barcode_nomenclature_tree"/> |
| 37 |
<field name="arch" type="xml"> |
| 38 |
<xpath expr="//field[@name='name']" position="after"> |
| 39 |
<field name="is_gs1_nomenclature"/> |
| 40 |
</xpath> |
| 41 |
</field> |
| 42 |
</record> |
| 43 |
|
| 44 |
<record id="view_barcode_gs1_rule_form" model="ir.ui.view"> |
| 45 |
<field name="name">Barcode Rule</field> |
| 46 |
<field name="model">barcode.rule</field> |
| 47 |
<field name="inherit_id" ref="barcodes.view_barcode_rule_form"/> |
| 48 |
<field name="arch" type="xml"> |
| 49 |
<xpath expr="//field[@name='encoding']" position="attributes"> |
| 50 |
<attribute name="invisible">parent.is_gs1_nomenclature or type == 'alias'</attribute> |
| 51 |
</xpath> |
| 52 |
<xpath expr="//field[@name='alias']" position="after"> |
| 53 |
<field name="gs1_content_type" invisible="not parent.is_gs1_nomenclature"/> |
| 54 |
<field name="gs1_decimal_usage" invisible="not parent.is_gs1_nomenclature or gs1_content_type != 'measure'"/> |
| 55 |
<field name="associated_uom_id" invisible="not parent.is_gs1_nomenclature or gs1_content_type != 'measure'"/> |
| 56 |
<field name="is_gs1_nomenclature" invisible="1"/> |
| 57 |
</xpath> |
| 58 |
</field> |
| 59 |
</record> |
| 60 |
</odoo> |