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