Author SHA1 Message Date
李鹏宇 b7fbb124f0 Merge branch 'master' into dev_zhou 2026-01-06 10:41:32 +08:00
zhou 3cd9bf9708 添加功能 2025-05-19 19:25:40 +08:00
李鹏宇 d51f882bec !4 1
Merge pull request !4 from 李鹏宇/pengyuthon-dev
2025-03-20 01:42:40 +00:00
zhou 2837413c38 Merge remote-tracking branch 'origin/master' 2025-01-06 17:54:11 +08:00
zhou 8054a8e84c 添加功能 2025-01-06 17:53:22 +08:00
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -23,6 +23,15 @@ class HrContract(models.Model):
('weekly', 'Weekly'),
('daily', 'Daily')],
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,
help="Employee's working schedule.")
hours_per_week = fields.Float(related='resource_calendar_id.hours_per_week')
+1 -1
View File
@@ -6,7 +6,7 @@
<field name="model">planning.slot</field>
<field name="arch" type="xml">
<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"
string="Publish &amp; Send" type="object" groups="planning.group_planning_manager" invisible="context.get('search_default_my_shifts')"/>
</header>