[FIX] point_of_sale: impossible to print sale details
If you a user with only group 'group_pos_user' it is not possible to print the sale details. Because during the compute_all of the taxe, account.account.tag need read access. This PR allow 'group_pos_user' to print the sale details. closes odoo/odoo#74749 X-original-commit: 9212ee2a79189802ae9a7cbc7a8446e71b2b215a Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
83de6e8500
commit
9b3b295d28
@@ -1134,7 +1134,7 @@ class ReportSaleDetails(models.AbstractModel):
|
||||
products_sold[key] += line.qty
|
||||
|
||||
if line.tax_ids_after_fiscal_position:
|
||||
line_taxes = line.tax_ids_after_fiscal_position.compute_all(line.price_unit * (1-(line.discount or 0.0)/100.0), currency, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
|
||||
line_taxes = line.tax_ids_after_fiscal_position.sudo().compute_all(line.price_unit * (1-(line.discount or 0.0)/100.0), currency, line.qty, product=line.product_id, partner=line.order_id.partner_id or False)
|
||||
for tax in line_taxes['taxes']:
|
||||
taxes.setdefault(tax['id'], {'name': tax['name'], 'tax_amount':0.0, 'base_amount':0.0})
|
||||
taxes[tax['id']]['tax_amount'] += tax['amount']
|
||||
|
||||
Reference in New Issue
Block a user