|
@@ -1,34 +1,108 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<openerp>
|
|
|
<data>
|
|
|
- <!-- make readonly for everyone -->
|
|
|
- <record id="view_credit_readonly_partner_form" model="ir.ui.view">
|
|
|
- <field name="name">res.partner.partner_credit_limit.form</field>
|
|
|
- <field name="model">res.partner</field>
|
|
|
- <field name="inherit_id" ref="account.view_partner_property_form"/>
|
|
|
- <field name="arch" type="xml">
|
|
|
- <xpath expr="//form[@string='Partners']//field[@name='credit_limit']" position="attributes">
|
|
|
- <attribute name="readonly">1</attribute>
|
|
|
- </xpath>
|
|
|
- <xpath expr="//form[@string='Partners']//field[@name='check_limit']" position="attributes">
|
|
|
- <attribute name="readonly">1</attribute>
|
|
|
- </xpath>
|
|
|
- </field>
|
|
|
- </record>
|
|
|
- <!-- Make not readonly for user_edit_credit_limit -->
|
|
|
- <record id="view_credit_editable_partner_form" model="ir.ui.view">
|
|
|
- <field name="name">res.partner.partner_credit_limit.form</field>
|
|
|
- <field name="model">res.partner</field>
|
|
|
- <field name="inherit_id" ref="partner_credit_limit.view_credit_readonly_partner_form"/>
|
|
|
- <field name="groups_id" eval="[(6, 0, [ref('partner_credit_limit.credit_config')])]"/>
|
|
|
- <field name="arch" type="xml">
|
|
|
- <xpath expr="//form[@string='Partners']//field[@name='credit_limit']" position="attributes">
|
|
|
- <attribute name="readonly">0</attribute>
|
|
|
- </xpath>
|
|
|
- <xpath expr="//form[@string='Partners']//field[@name='check_limit']" position="attributes">
|
|
|
- <attribute name="readonly">0</attribute>
|
|
|
- </xpath>
|
|
|
- </field>
|
|
|
- </record>
|
|
|
+ <record id="view_order_form" model="ir.ui.view">
|
|
|
+ <field name="name">view_order_form</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="sale.view_order_form"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <button name="action_quotation_send" states="draft" position="replace">
|
|
|
+ <button name="action_quotation_send" string="Email" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="action_quotation_send" states="sent,progress,manual" position="replace">
|
|
|
+ <button name="action_quotation_send" string="Email" type="object" states="sent,progress,manual" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="copy_quotation" states="cancel" position="replace">
|
|
|
+ <button name="copy_quotation" states="cancel" string="Copiar" type="object"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="cancel" states="draft,sent" position="replace">
|
|
|
+ <button name="cancel" states="draft,sent" string="Cancelar" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="action_cancel" states="manual,progress" position="replace">
|
|
|
+ <button name="action_cancel" states="manual,progress" string="Cancelar" type="object" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="invoice_cancel" states="invoice_except" position="replace">
|
|
|
+ <button name="invoice_cancel" states="invoice_except" string="Cancelar" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="action_button_confirm" states="draft" position="replace">
|
|
|
+ <button name="action_button_confirm" states="draft" string="Confirmar" type="object" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button name="action_button_confirm" states="sent" position="replace">
|
|
|
+ <button name="action_button_confirm" states="sent" string="Confirmar" class="oe_highlight" type="object" groups="base.group_user"/>
|
|
|
+ </button>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <record id="view_order_form_inherit" model="ir.ui.view">
|
|
|
+ <field name="name">view_order_form_inherit</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="sale_stock.view_order_form_inherit"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//button[@name='action_view_delivery']" position="attributes">
|
|
|
+ <attribute name="string">Ver entrega</attribute>
|
|
|
+ </xpath>
|
|
|
+
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <!-- MAKE READONLY -->
|
|
|
+
|
|
|
+ <record id="readonly_sale_form" model="ir.ui.view">
|
|
|
+ <field name="name">readonly_sale_form</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="sale_stock.view_order_form_inherit"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//field[@name='warehouse_id']" position="attributes">
|
|
|
+ <attribute name="readonly">1</attribute>
|
|
|
+ </xpath>
|
|
|
+
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <record id="readonly_sale_form2" model="ir.ui.view">
|
|
|
+ <field name="name">readonly_sale_form2</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="sale.view_order_form"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//field[@name='pricelist_id']" position="attributes">
|
|
|
+ <attribute name="readonly">1</attribute>
|
|
|
+ </xpath>
|
|
|
+
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- EDITABLE FOR MANAGER -->
|
|
|
+
|
|
|
+ <record id="editable_sale_form" model="ir.ui.view">
|
|
|
+ <field name="name">editable_sale_form</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="fields_security_dikasa.readonly_sale_form"/>
|
|
|
+ <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_manager')])]"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//field[@name='warehouse_id']" position="attributes">
|
|
|
+ <attribute name="readonly">0</attribute>
|
|
|
+ </xpath>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <record id="editable_sale_form2" model="ir.ui.view">
|
|
|
+ <field name="name">editable_sale_form</field>
|
|
|
+ <field name="model">sale.order</field>
|
|
|
+ <field name="inherit_id" ref="fields_security_dikasa.readonly_sale_form2"/>
|
|
|
+ <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_manager')])]"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//field[@name='pricelist_id']" position="attributes">
|
|
|
+ <attribute name="readonly">0</attribute>
|
|
|
+ </xpath>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
</data>
|
|
|
</openerp>
|