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.

28 lines
1.4 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
  4. @author Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <openerp><data>
  8. <record id="view_product_product_form" model="ir.ui.view">
  9. <field name="model">product.product</field>
  10. <field name="inherit_id" ref="product.product_normal_form_view"/>
  11. <field name="arch" type="xml">
  12. <field name="default_code" position="after">
  13. <field name="barcode_rule_id"
  14. domain="[('is_product_available', '=', True)]"
  15. groups="barcodes_generate.generate_product_barcode" colspan="2"
  16. attrs="{'readonly': [('ean13', '!=', False)]}"/>
  17. <field name="barcode_base" attrs="{'invisible': [('barcode_rule_id', '=', False)], 'readonly': [('ean13', '!=', False)]}"
  18. groups="barcodes_generate.generate_product_barcode" colspan="2"/>
  19. <button name="generate_barcode" type="object" string="Generate Barcode"
  20. attrs="{'invisible': ['|','|', ('ean13', '!=', False), ('barcode_rule_id', '=', False), ('barcode_base', '=', 0)]}"
  21. groups="barcodes_generate.generate_product_barcode" colspan="2"/>
  22. </field>
  23. </field>
  24. </record>
  25. </data></openerp>