purchase_view.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_purchase_confirm_form" model="ir.ui.view">
  5. <field name="name">purchase.order.form - Confirm</field>
  6. <field name="model">purchase.order</field>
  7. <field name="inherit_id" ref="purchase.purchase_order_form"/>
  8. <field name="arch" type="xml">
  9. <button name="bid_received" states="sent" position="after">
  10. <button name="purchase_process_now" string="Procesar Compra" type="object" states="draft,sent" groups="base.group_user" class="oe_highlight"/>
  11. </button>
  12. <button name="print_quotation" position="attributes">
  13. <attribute name="invisible">1</attribute>
  14. </button>
  15. <button name="wkf_send_rfq" position="attributes">
  16. <attribute name="invisible">1</attribute>
  17. </button>
  18. <button name="purchase_confirm" position="attributes">
  19. <attribute name="invisible">1</attribute>
  20. </button>
  21. <button name="wkf_send_rfq" states="approved" position="attributes">
  22. <attribute name="invisible">1</attribute>
  23. </button>
  24. </field>
  25. </record>
  26. <record id="purchase_process_now_action" model="ir.actions.server">
  27. <field name="name">Purchase Fast Confirm</field>
  28. <field name="model_id" ref="model_purchase_order"/>
  29. <field name="state">code</field>
  30. <field name="code">
  31. if context.get('active_model') == 'purchase.order' and context.get('active_ids'):
  32. self.purchase_process_now(cr, uid, context['active_ids'], context=context)
  33. </field>
  34. </record>
  35. <record id="ir_purchase_process_now" model="ir.values">
  36. <field eval="'client_action_multi'" name="key2"/>
  37. <field eval="'purchase.order'" name="model"/>
  38. <field name="name">Purchase Fast Confirm</field>
  39. <field eval="'ir.actions.server,%d'%purchase_process_now_action" name="value"/>
  40. </record>
  41. </data>
  42. </openerp>