OCA / contract

GNU Affero General Public License v3.0
170 stars 522 forks source link

[17.0] bug in contract #1114

Open Guoyong-01 opened 1 month ago

Guoyong-01 commented 1 month ago

Module

Contract

Describe the bug

When creating a template for contract type Supplier, it generates an error: Uncaught Promise > The following error occurred in onWillUpdateProps: "Can not evaluate python expression: (bool(parent.contract_type == 'purchase' and not is_auto_renew)) Error: Name 'is_auto_renew' is not defined"

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Go to Invoicing > Configuration > Contract Templates
  2. Select Supplier as Contract Type
Guoyong-01 commented 1 month ago

this is the line that causes the error: https://github.com/OCA/contract/blob/4bb198e4eb4f43537b1b764c39340d059c427543/contract/views/contract_template.xml#L53 i think the column_invisible should be removed cause if a line has is_auto_renew to false but other lines have it to true, the column should not be invisible. By removing it everythin works well.