diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-02-12 11:46:00 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-02-12 11:46:00 +0100 |
| commit | 835e5ed62b5b2ea14ee3a9b2d9d9bd4b1b3c3e32 (patch) | |
| tree | 6dbbc32ebdb547a76934ff057f4907906185f0ee /addons | |
| parent | e2ae51c4b089b2aa7a8506dc595b293ad52d9575 (diff) | |
| parent | 0401a7349e190994d17df1b161bec5530314236b (diff) | |
[MERGE] forward port branch saas-15 up to 0401a7349e1
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_fr_hr_payroll/report/report_l10n_fr_fiche_paye.xml | 2 | ||||
| -rw-r--r-- | addons/point_of_sale/models/pos_order.py | 11 |
2 files changed, 11 insertions, 2 deletions
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 @@ <th>Net Imposable</th> <th>Plafond s.s.</th> <th></th> - <th>Coût Global Salarié</th> + <th>Total versé par l'employeur</th> </tr> </thead> <tbody> 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 }) |
