[FIX] contract: Show contract button on partner when they have contracts too

This commit is contained in:
Eduardo De Miguel
2024-12-04 10:15:44 +01:00
parent 4aff2af5d4
commit 917d1632f4

View File

@@ -19,7 +19,7 @@
groups="account.group_account_invoice" groups="account.group_account_invoice"
icon="fa-book" icon="fa-book"
context="{'default_contract_type': 'sale', 'contract_type': 'sale'}" context="{'default_contract_type': 'sale', 'contract_type': 'sale'}"
attrs="{'invisible': [('customer_rank','=',0)]}" attrs="{'invisible': [('customer_rank','=',0), ('sale_contract_count','=',0)]}"
help="Show the sale contracts for this partner" help="Show the sale contracts for this partner"
> >
<field <field
@@ -40,7 +40,7 @@
groups="account.group_account_invoice" groups="account.group_account_invoice"
icon="fa-book" icon="fa-book"
context="{'default_contract_type': 'purchase', 'contract_type': 'purchase'}" context="{'default_contract_type': 'purchase', 'contract_type': 'purchase'}"
attrs="{'invisible': [('supplier_rank','=',0)]}" attrs="{'invisible': [('supplier_rank','=',0), ('purchase_contract_count','=',0)]}"
help="Show the purchase contracts for this partner" help="Show the purchase contracts for this partner"
> >
<field <field