Browse Source

[ADD][TASK s0048a] working mode

[CHANGE][TASK s0048] occasional -> irregular
pull/15/head
Rémy Taymans 8 years ago
committed by Thibault Francois
parent
commit
726bd15be0
  1. 13
      beesdoo_shift/models/res_users.py
  2. 5
      beesdoo_shift/views/res_users.xml

13
beesdoo_shift/models/res_users.py

@ -5,8 +5,21 @@ class ResUsers(models.Model):
_inherit = 'res.users'
super = fields.Boolean("Super Cooperative")
working_mode = fields.Selection(
[
('regular', 'Regular worker'),
('irregular', 'Irregular worker'),
('exempt', 'Exempted'),
],
string="Working mode",
)
class ResPartner(models.Model):
_inherit = 'res.partner'
super = fields.Boolean(related='user_ids.super', string="Super Cooperative", readonly=True)
working_mode = fields.Selection(
related='user_ids.working_mode',
string="Working mode",
readonly=True,
)

5
beesdoo_shift/views/res_users.xml

@ -7,20 +7,23 @@
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="super" />
<field name="working_mode" />
</field>
</field>
</record>
<record model="ir.ui.view" id="super_coop_partner_inherited_view_form">
<field name="name">Partner Super Coop</field>
<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="working_mode" />
<field name="super" />
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save