Skip to content

Commit

Permalink
[MIG] barcodes_generator_abstract: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
niboo-jva committed Mar 20, 2024
1 parent fbfab43 commit 50ab65e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
2 changes: 1 addition & 1 deletion barcodes_generator_abstract/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Generate Barcodes (Abstract)",
"summary": "Generate Barcodes for Any Models",
"version": "16.0.3.0.3",
"version": "17.0.1.0.0",
"category": "Tools",
"author": "GRAP, La Louve, LasLabs, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
Expand Down
10 changes: 2 additions & 8 deletions barcodes_generator_abstract/views/view_barcode_nomenclature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<field name="inherit_id" ref="barcodes.view_barcode_nomenclature_form" />
<field name="arch" type="xml">
<field name="pattern" position="after">
<field
name="generate_type"
attrs="{'invisible': [('generate_type', '=', 'no')]}"
/>
<field
name="generate_model"
attrs="{'invisible': [('generate_type', '=', 'no')]}"
/>
<field name="generate_type" invisible="generate_type == 'no'" />
<field name="generate_model" invisible="generate_type == 'no'" />
</field>
</field>
</record>
Expand Down
26 changes: 7 additions & 19 deletions barcodes_generator_abstract/views/view_barcode_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,28 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<xpath expr="//form/group" position="after">
<group
string="Barcode Generation"
attrs="{'invisible': ['|', ('encoding', '=', 'any'), ('padding', '=', 0)]}"
invisible="encoding == 'any' or padding == 0"
>
<field name="generate_type" />
<field
name="padding"
attrs="{'invisible': [('generate_type', '=', 'no')]}"
/>
<field name="padding" invisible="generate_type == 'no'" />
<field
name="generate_model"
attrs="{
'invisible': [('generate_type', '=', 'no')],
'required': [('generate_type', '!=', 'no')]
}"
invisible="generate_type == 'no'"
required="generate_type != 'no'"
/>
<field
name="generate_automate"
attrs="{'invisible': [('generate_type', '!=', 'sequence')]}"
invisible="generate_type != 'sequence'"
/>
<div
class="alert alert-info oe_button_box"
role="alert"
colspan="2"
attrs="{'invisible': [
'|',
('sequence_id', '!=', False),
('generate_type', '!=', 'sequence')]
}"
invisible="sequence_id != False or generate_type != 'sequence'"
>
If you leave the sequence field blank, a sequence will be created automatically when the barcode rule is saved, based on the padding of the barcode.
</div>
<field
name="sequence_id"
attrs="{'invisible': [('generate_type', '!=', 'sequence')]}"
/>
<field name="sequence_id" invisible="generate_type != 'sequence'" />
</group>
</xpath>
</field>
Expand Down

0 comments on commit 50ab65e

Please sign in to comment.