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

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2016-Today: GRAP (http://www.grap.coop)
  4. Copyright (C) 2016-Today GRAP (http://www.lalouve.net)
  5. @author Sylvain LE GAL (https://twitter.com/legalsylvain)
  6. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  7. -->
  8. <odoo>
  9. <record id="view_res_partner_form" model="ir.ui.view">
  10. <field name="model">res.partner</field>
  11. <field name="inherit_id" ref="point_of_sale.view_partner_property_form"/>
  12. <field name="arch" type="xml">
  13. <field name="barcode" position="before">
  14. <field name="barcode_rule_id"
  15. domain="[('is_partner_available', '=', True)]"
  16. groups="barcodes_generate.generate_partner_barcode" colspan="2"
  17. attrs="{'readonly': [('barcode', '!=', False)]}"/>
  18. <field name="barcode_base" attrs="{'invisible': [('barcode_rule_id', '=', False)], 'readonly': [('barcode', '!=', False)]}"
  19. groups="barcodes_generate.generate_partner_barcode" colspan="2"/>
  20. </field>
  21. <field name="barcode" position="after">
  22. <button name="generate_base_barcode" type="object" string="Generate Base and Barcode"
  23. attrs="{'invisible': ['|', '|',
  24. ('barcode_rule_id', '=', False),
  25. ('barcode', '!=', False),
  26. ('barcode_base', '!=', False)]}"
  27. groups="barcodes_generate.generate_partner_barcode" colspan="1"/>
  28. <button name="generate_barcode" type="object" string="Generate Barcode"
  29. attrs="{'invisible': ['|',
  30. ('barcode_rule_id', '=', False),
  31. ('barcode', '!=', False)]}"
  32. groups="barcodes_generate.generate_partner_barcode" colspan="1"/>
  33. </field>
  34. </field>
  35. </record>
  36. </odoo>