Browse Source

[ADD] info on super cooperaive status on res.partner, it's not meant to be change here

pull/14/head
Thibault Francois 8 years ago
parent
commit
3424f103e2
  1. 7
      beesdoo_shift/models/res_users.py
  2. 13
      beesdoo_shift/views/res_users.xml

7
beesdoo_shift/models/res_users.py

@ -4,4 +4,9 @@ from openerp import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
super = fields.Boolean("Super Cooperative")
super = fields.Boolean("Super Cooperative")
class ResPartner(models.Model):
_inherit = 'res.partner'
super = fields.Boolean(related='user_ids.super', string="Super Cooperative", readonly=True)

13
beesdoo_shift/views/res_users.xml

@ -10,4 +10,17 @@
</field>
</field>
</record>
<record model="ir.ui.view" id="super_coop_partner_inherited_view_form">
<field name="name">Partner Super Coop</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="beesdoo_base.beesdoo_partner_form_view" />
<field name="arch" type="xml">
<field name="eater" position="after">
<field name="super" />
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save