İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1078 Görünümler

Hello, i have a little big problem

i want to show only the purchase taxes in purchase account move and sale taxes in sale account move, this is my code

Someone help me pls :(((

def _get_tax_domain(self):
for rec in self:
if rec.move_type in ['in_invoice', 'in_refund', 'in_receipt']:
domain = [('type_tax_use', '=', 'sale'), ('tax_group_id.name', 'in', ['Retención RENTA', 'Retención IVA'])]
else:
domain = [('type_tax_use', '=', 'purchase'), ('tax_group_id.name', 'in', ['Retención RENTA', 'Retención IVA'])]
return domain

new_taxes = fields.Many2many('account.tax', domain=_get_tax_domain)


Avatar
Vazgeç
En İyi Yanıt

You can follow this: https://youtu.be/XGqXEL2qQmE 

Hope it helps, Thanks

Avatar
Vazgeç