diff --git a/purchase_usability/purchase.py b/purchase_usability/purchase.py
index d25a1ce..a07b3cb 100644
--- a/purchase_usability/purchase.py
+++ b/purchase_usability/purchase.py
@@ -4,6 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
+from odoo.tools.misc import formatLang
class PurchaseOrder(models.Model):
@@ -54,6 +55,20 @@ class PurchaseOrder(models.Model):
self, 'purchase.report_purchaseorder')
return action
+ # Re-write native name_get() to use amount_untaxed instead of amount_total
+ @api.multi
+ @api.depends('name', 'partner_ref')
+ def name_get(self):
+ result = []
+ for po in self:
+ name = po.name
+ if po.partner_ref:
+ name += ' ('+po.partner_ref+')'
+ if po.amount_untaxed:
+ name += ': ' + formatLang(self.env, po.amount_untaxed, currency_obj=po.currency_id)
+ result.append((po.id, name))
+ return result
+
class StockPicking(models.Model):
_inherit = 'stock.picking'
diff --git a/stock_usability/stock_view.xml b/stock_usability/stock_view.xml
index 4a001e1..ad6d327 100644
--- a/stock_usability/stock_view.xml
+++ b/stock_usability/stock_view.xml
@@ -32,6 +32,13 @@
+
+
+ 1
+
+
+ 1
+