barcodes_view.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0"?>
  2. <odoo>
  3. <!-- BARCODE NOMENCLATURES -->
  4. <record model="ir.ui.view" id="view_barcode_nomenclature_form">
  5. <field name="name">Barcode Nomenclatures</field>
  6. <field name="model">barcode.nomenclature</field>
  7. <field name="arch" type="xml">
  8. <form string="Barcode Nomenclature">
  9. <sheet>
  10. <group name="general_attributes" col="4">
  11. <field name="name" />
  12. <field name="upc_ean_conv"/>
  13. </group>
  14. <div>
  15. <p>
  16. <i>Barcodes Nomenclatures</i> define how barcodes are recognized and categorized.
  17. When a barcode is scanned it is associated to the <i>first</i> rule with a matching
  18. pattern. The pattern syntax is that of regular expression, and a barcode is matched
  19. if the regular expression matches a prefix of the barcode.
  20. </p><p>
  21. Patterns can also define how numerical values, such as weight or price, can be
  22. encoded into the barcode. They are indicated by <code>{NNN}</code> where the N's
  23. define where the number's digits are encoded. Floats are also supported with the
  24. decimals indicated with D's, such as <code>{NNNDD}</code>. In these cases,
  25. the barcode field on the associated records <i>must</i> show these digits as
  26. zeroes.
  27. </p>
  28. </div>
  29. <field name="rule_ids">
  30. <tree string='Tables'>
  31. <field name="sequence" widget="handle"/>
  32. <field name="name" />
  33. <field name="type" />
  34. <field name="encoding" />
  35. <field name="pattern" />
  36. </tree>
  37. </field>
  38. </sheet>
  39. </form>
  40. </field>
  41. </record>
  42. <record model="ir.ui.view" id="view_barcode_nomenclature_tree">
  43. <field name="name">Barcode Nomenclatures</field>
  44. <field name="model">barcode.nomenclature</field>
  45. <field name="arch" type="xml">
  46. <tree string="Barcode Nomenclatures">
  47. <field name="name" />
  48. </tree>
  49. </field>
  50. </record>
  51. <record model="ir.actions.act_window" id="action_barcode_nomenclature_form">
  52. <field name="name">Barcode Nomenclatures</field>
  53. <field name="type">ir.actions.act_window</field>
  54. <field name="res_model">barcode.nomenclature</field>
  55. <field name="view_mode">tree,kanban,form</field>
  56. <field name="help" type="html">
  57. <p class="o_view_nocontent_smiling_face">
  58. Add a new barcode nomenclature
  59. </p><p>
  60. A barcode nomenclature defines how the point of sale identify and interprets barcodes
  61. </p>
  62. </field>
  63. </record>
  64. <record model="ir.ui.view" id="view_barcode_rule_form">
  65. <field name="name">Barcode Rule</field>
  66. <field name="model">barcode.rule</field>
  67. <field name="arch" type="xml">
  68. <form string="Barcode Rule">
  69. <group>
  70. <field name="name" />
  71. <field name="sequence" />
  72. <field name="type"/>
  73. <field name="encoding" attrs="{'invisible': [('type','=', 'alias')]}"/>
  74. <field name="pattern" />
  75. <field name="alias" attrs="{'invisible': [('type','!=', 'alias')]}"/>
  76. </group>
  77. </form>
  78. </field>
  79. </record>
  80. </odoo>