feat(claims): add x_fc_pages_11_12_in_original + computed gate
New boolean on sale.order tracks whether pages 11 & 12 are bundled inside the original application PDF. Computed helper x_fc_has_signed_pages_11_12 ORs bundled flag with separate-file and remote-signing presence so downstream gates can read one field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2909,7 +2909,38 @@ class SaleOrder(models.Model):
|
||||
x_fc_signed_pages_filename = fields.Char(
|
||||
string='Signed Pages Filename',
|
||||
)
|
||||
|
||||
|
||||
x_fc_pages_11_12_in_original = fields.Boolean(
|
||||
string='Pages 11 & 12 in Original Application',
|
||||
default=False,
|
||||
tracking=True,
|
||||
copy=False,
|
||||
help='True when the original application PDF already contains the signed pages 11 & 12.',
|
||||
)
|
||||
|
||||
x_fc_has_signed_pages_11_12 = fields.Boolean(
|
||||
string='Has Signed Pages 11 & 12',
|
||||
compute='_compute_has_signed_pages_11_12',
|
||||
store=True,
|
||||
help=(
|
||||
'True if pages 11 & 12 are satisfied — either bundled in the original '
|
||||
'application, uploaded as a separate file, or signed via remote signing.'
|
||||
),
|
||||
)
|
||||
|
||||
@api.depends(
|
||||
'x_fc_signed_pages_11_12',
|
||||
'x_fc_pages_11_12_in_original',
|
||||
'page11_sign_request_ids.state',
|
||||
)
|
||||
def _compute_has_signed_pages_11_12(self):
|
||||
for order in self:
|
||||
order.x_fc_has_signed_pages_11_12 = bool(
|
||||
order.x_fc_pages_11_12_in_original
|
||||
or order.x_fc_signed_pages_11_12
|
||||
or order.page11_sign_request_ids.filtered(lambda r: r.state == 'signed')
|
||||
)
|
||||
|
||||
# ==========================================================================
|
||||
# PAGE 11 SIGNATURE TRACKING (Client/Agent Signature)
|
||||
# Page 11 must be signed by: Client, Spouse, Parent, Legal Guardian, POA, or Public Trustee
|
||||
|
||||
Reference in New Issue
Block a user