diff --git a/invoice.py b/invoice.py
index 7342c58ce1..3cb3d432c9 100644
--- a/invoice.py
+++ b/invoice.py
@@ -14,7 +14,7 @@ from trytond.report import Report
from trytond.wizard import Wizard, StateView, StateTransition, StateAction, \
Button
from trytond import backend
-from trytond.pyson import If, Eval, Bool, Id
+from trytond.pyson import If, Eval, Bool, Id, PYSONEncoder
from trytond.tools import reduce_ids, grouped_slice
from trytond.transaction import Transaction
from trytond.pool import Pool
@@ -957,6 +957,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
return ', '.join(set(itertools.ifilter(None,
(l.origin_name for l in self.lines))))
+ @classmethod
+ def view_attributes(cls):
+ return [('//field[@name="comment"]', 'spell', Eval('party_lang'))]
+
@classmethod
def delete(cls, invoices):
cls.check_modify(invoices)
@@ -1842,6 +1846,13 @@ class InvoiceLine(ModelSQL, ModelView, TaxableMixin):
'invoice': line.invoice.rec_name
})
+ @classmethod
+ def view_attributes(cls):
+ return [('//field[@name="note"]|//field[@name="description"]', 'spell',
+ If(Bool(Eval('_parent_invoice')),
+ Eval('_parent_invoice', {}).get('party_lang'),
+ Eval('party_lang')))]
+
@classmethod
def delete(cls, lines):
cls.check_modify(lines)
diff --git a/invoice.xml b/invoice.xml
index b38fdf0138..cdf94bd93b 100644
--- a/invoice.xml
+++ b/invoice.xml
@@ -41,8 +41,8 @@ this repository contains the full copyright notices and license terms. -->
Invoices
account.invoice
- [('type', '=', 'out_invoice')]
- {'type': 'out_invoice'}
+
+
@@ -58,19 +58,19 @@ this repository contains the full copyright notices and license terms. -->
Draft
- [('state', '=', 'draft')]
+
Validated
- [('state', '=', 'validated')]
+
Posted
- [('state', '=', 'posted')]
+
@@ -85,8 +85,8 @@ this repository contains the full copyright notices and license terms. -->
Credit Notes
account.invoice
- [('type', '=', 'out_credit_note')]
- {'type': 'out_credit_note'}
+
+
@@ -102,19 +102,19 @@ this repository contains the full copyright notices and license terms. -->
Draft
- [('state', '=', 'draft')]
+
Validated
- [('state', '=', 'validated')]
+
Posted
- [('state', '=', 'posted')]
+
@@ -129,8 +129,8 @@ this repository contains the full copyright notices and license terms. -->
Supplier Invoices
account.invoice
- [('type', '=', 'in_invoice')]
- {'type': 'in_invoice'}
+
+
@@ -146,19 +146,19 @@ this repository contains the full copyright notices and license terms. -->
Draft
- [('state', '=', 'draft')]
+
Validated
- [('state', '=', 'validated')]
+
Posted
- [('state', '=', 'posted')]
+
@@ -173,8 +173,8 @@ this repository contains the full copyright notices and license terms. -->
Supplier Credit Notes
account.invoice
- [('type', '=', 'in_credit_note')]
- {'type': 'in_credit_note'}
+
+
@@ -190,19 +190,19 @@ this repository contains the full copyright notices and license terms. -->
Draft
- [('state', '=', 'draft')]
+
Validated
- [('state', '=', 'validated')]
+
Posted
- [('state', '=', 'posted')]
+
@@ -413,7 +413,9 @@ this repository contains the full copyright notices and license terms. -->
- [('company', '=', user.company.id if user.company else None)]
+
@@ -422,7 +424,9 @@ this repository contains the full copyright notices and license terms. -->
- [('company', '=', user.company.id if user.company else None)]
+
diff --git a/party.xml b/party.xml
index 46a2f46787..9bacb57722 100644
--- a/party.xml
+++ b/party.xml
@@ -23,7 +23,8 @@ this repository contains the full copyright notices and license terms. -->
Invoices
account.invoice
- [('party', 'in', Eval('active_ids'))]
+
diff --git a/view/invoice_form.xml b/view/invoice_form.xml
index 206cad7d21..bcd5fe42f9 100644
--- a/view/invoice_form.xml
+++ b/view/invoice_form.xml
@@ -76,8 +76,7 @@ this repository contains the full copyright notices and license terms. -->
-
+
diff --git a/view/invoice_line_form.xml b/view/invoice_line_form.xml
index 5616ed0e7a..3c670acb75 100644
--- a/view/invoice_line_form.xml
+++ b/view/invoice_line_form.xml
@@ -16,8 +16,7 @@ this repository contains the full copyright notices and license terms. -->
-
+
@@ -30,8 +29,7 @@ this repository contains the full copyright notices and license terms. -->
-
+