feat(certificates): cert Customer Contact is multi-contact, auto-filled, sends to all
fp.certificate.contact_partner_id (single 'Customer Contact') becomes contact_partner_ids (Many2many) — same shape as the partner's Default CoC Contacts, as requested. - Auto-populate: at job creation (fp.job cert resolution) + lazy-fill at issue, contact_partner_ids = the customer's x_fc_default_coc_contact_ids (ALL). - Send: action_send_to_customer pre-fills the composer with exactly the cert's contact_partner_ids, so the CoC goes to all the defined clients (fallback: company). - Primary: the FIRST contact prints on the CoC + is gated for email; report uses contact_partner_ids[:1]. - Gate: requires >=1 Customer Contact + the primary has an email. - View: many2many_tags. - Migration 19.0.10.3.0: copies each cert's old single contact into the new M2m, drops the orphaned column. Deployed + verified on entech: migration copied 16 certs, old column dropped, field is M2m, send pre-fills the cert contacts, CoC report renders. entech-only part_line_ids preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -101,7 +101,8 @@
|
||||
<group>
|
||||
<field name="certificate_type"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="contact_partner_id"
|
||||
<field name="contact_partner_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
invisible="not partner_id"/>
|
||||
<field name="sale_order_id"/>
|
||||
|
||||
Reference in New Issue
Block a user