Hello, How can I show the other field when it is selected?
Scenario:
fieldA has field1 and field2
If field1 is selected, fieldB will display
If field2 is selected, fieldC will display
class AccountVoucherLine(models.Model): _inherit = "account.voucher.line" fieldA = fields.Selection([ ('field1', 'Field 1'), ('field2', 'Field 2'), ], 'Field Type', required=True, index=True) class AccountVoucher(models.Model): _inherit = "account.voucher" fieldB = fields.Char(string="Field B")
fieldC = fields.Char(string="Field C")