[IMP] sale_timesheet: update product type onchange to avoid a empty invoice policy
task-2047389 closes-5388
This commit is contained in:
@@ -94,6 +94,8 @@ class ProductTemplate(models.Model):
|
||||
if self.type == 'service' and not self.invoice_policy:
|
||||
self.invoice_policy = 'order'
|
||||
self.service_type = 'timesheet'
|
||||
elif self.type == 'service' and self.invoice_policy == 'order':
|
||||
self.service_policy = 'ordered_timesheet'
|
||||
elif self.type == 'consu' and not self.invoice_policy and self.service_policy == 'ordered_timesheet':
|
||||
self.invoice_policy = 'order'
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user