sale_order_view.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_order_confirm_form" model="ir.ui.view">
  5. <field name="name">sale.order.form - Confirm</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. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='name']" position="attributes">
  10. <attribute name="invisible">1</attribute>
  11. </xpath>
  12. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='discount']" position="attributes">
  13. <attribute name="invisible">1</attribute>
  14. </xpath>
  15. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='price_unit']" position="before">
  16. <field name="standard_price" readonly="1"/>
  17. </xpath>
  18. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='price_unit']" position="before">
  19. <field name="discount_id" domain="[('type','=','purchase')]"/>
  20. </xpath>
  21. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='price_unit']" position="before">
  22. <field name="sale_percentage_id" domain="[('type','=','sale')]"/>
  23. </xpath>
  24. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='price_unit']" position="before">
  25. <field name="interest_amount" readonly="1"/>
  26. </xpath>
  27. <xpath expr="//tree[@string='Sales Order Lines']//field[@name='price_subtotal']" position="after">
  28. <field name="amount_total" readonly="1"/>
  29. </xpath>
  30. <field name="pricelist_id" position="after">
  31. <field name="contado"/>
  32. <field name="credito"/>
  33. <field name="invoice_number"/>
  34. </field>
  35. <!--
  36. BUTTONS
  37. -->
  38. <button name="action_button_confirm" states="sent" position="after">
  39. <button name="order_process_now" string="Procesar Venta" type="object" states="draft,sent" groups="base.group_user"/>
  40. </button>
  41. <button name="action_quotation_send" position="replace">
  42. <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="oe_highlight" groups="base.group_user" invisible="1"/>
  43. </button>
  44. <button name="action_quotation_send" states="sent,progress,manual" position="replace">
  45. <button name="action_quotation_send" string="Send by Email" type="object" groups="base.group_user" invisible="1"/>
  46. </button>
  47. <button name="print_quotation" states="draft" position="replace">
  48. <button name="print_quotation" string="Print" type="object" states="draft" class="oe_highlight" groups="base.group_user" invisible="1"/>
  49. </button>
  50. <button name="print_quotation" states="sent,progress,manual" position="replace">
  51. <button name="print_quotation" string="Print" type="object" states="sent,progress,manual" groups="base.group_user" invisible="1"/>
  52. </button>
  53. <button name="action_button_confirm" position="replace">
  54. <button name="action_button_confirm" states="draft" string="Confirm Sale" type="object" groups="base.group_user" invisible="1"/>
  55. </button>
  56. <button name="action_button_confirm" position="replace">
  57. <button name="action_button_confirm" states="sent" string="Confirm Sale" class="oe_highlight" type="object" groups="base.group_user" invisible="1"/>
  58. </button>
  59. <button name="invoice_cancel" position="replace">
  60. <button name="invoice_cancel" states="invoice_except" string="Cancel Order" groups="base.group_user" invisible="1"/>
  61. </button>
  62. <button name="cancel" position="replace">
  63. <button name="cancel" states="draft,sent" string="Cancel Quotation" groups="base.group_user" invisible="1"/>
  64. </button>
  65. <button name="action_cancel" position="replace">
  66. <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" groups="base.group_user" invisible="1"/>
  67. </button>
  68. </field>
  69. </record>
  70. <record id="account_invoice_cred_cont" model="ir.ui.view">
  71. <field name="name">account.invoice.cred.cont</field>
  72. <field name="model">account.invoice</field>
  73. <field name="inherit_id" ref="account.invoice_form" />
  74. <field name="arch" type="xml">
  75. <field name="fiscal_position" position="after">
  76. <field name="contado"/>
  77. <field name="credito"/>
  78. </field>
  79. </field>
  80. </record>
  81. <record id="order_process_now_action" model="ir.actions.server">
  82. <field name="name">Fast Confirm</field>
  83. <field name="model_id" ref="model_sale_order"/>
  84. <field name="state">code</field>
  85. <field name="code">
  86. if context.get('active_model') == 'sale.order' and context.get('active_ids'):
  87. self.order_process_now(cr, uid, context['active_ids'], context=context)
  88. </field>
  89. </record>
  90. <record id="ir_order_process_now" model="ir.values">
  91. <field eval="'client_action_multi'" name="key2"/>
  92. <field eval="'sale.order'" name="model"/>
  93. <field name="name">Fast Confirm</field>
  94. <field eval="'ir.actions.server,%d'%order_process_now_action" name="value"/>
  95. </record>
  96. </data>
  97. </openerp>