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. 3
      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,
)

3
beesdoo_shift/views/res_users.xml

@ -7,6 +7,7 @@
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="super" />
<field name="working_mode" />
</field>
</field>
</record>
@ -17,10 +18,12 @@
<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