sale_order.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_order_form" model="ir.ui.view">
  5. <field name="name">view_order_form</field>
  6. <field name="model">sale.order</field>
  7. <field name="inherit_id" ref="sale.view_order_form"/>
  8. <field name="arch" type="xml">
  9. <button name="action_quotation_send" states="draft" position="replace">
  10. <button name="action_quotation_send" string="Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
  11. </button>
  12. <button name="action_quotation_send" states="sent,progress,manual" position="replace">
  13. <button name="action_quotation_send" string="Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
  14. </button>
  15. <button name="copy_quotation" states="cancel" position="replace">
  16. <button name="copy_quotation" states="cancel" string="Copiar" type="object"/>
  17. </button>
  18. <button name="cancel" states="draft,sent" position="replace">
  19. <button name="cancel" states="draft,sent" string="Cancelar" groups="base.group_user"/>
  20. </button>
  21. <button name="action_cancel" states="manual,progress" position="replace">
  22. <button name="action_cancel" states="manual,progress" string="Cancelar" type="object" groups="base.group_user"/>
  23. </button>
  24. <button name="invoice_cancel" states="invoice_except" position="replace">
  25. <button name="invoice_cancel" states="invoice_except" string="Cancelar" groups="base.group_user"/>
  26. </button>
  27. <button name="action_button_confirm" states="draft" position="replace">
  28. <button name="action_button_confirm" states="draft" string="Confirmar" type="object" groups="base.group_user"/>
  29. </button>
  30. <button name="action_button_confirm" states="sent" position="replace">
  31. <button name="action_button_confirm" states="sent" string="Confirmar" class="oe_highlight" type="object" groups="base.group_user"/>
  32. </button>
  33. </field>
  34. </record>
  35. <record id="view_order_form_inherit" model="ir.ui.view">
  36. <field name="name">view_order_form_inherit</field>
  37. <field name="model">sale.order</field>
  38. <field name="inherit_id" ref="sale_stock.view_order_form_inherit"/>
  39. <field name="arch" type="xml">
  40. <xpath expr="//button[@name='action_view_delivery']" position="attributes">
  41. <attribute name="string">Ver entrega</attribute>
  42. </xpath>
  43. </field>
  44. </record>
  45. <!-- MAKE READONLY -->
  46. <record id="readonly_sale_form" model="ir.ui.view">
  47. <field name="name">readonly_sale_form</field>
  48. <field name="model">sale.order</field>
  49. <field name="inherit_id" ref="sale_stock.view_order_form_inherit"/>
  50. <field name="arch" type="xml">
  51. <xpath expr="//field[@name='warehouse_id']" position="attributes">
  52. <attribute name="readonly">1</attribute>
  53. </xpath>
  54. </field>
  55. </record>
  56. <record id="readonly_sale_form2" model="ir.ui.view">
  57. <field name="name">readonly_sale_form2</field>
  58. <field name="model">sale.order</field>
  59. <field name="inherit_id" ref="sale.view_order_form"/>
  60. <field name="arch" type="xml">
  61. <xpath expr="//field[@name='pricelist_id']" position="attributes">
  62. <attribute name="readonly">1</attribute>
  63. </xpath>
  64. </field>
  65. </record>
  66. <!-- EDITABLE FOR MANAGER -->
  67. <record id="editable_sale_form" model="ir.ui.view">
  68. <field name="name">editable_sale_form</field>
  69. <field name="model">sale.order</field>
  70. <field name="inherit_id" ref="fields_security_dikasa.readonly_sale_form"/>
  71. <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_manager')])]"/>
  72. <field name="arch" type="xml">
  73. <xpath expr="//field[@name='warehouse_id']" position="attributes">
  74. <attribute name="readonly">0</attribute>
  75. </xpath>
  76. </field>
  77. </record>
  78. <record id="editable_sale_form2" model="ir.ui.view">
  79. <field name="name">editable_sale_form</field>
  80. <field name="model">sale.order</field>
  81. <field name="inherit_id" ref="fields_security_dikasa.readonly_sale_form2"/>
  82. <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_manager')])]"/>
  83. <field name="arch" type="xml">
  84. <xpath expr="//field[@name='pricelist_id']" position="attributes">
  85. <attribute name="readonly">0</attribute>
  86. </xpath>
  87. </field>
  88. </record>
  89. </data>
  90. </openerp>