You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.9 KiB
39 lines
1.9 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
|
|
Copyright (C) 2016-Today GRAP (http://www.lalouve.net)
|
|
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
-->
|
|
|
|
<odoo>
|
|
|
|
<record id="view_product_product_form" model="ir.ui.view">
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="barcode" position="before">
|
|
<field name="barcode_rule_id"
|
|
domain="[('is_product_available', '=', True)]"
|
|
groups="barcodes_generate.generate_product_barcode" colspan="2"
|
|
attrs="{'readonly': [('barcode', '!=', False)]}"/>
|
|
<field name="barcode_base" attrs="{'invisible': [('barcode_rule_id', '=', False)], 'readonly': [('barcode', '!=', False)]}"
|
|
groups="barcodes_generate.generate_product_barcode" colspan="2"/>
|
|
</field>
|
|
<field name="barcode" position="after">
|
|
<button name="generate_base_barcode" type="object" string="Generate Base and Barcode"
|
|
attrs="{'invisible': ['|', '|',
|
|
('barcode_rule_id', '=', False),
|
|
('barcode', '!=', False),
|
|
('barcode_base', '!=', False)]}"
|
|
groups="barcodes_generate.generate_product_barcode" colspan="1"/>
|
|
<button name="generate_barcode" type="object" string="Generate Barcode"
|
|
attrs="{'invisible': ['|',
|
|
('barcode_rule_id', '=', False),
|
|
('barcode', '!=', False)]}"
|
|
groups="barcodes_generate.generate_partner_barcode" colspan="1"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|