-
-
Notifications
You must be signed in to change notification settings - Fork 594
[18.0][BUG] contract: future contracts smart button is hidden on contacts without customer_rank or supplier_rank #1412
Description
Module
contract
Describe the bug
When a future contract is created for a contact/partner, the contract smart button is not shown on the contact form if the partner was created from the Contacts module or through any flow that does not set customer_rank or supplier_rank.
As a result, the related contract exists, but the user cannot access it from the partner smart buttons.
To Reproduce
Affected versions:
18.0
Steps to reproduce the behavior:
- Create a new contact from the Contacts module.
- Make sure the partner is not created through a Sales or Purchase flow, so
customer_rankand/orsupplier_rankremain0. - Create a future contract linked to that partner.
- Open the partner form.
Expected behavior
The smart button for contracts should be visible whenever the partner has related contracts, regardless of whether customer_rank or supplier_rank is set.
Additional context
The issue seems to come from the smart button visibility conditions:
- Sale Contracts button: invisible when
customer_rank == 0 - Purchase Contracts button: invisible when
supplier_rank == 0
Because of this, partners created outside Sales/Purchases do not show the contract smart button, even if they already have linked contracts.