product_view.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_product_category_simple_ean_form" model="ir.ui.view">
  5. <field name="name">product.category.form</field>
  6. <field name="model">product.category</field>
  7. <field name="inherit_id" ref="product.product_category_form_view"/>
  8. <field name="arch" type="xml">
  9. <field name="type" position="after">
  10. <field name="ean_sequence_id" domain="[('barcode_sequence', '=', 1)]"
  11. context="{'default_name': name and 'EAN ' + name or 'EAN', 'default_barcode_sequence': 1}"/>
  12. <newline/>
  13. </field>
  14. </field>
  15. </record>
  16. <record id="view_product_simple_ean_form" model="ir.ui.view">
  17. <field name="name">product.product.form</field>
  18. <field name="model">product.product</field>
  19. <field name="inherit_id" ref="product.product_normal_form_view"/>
  20. <field name="arch" type="xml">
  21. <field name="ean13" position="after">
  22. <field name="ean_sequence_id" domain="[('barcode_sequence', '=', 1)]"
  23. context="{'default_name': name and 'EAN ' + name or 'EAN', 'default_barcode_sequence': 1}"
  24. class="oe_edit_only"/>
  25. <button
  26. string="Generar"
  27. name="generate_ean13"
  28. attrs="{'invisible': [('ean13', '!=', False)]}"
  29. type="object" colspan="2"/>
  30. </field>
  31. </field>
  32. </record>
  33. </data>
  34. </openerp>