123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="purchase_order_form" model="ir.ui.view">
- <field name="name">purchase_order_form</field>
- <field name="model">purchase.order</field>
- <field name="inherit_id" ref="purchase.purchase_order_form"/>
- <field name="arch" type="xml">
- <button name="wkf_send_rfq" states="draft" position="replace">
- <button name="wkf_send_rfq" states="draft" string="Email" type="object" context="{'send_rfq':True}" class="oe_highlight"/>
- </button>
- <button name="wkf_send_rfq" states="sent" position="replace">
- <button name="wkf_send_rfq" states="sent" string="Email" type="object" context="{'send_rfq':True}"/>
- </button>
- <button name="wkf_send_rfq" states="approved" position="replace">
- <button name="wkf_send_rfq" states="approved" string="Email" type="object" context="{'send_rfq':False}"/>
- </button>
- <button name="print_quotation" states="draft" position="replace">
- <button name="print_quotation" string="Imprimir" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
- </button>
- <button name="print_quotation" states="sent" position="replace">
- <button name="print_quotation" string="Imprimir" type="object" states="sent" groups="base.group_user"/>
- </button>
- <button name="action_cancel" states="draft,confirmed,sent,bid,approved,except_picking,except_invoice" position="replace">
- <button name="action_cancel" states="draft,confirmed,sent,bid,approved,except_picking,except_invoice" string="Cancelar" type="object" />
- </button>
- <button name="purchase_confirm" states="draft" position="replace">
- <button name="purchase_confirm" states="draft" string="Confirmar" id="draft_confirm"/>
- </button>
- <button name="purchase_confirm" states="bid" position="replace">
- <button name="purchase_confirm" states="bid" string="Confirm Order" class="oe_highlight" id="bid_confirm"/>
- </button>
- </field>
- </record>
- <!-- MAKE READONLY -->
- <record id="readonly_purchase_form" model="ir.ui.view">
- <field name="name">readonly_purchase_form</field>
- <field name="model">purchase.order</field>
- <field name="inherit_id" ref="purchase.purchase_order_form"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='pricelist_id']" position="attributes">
- <attribute name="readonly">1</attribute>
- </xpath>
- <xpath expr="//field[@name='picking_type_id']" position="attributes">
- <attribute name="readonly">1</attribute>
- </xpath>
- <xpath expr="//field[@name='location_id']" position="attributes">
- <attribute name="readonly">1</attribute>
- </xpath>
- </field>
- </record>
- <!-- MAKE EDITABLE FOR MANAGER -->
- <record id="editable_purchase_form" model="ir.ui.view">
- <field name="name">editable_purchase_form</field>
- <field name="model">purchase.order</field>
- <field name="inherit_id" ref="fields_security_dikasa.readonly_purchase_form"/>
- <field name="groups_id" eval="[(6, 0, [ref('purchase.group_purchase_manager')])]"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='pricelist_id']" position="attributes">
- <attribute name="readonly">0</attribute>
- </xpath>
- <xpath expr="//field[@name='picking_type_id']" position="attributes">
- <attribute name="readonly">0</attribute>
- </xpath>
- <xpath expr="//field[@name='location_id']" position="attributes">
- <attribute name="readonly">0</attribute>
- </xpath>
- </field>
- </record>
- </data>
- </openerp>
|