Skip to content

[IMP] academic_sale_subscription: hide Company Information on opportunity - #447

Open
lef-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-68880-lef
Open

[IMP] academic_sale_subscription: hide Company Information on opportunity#447
lef-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-68880-lef

Conversation

@lef-adhoc

Copy link
Copy Markdown
Contributor

Task 68880

What

Hides the Company Information group of the Contacts tab on the opportunity form, from academic_sale_subscription.

In the academic flow the customer does not come from that group: it is created from the Family Group tab (family_member_ids + action_create_family), so the company name / address / language block is noise for schools.

How

The group has no name attribute and its string is translated, so it cannot be used as an xpath selector (_valid_inheritance raises "View inheritance may not use attribute 'string' as a selector"). It is reached through a field it owns, scoped to the Contacts page:

<xpath expr="//page[@name='lead']//field[@name='partner_name']/parent::group" position="attributes">
    <attribute name="invisible">1</attribute>
</xpath>

The fields are hidden, not removed — still readable by import/API.

Scope

  • Contact Information, Marketing and Ownership stay visible.
  • Lead form untouched: the whole Contacts page is natively invisible="type == 'lead'", and the Extra Info tab is not modified.
  • Only affects databases with the education vertical installed.
  • Lead → opportunity conversion (_create_customer) is unchanged.

Test plan

Verified on a local build with the module updated. Combined crm.lead form arch:

Group Fields invisible
Company Information partner_name, address, lang_id 1
Contact Information contact_name, function, website
Marketing campaign_id, medium_id, source_id, referred
Ownership company_id, team_id, type

partner_name is still present in the arch.

Note

Leads coming from the website form fill partner_name with the name of the responsible adult (contact_name holds the student, and stays visible). That value is no longer shown on screen, though it is still stored and available by API.

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

…nity

The Company Information group of the Contacts tab is not used in the
academic flow: the customer comes from the Family Group tab. The group
is hidden (not removed), so the fields stay readable by import/API.

Task 68880
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants