From 12e11dafcab5d4b238b2a6563e23f68f89ec8ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 4 Sep 2015 12:02:55 +0200 Subject: [PATCH] Set spell attribute only on form view issue4944 review16571002 --- invoice.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index 14741bc565..4917c325ad 100644 --- a/invoice.py +++ b/invoice.py @@ -964,7 +964,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): @classmethod def view_attributes(cls): - return [('//field[@name="comment"]', 'spell', Eval('party_lang'))] + return [('/form//field[@name="comment"]', 'spell', Eval('party_lang'))] @classmethod def delete(cls, invoices): @@ -1823,8 +1823,9 @@ class InvoiceLine(ModelSQL, ModelView, TaxableMixin): @classmethod def view_attributes(cls): - return [('//field[@name="note"]|//field[@name="description"]', 'spell', - If(Bool(Eval('_parent_invoice')), + return [ + ('/form//field[@name="note"]|/form//field[@name="description"]', + 'spell', If(Bool(Eval('_parent_invoice')), Eval('_parent_invoice', {}).get('party_lang'), Eval('party_lang')))]