diff --git a/addons/l10n_fr_hr_payroll/report/report_l10n_fr_fiche_paye.xml b/addons/l10n_fr_hr_payroll/report/report_l10n_fr_fiche_paye.xml index 85ae97c2248..aae52cd9dbb 100644 --- a/addons/l10n_fr_hr_payroll/report/report_l10n_fr_fiche_paye.xml +++ b/addons/l10n_fr_hr_payroll/report/report_l10n_fr_fiche_paye.xml @@ -135,7 +135,7 @@ Net Imposable Plafond s.s. - Coût Global Salarié + Total versé par l'employeur diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index b1418f6c85c..227781f2b02 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -199,6 +199,12 @@ class PosOrder(models.Model): return InvoiceLine.sudo().create(inv_line) def _create_account_move_line(self, session=None, move=None): + def _flatten_tax_and_children(taxes): + children = self.env['account.tax'] + for tax in taxes: + children |= _flatten_tax_and_children(tax.children_tax_ids) + return taxes + children + # Tricky, via the workflow, we only have one id in the ids variable """Create a account move line of order grouped by products or not.""" IrProperty = self.env['ir.property'] @@ -280,6 +286,9 @@ class PosOrder(models.Model): name = name + ' (' + line.notice + ')' # Create a move for the line for the order line + # Just like for invoices, a group of taxes must be present on this base line + # As well as its children + base_line_tax_ids = _flatten_tax_and_children(line.tax_ids_after_fiscal_position).filtered(lambda tax: tax.type_tax_use in ['sale', 'none']) insert_data('product', { 'name': name, 'quantity': line.qty, @@ -288,7 +297,7 @@ class PosOrder(models.Model): 'analytic_account_id': self._prepare_analytic_account(line), 'credit': ((amount > 0) and amount) or 0.0, 'debit': ((amount < 0) and -amount) or 0.0, - 'tax_ids': [(6, 0, line.tax_ids_after_fiscal_position.ids)], + 'tax_ids': [(6, 0, base_line_tax_ids.ids)], 'partner_id': partner_id })