Browse Source

[TASK 0044_b] Gestion des shifts : visualiser le créneau sur la fiche du membre régulier + [ADD] Tab worker information for all information linked with the work in the cooperative + [ADD] share type for beescoop + [ADD] Specific module that make the link between beesdoo and easy_my_coop : compute the share_type base on the share bought

pull/105/head
Thibault Francois 8 years ago
committed by Elouan
parent
commit
49837c9d84
  1. 2
      beesdoo_shift/models/cooperative_status.py
  2. 18
      beesdoo_shift/views/cooperative_status.xml

2
beesdoo_shift/models/cooperative_status.py

@ -44,7 +44,7 @@ class ResPartner(models.Model):
info_session = fields.Boolean(related='cooperative_status_ids.info_session', string='Information Session ?', readonly=True, store=True) info_session = fields.Boolean(related='cooperative_status_ids.info_session', string='Information Session ?', readonly=True, store=True)
info_session_date = fields.Datetime(related='cooperative_status_ids.info_session_date', string='Information Session Date', readonly=True, store=True) info_session_date = fields.Datetime(related='cooperative_status_ids.info_session_date', string='Information Session Date', readonly=True, store=True)
working_mode = fields.Selection(related='cooperative_status_ids.working_mode', readonly=True, store=True) working_mode = fields.Selection(related='cooperative_status_ids.working_mode', readonly=True, store=True)
subscribed_shift_ids = fields.Many2many('beesdoo.shift.template')
@api.multi @api.multi
def coop_subscribe(self): def coop_subscribe(self):
return { return {

18
beesdoo_shift/views/cooperative_status.xml

@ -8,18 +8,24 @@
<header> <header>
<button name="coop_subscribe" string="Subscribe to shift" class="oe_highlight" <button name="coop_subscribe" string="Subscribe to shift" class="oe_highlight"
type="object" groups="beesdoo_shift.group_shift_management" type="object" groups="beesdoo_shift.group_shift_management"
attrs="{'invisible': [('eater', '!=', 'worker_eater')]}"/>
attrs="{'invisible': [('share_type', '!=', 'share_a')]}"/>
</header> </header>
</xpath> </xpath>
<field name="eater" position="after">
<field name="super" />
<field name="working_mode" />
</field>
<group name="info_session" position="inside">
<page name="work" position="inside">
<group>
<group>
<field name="info_session" /> <field name="info_session" />
<field name="info_session_date" <field name="info_session_date"
attrs="{'invisible': ['|', ('info_session', '=', False)]}" /> attrs="{'invisible': ['|', ('info_session', '=', False)]}" />
</group> </group>
<group>
<field name="working_mode" />
<field name="super" />
</group>
</group>
<separator string="Subscribed Shift" />
<field name="subscribed_shift_ids" />
</page>
</field> </field>
</record> </record>

Loading…
Cancel
Save