Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
[FIX] bug on sale/purchase order line if description taxes is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Mar 20, 2018
1 parent 169d66f commit c223921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions grap_change_views/models/purchase_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class PurchaseOrderLine(models.Model):
@api.depends('taxes_id')
def _compute_tax_ids_description(self):
for line in self:
line.tax_ids_description =\
','.join(line.taxes_id.filtered(
lambda x: x.description).mapped('description'))
line.tax_ids_description = ','.join(
[x.description and x.description or x.name
for x in line.taxes_id])
5 changes: 3 additions & 2 deletions grap_change_views/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ class SaleOrderLine(models.Model):
@api.depends('tax_id')
def _compute_tax_ids_description(self):
for line in self:
line.tax_ids_description =\
','.join(line.tax_id.mapped('description'))
line.tax_ids_description =','.join(
[x.description and x.description or x.name
for x in line.tax_id])

0 comments on commit c223921

Please sign in to comment.