updates
This commit is contained in:
@@ -34,6 +34,22 @@ class SaleOrder(models.Model):
|
||||
string='Is ADP Sale',
|
||||
help='True only for ADP or ADP/ODSP sale types',
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
# LTC REPAIR LINK
|
||||
# ==========================================================================
|
||||
x_fc_ltc_repair_id = fields.Many2one(
|
||||
'fusion.ltc.repair',
|
||||
string='LTC Repair',
|
||||
tracking=True,
|
||||
ondelete='set null',
|
||||
index=True,
|
||||
)
|
||||
x_fc_is_ltc_repair_sale = fields.Boolean(
|
||||
compute='_compute_is_ltc_repair_sale',
|
||||
store=True,
|
||||
string='Is LTC Repair Sale',
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
# INVOICE COUNT FIELDS (Separate ADP and Client invoices)
|
||||
@@ -402,6 +418,11 @@ class SaleOrder(models.Model):
|
||||
for order in self:
|
||||
order.x_fc_is_adp_sale = order._is_adp_sale()
|
||||
|
||||
@api.depends('x_fc_ltc_repair_id')
|
||||
def _compute_is_ltc_repair_sale(self):
|
||||
for order in self:
|
||||
order.x_fc_is_ltc_repair_sale = bool(order.x_fc_ltc_repair_id)
|
||||
|
||||
# ==========================================================================
|
||||
# SALE TYPE AND CLIENT TYPE FIELDS
|
||||
# ==========================================================================
|
||||
|
||||
Reference in New Issue
Block a user