Mercurial > hgweb > health
changeset 2389:40f8af6c84f2
health_services : task #13888: Include taxes on from the service lines to invoice
| author | Luis Falcon <falcon@gnu.org> |
|---|---|
| date | Thu, 11 Feb 2016 12:38:22 +0000 |
| parents | 252e3ff57768 |
| children | 2fc509d3b3e7 |
| files | tryton/health_services/wizard/wizard_health_services.py |
| diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health_services/wizard/wizard_health_services.py +++ b/tryton/health_services/wizard/wizard_health_services.py @@ -134,6 +134,11 @@ unit_price = line.product.list_price if line.to_invoice: + taxes = [] + #Include taxes related to the product on the invoice line + for product_tax_line in line.product.customer_taxes_used: + taxes.append(product_tax_line.id) + invoice_lines.append(('create', [{ 'origin': str(line), 'product': line.product.id, @@ -143,6 +148,7 @@ 'unit': line.product.default_uom.id, 'unit_price': unit_price, 'sequence': seq, + 'taxes': [('add',taxes)], }])) invoice_data['lines'] = invoice_lines
