@@ -16,8 +16,8 @@ class YuthonShiftApproval(models.Model):
|
||||
transferees_id = fields.Many2one('resource.resource', string="调班对象", domain="[('id', 'in', resource_ids)]")
|
||||
alternate_id = fields.Many2one('resource.resource', string="替班对象", domain="[('id', 'in', resource_ids)]")
|
||||
alternate_shifts = fields.Selection([('transferees', '调班'), ('alternate', '替班')], string="调替班" , default='transferees')
|
||||
shift_start = fields.Datetime(string="开始时间")
|
||||
shift_end = fields.Datetime(string="结束时间")
|
||||
shift_start = fields.Datetime(string="开始日期")
|
||||
shift_end = fields.Datetime(string="结束日期")
|
||||
shift_id = fields.Many2one('planning.slot', string="申请人1")
|
||||
shift_two_start = fields.Datetime(string="开始时间")
|
||||
shift_two_end = fields.Datetime(string="结束时间")
|
||||
|
||||
@@ -36,10 +36,16 @@ class PropertyRentalWizard(models.Model):
|
||||
('contract_id', '=', record.id),
|
||||
], limit=1)
|
||||
|
||||
if existing_receivable:
|
||||
if existing_receivable and record.actual_end_time <= start_date:
|
||||
return
|
||||
else:
|
||||
|
||||
receivable = self.env['property.accounts.receivable'].create({
|
||||
('contract_id', '=', record.id),
|
||||
})
|
||||
if receivable:
|
||||
acc_type = 'new'
|
||||
else:
|
||||
acc_type = None
|
||||
|
||||
if not rent_id:
|
||||
self.sudo().env["property.rent.list"].create({
|
||||
|
||||
Reference in New Issue
Block a user