Skip to content

[18.0][BUG] contract: future contracts smart button is hidden on contacts without customer_rank or supplier_rank #1412

@fcvalgar

Description

@fcvalgar

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.

Image Image

To Reproduce

Affected versions:
18.0

Steps to reproduce the behavior:

  1. Create a new contact from the Contacts module.
  2. Make sure the partner is not created through a Sales or Purchase flow, so customer_rank and/or supplier_rank remain 0.
  3. Create a future contract linked to that partner.
  4. Open the partner form.
Image Image

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.

MT-14328 @moduon

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions