Skip to content

Commit

Permalink
[IMP] barcodes_gs1_nomenclature: add more volume rules
Browse files Browse the repository at this point in the history
Some already exist, but let's add m^3 and ft^3 as well for demo data
purposes since office furniture supply stores are more likely to work
with these volumes than the existing ones.

Task: 2623434
ENT PR: odoo/enterprise#21179

Part-of: odoo#77183
  • Loading branch information
ticodoo committed Oct 1, 2021
1 parent 488224a commit baecc0d
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions addons/barcodes_gs1_nomenclature/data/barcodes_gs1_rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,22 @@
<field name="gs1_decimal_usage">True</field>
</record>

<record id="barcode_rule_gs1_316y" model="barcode.rule">
<field name="name">Net volume, cubic metres (variable measure trade item)</field>
<field name="barcode_nomenclature_id" ref="default_gs1_nomenclature"/>
<field name="sequence">115</field>
<field name="encoding">gs1-128</field>
<field name="pattern">(316[0-5])(\d{6})</field>
<field name="associated_uom_id" ref="uom.product_uom_cubic_meter"/>
<field name="type">quantity</field>
<field name="gs1_content_type">measure</field>
<field name="gs1_decimal_usage">True</field>
</record>

<record id="barcode_rule_gs1_321y" model="barcode.rule">
<field name="name">Length or first dimension, inches (variable measure trade item)</field>
<field name="barcode_nomenclature_id" ref="default_gs1_nomenclature"/>
<field name="sequence">115</field>
<field name="sequence">116</field>
<field name="encoding">gs1-128</field>
<field name="pattern">(321[0-5])(\d{6})</field>
<field name="associated_uom_id" ref="uom.product_uom_inch"/>
Expand All @@ -195,7 +207,7 @@
<record id="barcode_rule_gs1_357y" model="barcode.rule">
<field name="name">Net weight (or volume), ounces (variable measure trade item)</field>
<field name="barcode_nomenclature_id" ref="default_gs1_nomenclature"/>
<field name="sequence">116</field>
<field name="sequence">117</field>
<field name="encoding">gs1-128</field>
<field name="pattern">(357[0-5])(\d{6})</field>
<field name="associated_uom_id" ref="uom.product_uom_oz"/>
Expand All @@ -204,6 +216,18 @@
<field name="gs1_decimal_usage">True</field>
</record>

<record id="barcode_rule_gs1_365y" model="barcode.rule">
<field name="name">Net volume, cubic feet (variable measure trade item)</field>
<field name="barcode_nomenclature_id" ref="default_gs1_nomenclature"/>
<field name="sequence">118</field>
<field name="encoding">gs1-128</field>
<field name="pattern">(365[0-5])(\d{6})</field>
<field name="associated_uom_id" ref="uom.product_uom_cubic_foot"/>
<field name="type">quantity</field>
<field name="gs1_content_type">measure</field>
<field name="gs1_decimal_usage">True</field>
</record>

<!-- Company internal information (91 to 99): Custom rules -->
<record id="barcode_rule_gs1_91" model="barcode.rule">
<field name="name">Package type</field>
Expand Down

0 comments on commit baecc0d

Please sign in to comment.