Merge branch '11.0' into pr_onboard_service_line

This commit is contained in:
Darío Lodeiros
2018-12-18 19:42:26 +01:00
committed by GitHub

View File

@@ -230,8 +230,6 @@ class HotelService(models.Model):
) )
return self.env['account.tax']._fix_tax_included_price_company(self._get_display_price(product), product.taxes_id, self.tax_ids, folio.company_id) return self.env['account.tax']._fix_tax_included_price_company(self._get_display_price(product), product.taxes_id, self.tax_ids, folio.company_id)
@api.model @api.model
def prepare_service_lines(self, **kwargs): def prepare_service_lines(self, **kwargs):
""" """
@@ -270,6 +268,7 @@ class HotelService(models.Model):
product = record.product_id product = record.product_id
price = record.price_unit * (1 - (record.discount or 0.0) * 0.01) price = record.price_unit * (1 - (record.discount or 0.0) * 0.01)
taxes = record.tax_ids.compute_all(price, currency, record.product_qty, product=product) taxes = record.tax_ids.compute_all(price, currency, record.product_qty, product=product)
record.update({ record.update({
'price_tax': sum(t.get('amount', 0.0) for t in taxes.get('taxes', [])), 'price_tax': sum(t.get('amount', 0.0) for t in taxes.get('taxes', [])),
'price_total': taxes['total_included'], 'price_total': taxes['total_included'],