Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7fbb124f0 | ||
|
|
3cd9bf9708 | ||
|
|
d51f882bec | ||
|
|
2837413c38 | ||
|
|
8054a8e84c |
@@ -23,6 +23,15 @@ class HrContract(models.Model):
|
|||||||
('weekly', 'Weekly'),
|
('weekly', 'Weekly'),
|
||||||
('daily', 'Daily')],
|
('daily', 'Daily')],
|
||||||
compute='_compute_schedule_pay', store=True, readonly=False)
|
compute='_compute_schedule_pay', store=True, readonly=False)
|
||||||
|
|
||||||
|
state = fields.Selection([
|
||||||
|
('draft', 'New'),
|
||||||
|
('open', 'Running'),
|
||||||
|
('close', 'Expired'),
|
||||||
|
('cancel', '中止')
|
||||||
|
], string='Status', group_expand='_expand_states', copy=False,
|
||||||
|
tracking=True, help='Status of the contract', default='draft')
|
||||||
|
|
||||||
resource_calendar_id = fields.Many2one(required=True, default=lambda self: self.env.company.resource_calendar_id,
|
resource_calendar_id = fields.Many2one(required=True, default=lambda self: self.env.company.resource_calendar_id,
|
||||||
help="Employee's working schedule.")
|
help="Employee's working schedule.")
|
||||||
hours_per_week = fields.Float(related='resource_calendar_id.hours_per_week')
|
hours_per_week = fields.Float(related='resource_calendar_id.hours_per_week')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<field name="model">planning.slot</field>
|
<field name="model">planning.slot</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Shift List" multi_edit="1" sample="1" editable="bottom" js_class="planning_tree" open_form_view="True">
|
<tree string="Shift List" multi_edit="1" sample="1" editable="bottom" js_class="planning_tree" open_form_view="True">
|
||||||
<header>
|
<header>
|
||||||
<button name="action_planning_publish_and_send" class="btn btn-secondary mx-1"
|
<button name="action_planning_publish_and_send" class="btn btn-secondary mx-1"
|
||||||
string="Publish & Send" type="object" groups="planning.group_planning_manager" invisible="context.get('search_default_my_shifts')"/>
|
string="Publish & Send" type="object" groups="planning.group_planning_manager" invisible="context.get('search_default_my_shifts')"/>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in New Issue
Block a user