From f7f0cb8f7fe9aa3d7d9252c9d1d0bcef6dd2875b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 Dec 2012 13:02:41 +0100 Subject: [PATCH] Add sale, purchase or other kind on Tax Rule and Tax Group review587003 --- sale.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sale.py b/sale.py index d8ee3297a2..ad2a03a879 100644 --- a/sale.py +++ b/sale.py @@ -960,7 +960,11 @@ class SaleLine(ModelSQL, ModelView): description = fields.Text('Description', size=None, required=True) note = fields.Text('Note') taxes = fields.Many2Many('sale.line-account.tax', 'line', 'tax', 'Taxes', - domain=[('parent', '=', None)], states={ + domain=[('parent', '=', None), ['OR', + ('group', '=', None), + ('group.kind', 'in', ['sale', 'both'])], + ], + states={ 'invisible': Eval('type') != 'line', }, depends=['type']) invoice_lines = fields.Many2Many('sale.line-account.invoice.line',