partner_view.xml 1.4 KB

123456789101112131415161718192021222324252627282930
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- make readonly for everyone -->
  5. <record id="view_credit_readonly_partner_form" model="ir.ui.view">
  6. <field name="name">res.partner.partner_credit_limit.form</field>
  7. <field name="model">res.partner</field>
  8. <field name="inherit_id" ref="account.view_partner_property_form"/>
  9. <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_salesman')])]"/>
  10. <field name="arch" type="xml">
  11. <xpath expr="//field[@name='credit_limit']" position="attributes">
  12. <attribute name="readonly">1</attribute>
  13. </xpath>
  14. </field>
  15. </record>
  16. <record id="view_credit_readonly_partner_form2" model="ir.ui.view">
  17. <field name="name">res.partner.partner_credit_limit.form</field>
  18. <field name="model">res.partner</field>
  19. <field name="inherit_id" ref="partner_credit_limit.view_credit_readonly_partner_form"/>
  20. <field name="groups_id" eval="[(6, 0, [ref('base.group_sale_manager')])]"/>
  21. <field name="arch" type="xml">
  22. <xpath expr="//field[@name='credit_limit']" position="attributes">
  23. <attribute name="readonly">0</attribute>
  24. </xpath>
  25. </field>
  26. </record>
  27. </data>
  28. </openerp>