diff --git a/party.xml b/party.xml
index d3425351ee..2d2003418f 100644
--- a/party.xml
+++ b/party.xml
@@ -6,7 +6,8 @@ this repository contains the full copyright notices and license terms. -->
Purchases
purchase.purchase
- [('party', 'in', Eval('active_ids'))]
+
diff --git a/product.py b/product.py
index c8202f4d2e..40d293af8c 100644
--- a/product.py
+++ b/product.py
@@ -67,6 +67,13 @@ class Template:
else:
self.purchase_uom = self.default_uom
+ @classmethod
+ def view_attributes(cls):
+ return super(Template, cls).view_attributes() + [
+ ('//page[@id="suppliers"]', 'states', {
+ 'invisible': ~Eval('purchasable'),
+ })]
+
@classmethod
def write(cls, *args):
actions = iter(args)
diff --git a/purchase.py b/purchase.py
index d9878aad44..d2a92df8ca 100644
--- a/purchase.py
+++ b/purchase.py
@@ -590,6 +590,10 @@ class Purchase(Workflow, ModelSQL, ModelView, TaxableMixin):
domain = [domain, ('party', operator, names[1])]
return domain
+ @classmethod
+ def view_attributes(cls):
+ return [('//field[@name="comment"]', 'spell', Eval('party_lang'))]
+
@classmethod
def copy(cls, purchases, default=None):
if default is None:
@@ -1271,6 +1275,11 @@ class PurchaseLine(ModelSQL, ModelView):
{'purchase': self.purchase.rec_name})
return [invoice_line]
+ @classmethod
+ def view_attributes(cls):
+ return [('//field[@name="note"]|//field[@name="description"]',
+ 'spell', Eval('_parent_purchase', {}).get('party_lang'))]
+
@classmethod
def copy(cls, lines, default=None):
if default is None:
diff --git a/purchase.xml b/purchase.xml
index 4c514fd892..051e0a6cce 100644
--- a/purchase.xml
+++ b/purchase.xml
@@ -69,7 +69,9 @@ this repository contains the full copyright notices and license terms. -->
Shipments
stock.shipment.in
- [('moves.purchase', 'in', Eval('active_ids'))]
+
@@ -80,7 +82,9 @@ this repository contains the full copyright notices and license terms. -->
Returns
stock.shipment.in.return
- [('moves.purchase', 'in', Eval('active_ids'))]
+
@@ -91,7 +95,9 @@ this repository contains the full copyright notices and license terms. -->
Invoices
account.invoice
- [('lines.origin.purchase.id', 'in', Eval('active_ids'), 'purchase.line')]
+
@@ -131,28 +137,28 @@ this repository contains the full copyright notices and license terms. -->
id="act_purchase_form_domain_draft">
Draft
- [('state', '=', 'draft')]
+
Quotation
- [('state', '=', 'quotation')]
+
Confirmed
- [('state', '=', 'confirmed')]
+
Processing
- [('state', '=', 'processing')]
+
Purchases
purchase.purchase
- [('invoices', 'in', Eval('active_ids'))]
+
@@ -385,7 +392,9 @@ this repository contains the full copyright notices and license terms. -->
- [('company', '=', user.company.id if user.company else None)]
+
@@ -425,7 +434,9 @@ this repository contains the full copyright notices and license terms. -->
id="act_product_supplier_price_form">
Prices
purchase.product_supplier.price
- [('product_supplier', 'in', Eval('active_ids'))]
+
@@ -482,7 +493,9 @@ this repository contains the full copyright notices and license terms. -->
- [('company', '=', user.company.id if user.company else None)]
+
diff --git a/view/purchase_form.xml b/view/purchase_form.xml
index f767c24e1e..c64c46e25d 100644
--- a/view/purchase_form.xml
+++ b/view/purchase_form.xml
@@ -64,7 +64,7 @@ this repository contains the full copyright notices and license terms. -->
-
+
diff --git a/view/purchase_line_form.xml b/view/purchase_line_form.xml
index eff15f40d9..ff6204638e 100644
--- a/view/purchase_line_form.xml
+++ b/view/purchase_line_form.xml
@@ -15,8 +15,7 @@ this repository contains the full copyright notices and license terms. -->
view_ids="purchase.product_view_list_purchase_line"/>
-
+
@@ -33,8 +32,7 @@ this repository contains the full copyright notices and license terms. -->
-
+
diff --git a/view/template_form.xml b/view/template_form.xml
index 2afde822d6..6bdc5738cc 100644
--- a/view/template_form.xml
+++ b/view/template_form.xml
@@ -9,9 +9,7 @@ this repository contains the full copyright notices and license terms. -->
-
+