This commit is contained in:
gsinghpal
2026-03-11 12:15:53 -04:00
parent f81e0cd918
commit db4b9aa278
1210 changed files with 173089 additions and 4044 deletions

View File

@@ -15,7 +15,9 @@ _logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_name = 'sale.order'
_inherit = ['sale.order', 'fusion_claims.adp.posting.schedule.mixin', 'fusion.email.builder.mixin']
_rec_names_search = ['name', 'partner_id.name']
@property
def _rec_names_search(self):
return ['name', 'partner_id.name']
@api.depends('name', 'partner_id.name')
def _compute_display_name(self):
@@ -35,22 +37,6 @@ class SaleOrder(models.Model):
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)
# ==========================================================================
@@ -418,11 +404,6 @@ 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
# ==========================================================================