I want the boolean field to be true automatic when there is a taxs on any product under the invoice lines
class Accountmove(models.Model):
_inherit = 'account.move'
taxs = fields.Boolean(string="Is Tax view", help="Tax view", store=True)
@api.onchange('invoice_line_ids', 'tax_ids')
def _onchange_invoice_line_ids(self):
for line in self:
if not line.tax_ids:
self.taxs = False
else:
self.taxs = True