Skip to content

Commit

Permalink
[IMP] l10n_fr_chorus_account: improve partner form view
Browse files Browse the repository at this point in the history
On partner form view, hide Chorus params for child partner and add button that says that chorus params are managed on the parent company.
  • Loading branch information
alexis-via committed Jan 6, 2025
1 parent cc96869 commit 7f669b2
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions l10n_fr_chorus_account/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<field name="ref" position="after">
<field
name="fr_chorus_service_id"
attrs="{'invisible': ['|', ('parent_id', '=', False), ('customer_invoice_transmit_method_code', '!=', 'fr-chorus')]}"
domain="[('partner_id', '=', parent_id)]"
context="{'default_partner_id': parent_id}"
/>
</field>
<xpath
expr="//field[@name='child_ids']/form//label[@for='street']"
position="before"
Expand All @@ -33,10 +25,30 @@
expr="//page[@name='sales_purchases']/group[@name='container_row_2']"
position="inside"
>
<group
name="fr-chorus-child"
string="Chorus Pro"
attrs="{'invisible': ['|', ('customer_invoice_transmit_method_code', '!=', 'fr-chorus'), ('parent_id', '=', False)]}"
>
<field
name="fr_chorus_service_id"
attrs="{'invisible': ['|', '|', ('type', '!=', 'invoice'), ('parent_id', '=', False), ('customer_invoice_transmit_method_code', '!=', 'fr-chorus')]}"
domain="[('partner_id', '=', parent_id)]"
context="{'default_partner_id': parent_id}"
/>
<div name="parent_chorus" colspan="2">
<p>Other Chorus parameters are managed on <button
name="open_commercial_entity"
type="object"
string="the parent company"
class="oe_link"
/></p>
</div>
</group>
<group
name="fr-chorus"
string="Chorus Pro"
attrs="{'invisible': [('customer_invoice_transmit_method_code', '!=', 'fr-chorus')]}"
attrs="{'invisible': ['|', ('customer_invoice_transmit_method_code', '!=', 'fr-chorus'), ('parent_id', '!=', False)]}"
>
<button
name="fr_chorus_identifier_and_required_button"
Expand Down

0 comments on commit 7f669b2

Please sign in to comment.