From 405c8508e961ddecef5cd13bee8e8da744cd2786 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 27 Jul 2015 09:23:35 +0200 Subject: [PATCH 01/29] Add module product_usability --- product_usability/__init__.py | 3 + product_usability/__openerp__.py | 47 +++++++++++ product_usability/product.py | 31 +++++++ product_usability/product_view.xml | 81 +++++++++++++++++++ .../security/product_security.xml | 19 +++++ 5 files changed, 181 insertions(+) create mode 100644 product_usability/__init__.py create mode 100644 product_usability/__openerp__.py create mode 100644 product_usability/product.py create mode 100644 product_usability/product_view.xml create mode 100644 product_usability/security/product_security.xml diff --git a/product_usability/__init__.py b/product_usability/__init__.py new file mode 100644 index 0000000..ca4e74d --- /dev/null +++ b/product_usability/__init__.py @@ -0,0 +1,3 @@ +# -*- encoding: utf-8 -*- + +from . import product diff --git a/product_usability/__openerp__.py b/product_usability/__openerp__.py new file mode 100644 index 0000000..27042a3 --- /dev/null +++ b/product_usability/__openerp__.py @@ -0,0 +1,47 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Product Usability module for Odoo +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Product Usability', + 'version': '0.1', + 'category': 'Product', + 'license': 'AGPL-3', + 'summary': 'Small usability enhancements to the product module', + 'description': """ +Product Usability +================= + +The usability enhancements include: +* show the object product.price.history in the product template form view + +This module has been written by Alexis de Lattre from Akretion . + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['product'], + 'data': [ + 'security/product_security.xml', + 'product_view.xml', + ], + 'installable': True, +} diff --git a/product_usability/product.py b/product_usability/product.py new file mode 100644 index 0000000..f906970 --- /dev/null +++ b/product_usability/product.py @@ -0,0 +1,31 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Product Usability module for Odoo +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp import models, fields + + +class ProductTemplate(models.Model): + _inherit = 'product.template' + + price_history_ids = fields.One2many( + 'product.price.history', 'product_template_id', + string='Product Price History') diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml new file mode 100644 index 0000000..b54e230 --- /dev/null +++ b/product_usability/product_view.xml @@ -0,0 +1,81 @@ + + + + + + + + + + product.price.history.form + product.price.history + +
+ + + + + + +
+
+
+ + + product.price.history.tree + product.price.history + + + + + + + + + + + + product.price.history.search + product.price.history + + + + + + + + + + + + + Product Price History + product.price.history + tree,form + {'product_price_history_main_view': True} + + + + + + + usability.product.template.form + product.template + + + + + + + + + + + +
+
diff --git a/product_usability/security/product_security.xml b/product_usability/security/product_security.xml new file mode 100644 index 0000000..fdbb27b --- /dev/null +++ b/product_usability/security/product_security.xml @@ -0,0 +1,19 @@ + + + + + + + + + Product price history multi-company + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + + From 333afdff0084863ffe1b5355bbbc662675c08e59 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 30 Oct 2015 23:23:35 +0100 Subject: [PATCH 02/29] Wider name field for product --- product_usability/product_view.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index b54e230..6ed77ff 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -73,6 +73,17 @@ + +
+ width: 800px; +
+
+ width: 700px; +
+ + + +
From d7ddbf7cd754aa1088c1668aa43b3d8891238d4e Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 7 Jan 2016 18:55:53 +0100 Subject: [PATCH 03/29] don't make name field of product too wide, for screens with small resolutions --- product_usability/__openerp__.py | 3 +++ product_usability/product_view.xml | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/product_usability/__openerp__.py b/product_usability/__openerp__.py index 27042a3..0b95287 100644 --- a/product_usability/__openerp__.py +++ b/product_usability/__openerp__.py @@ -32,8 +32,11 @@ Product Usability ================= The usability enhancements include: + * show the object product.price.history in the product template form view +* wider name field in product form view + This module has been written by Alexis de Lattre from Akretion . """, 'author': 'Akretion', diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index 6ed77ff..f004ffe 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -74,11 +74,13 @@ +
- width: 800px; + width: 700px;
- width: 700px; + width: 600px;
From 929cce16bf985535a7e28603bdb3125e43b86309 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 13 Jan 2016 11:51:13 +0100 Subject: [PATCH 04/29] Add search on EAN13 in product_usability --- product_usability/product_view.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index f004ffe..bd25365 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -89,6 +89,29 @@ + + + product_usability.product.template.search + product.template + + + + ['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)] + + + + + + + product_usability.product.search + product.product + + + + ['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)] + + + From 0869d2d1d93e663f4cff9512ffd56e63f79c19f0 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 31 Mar 2016 11:55:33 +0200 Subject: [PATCH 05/29] Add company_id in product.pricelist tree view --- product_usability/product_view.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index bd25365..97b7358 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -113,5 +113,18 @@ + + + usability.product.pricelist.tree + product.pricelist + + + + + + + + + From e1c35e045529ff550f71686bb50b327b4fd5b245 Mon Sep 17 00:00:00 2001 From: David Beal Date: Tue, 24 May 2016 11:36:13 +0200 Subject: [PATCH 06/29] [IMP] hide description field on product --- product_usability/__openerp__.py | 2 ++ product_usability/product_view.xml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/product_usability/__openerp__.py b/product_usability/__openerp__.py index 0b95287..9b8a84e 100644 --- a/product_usability/__openerp__.py +++ b/product_usability/__openerp__.py @@ -37,6 +37,8 @@ The usability enhancements include: * wider name field in product form view +* hide description field on product (description_sale must be use instead of description) + This module has been written by Alexis de Lattre from Akretion . """, 'author': 'Akretion', diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index 97b7358..9997ac2 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -85,6 +85,9 @@ + + {'invisible': True} + From ac90fe57ae51f863cf11daaaff7e07cd74085c52 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 11 Oct 2016 15:32:30 +0200 Subject: [PATCH 07/29] Set all modules as uninstallable --- product_usability/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_usability/__openerp__.py b/product_usability/__openerp__.py index 9b8a84e..e3e9491 100644 --- a/product_usability/__openerp__.py +++ b/product_usability/__openerp__.py @@ -48,5 +48,5 @@ This module has been written by Alexis de Lattre from Akretion Date: Tue, 11 Oct 2016 15:40:03 +0200 Subject: [PATCH 08/29] Mass rename from __openerp__.py to __manifest__.py --- product_usability/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename product_usability/{__openerp__.py => __manifest__.py} (100%) diff --git a/product_usability/__openerp__.py b/product_usability/__manifest__.py similarity index 100% rename from product_usability/__openerp__.py rename to product_usability/__manifest__.py From 8cc2fe66f44279cefdf165eb1560459e39134f19 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 31 Oct 2016 15:40:28 +0100 Subject: [PATCH 09/29] Partial port of product_usability --- product_usability/__init__.py | 2 +- product_usability/__manifest__.py | 29 ++------ product_usability/product.py | 32 ++------- product_usability/product_view.xml | 68 +++++++++---------- .../security/product_security.xml | 12 ++-- 5 files changed, 50 insertions(+), 93 deletions(-) diff --git a/product_usability/__init__.py b/product_usability/__init__.py index ca4e74d..d7d7308 100644 --- a/product_usability/__init__.py +++ b/product_usability/__init__.py @@ -1,3 +1,3 @@ -# -*- encoding: utf-8 -*- +# -*- coding: utf-8 -*- from . import product diff --git a/product_usability/__manifest__.py b/product_usability/__manifest__.py index e3e9491..3e84c13 100644 --- a/product_usability/__manifest__.py +++ b/product_usability/__manifest__.py @@ -1,29 +1,12 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Product Usability module for Odoo -# Copyright (C) 2015 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2015-2016 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Product Usability', - 'version': '0.1', + 'version': '10.0.1.0.0', 'category': 'Product', 'license': 'AGPL-3', 'summary': 'Small usability enhancements to the product module', @@ -48,5 +31,5 @@ This module has been written by Alexis de Lattre from Akretion -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# -*- coding: utf-8 -*- +# © 2015-2016 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp import models, fields +from odoo import models, fields -class ProductTemplate(models.Model): - _inherit = 'product.template' +class ProductProduct(models.Model): + _inherit = 'product.product' price_history_ids = fields.One2many( - 'product.price.history', 'product_template_id', + 'product.price.history', 'product_id', string='Product Price History') diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index 9997ac2..a1c1154 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -1,13 +1,11 @@ - - - + @@ -16,7 +14,7 @@
- + @@ -30,7 +28,7 @@ product.price.history - + @@ -43,9 +41,9 @@ product.price.history - + - + @@ -59,8 +57,9 @@ {'product_price_history_main_view': True} + @@ -68,50 +67,46 @@ product.template + -
- width: 700px; -
- width: 600px; + width: 650px;
- - - - - {'invisible': True} -
- - - product_usability.product.template.search - product.template - + + + usability.product.category.tree + product.category + - - ['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)] + + - - - product_usability.product.search - product.product - + + usability.product.category.search + product.category + - - ['|', '|', ('name', 'ilike', self), ('default_code', 'ilike', self), ('ean13', '=', self)] + + + + + + @@ -129,5 +124,4 @@ - - + diff --git a/product_usability/security/product_security.xml b/product_usability/security/product_security.xml index fdbb27b..fea2740 100644 --- a/product_usability/security/product_security.xml +++ b/product_usability/security/product_security.xml @@ -1,13 +1,12 @@ - - + Product price history multi-company @@ -15,5 +14,4 @@ ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] - - + From 1bd86ce02a8923ad42f9f045e091274b9101ad42 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 17 Nov 2016 18:51:34 +0100 Subject: [PATCH 10/29] Add unicity of default_code, because I think it's important to have that by default. --- product_usability/product.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/product_usability/product.py b/product_usability/product.py index 285f18c..fde3829 100644 --- a/product_usability/product.py +++ b/product_usability/product.py @@ -11,3 +11,13 @@ class ProductProduct(models.Model): price_history_ids = fields.One2many( 'product.price.history', 'product_id', string='Product Price History') + + _sql_constraints = [( + # Maybe it could be better to have a constrain per company + # but the company_id field is on product.template, + # not on product.product + # If it's a problem, we'll create a company_id field on + # product.product + 'default_code_uniq', + 'unique(default_code)', + 'This internal reference already exists!')] From 8598673530cf419bc2bc1737d5df17996ceb29ba Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 9 Dec 2016 08:35:00 +0100 Subject: [PATCH 11/29] Add module pos_config_single_user Several usability enhancements in sale, purchase, product and account --- product_usability/product.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/product_usability/product.py b/product_usability/product.py index fde3829..709fe01 100644 --- a/product_usability/product.py +++ b/product_usability/product.py @@ -21,3 +21,10 @@ class ProductProduct(models.Model): 'default_code_uniq', 'unique(default_code)', 'This internal reference already exists!')] + + +class ProductSupplierinfo(models.Model): + _inherit = 'product.supplierinfo' + + name = fields.Many2one( + domain=[('supplier', '=', True), ('parent_id', '=', False)]) From 2c53f60000c9512aa94dcabc1ac550882cff001d Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 14 Dec 2016 11:19:38 +0100 Subject: [PATCH 12/29] Add 2 group by (type and category) on product template search view --- product_usability/product_view.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index a1c1154..75c5fdf 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -84,6 +84,20 @@ + + usability.product.template.search + product.template + + + + + + + + + + + usability.product.category.tree From 5919d9b3c330b818db6d0cb459327e924efce928 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 31 Dec 2016 23:11:29 +0100 Subject: [PATCH 13/29] Add track_visibility on important product fields --- product_usability/product.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/product_usability/product.py b/product_usability/product.py index 709fe01..b5ebd67 100644 --- a/product_usability/product.py +++ b/product_usability/product.py @@ -5,9 +5,23 @@ from odoo import models, fields +class ProductTemplate(models.Model): + _inherit = 'product.template' + + name = fields.Char(track_visibility='onchange') + type = fields.Selection(track_visibility='onchange') + categ_id = fields.Many2one(track_visibility='onchange') + list_price = fields.Float(track_visibility='onchange') + sale_ok = fields.Boolean(track_visibility='onchange') + purchase_ok = fields.Boolean(track_visibility='onchange') + + class ProductProduct(models.Model): _inherit = 'product.product' + default_code = fields.Char(track_visibility='onchange') + barcode = fields.Char(track_visibility='onchange') + weight = fields.Float(track_visibility='onchange') price_history_ids = fields.One2many( 'product.price.history', 'product_id', string='Product Price History') From a2690bb146396db100d2d03feccd945f55470bb1 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 10 Jan 2017 17:51:15 +0100 Subject: [PATCH 14/29] Add menu entry on product.pricelist.item --- product_usability/product_view.xml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index 75c5fdf..ea35f06 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -137,5 +137,36 @@
+ + + usability.product.pricelist.item.search + product.pricelist.item + + + + + + + + + + + + + + + + + + + usability.product.pricelist.item.tree + product.pricelist.item + + + + + + + From 8b8dc005123d3c34aac0f03af0b0ae5805af0ad9 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 2 Mar 2017 09:18:12 +0100 Subject: [PATCH 15/29] Minor changes --- product_usability/product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product_usability/product.py b/product_usability/product.py index b5ebd67..ce91ef8 100644 --- a/product_usability/product.py +++ b/product_usability/product.py @@ -14,6 +14,7 @@ class ProductTemplate(models.Model): list_price = fields.Float(track_visibility='onchange') sale_ok = fields.Boolean(track_visibility='onchange') purchase_ok = fields.Boolean(track_visibility='onchange') + active = fields.Boolean(track_visibility='onchange') class ProductProduct(models.Model): @@ -22,6 +23,7 @@ class ProductProduct(models.Model): default_code = fields.Char(track_visibility='onchange') barcode = fields.Char(track_visibility='onchange') weight = fields.Float(track_visibility='onchange') + active = fields.Boolean(track_visibility='onchange') price_history_ids = fields.One2many( 'product.price.history', 'product_id', string='Product Price History') From 41bfd4fc6c76f8fb69522eaaf5fbb5e7061607cb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 6 Mar 2017 16:03:56 +0100 Subject: [PATCH 16/29] Improve product.supplierinfo view --- product_usability/product_view.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index ea35f06..30dd2ae 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -169,4 +169,29 @@
+ + + product.supplierinfo + + + + + + + + + + + + + + product.supplierinfo + + + + + + + + From fc29b2b4804d1ec22d78670bf2aee2067e0f2ebf Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sun, 21 May 2017 23:05:19 +0200 Subject: [PATCH 17/29] Add default value on company_id field of pricelist --- product_usability/__init__.py | 1 + product_usability/pricelist.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 product_usability/pricelist.py diff --git a/product_usability/__init__.py b/product_usability/__init__.py index d7d7308..00636ef 100644 --- a/product_usability/__init__.py +++ b/product_usability/__init__.py @@ -1,3 +1,4 @@ # -*- coding: utf-8 -*- from . import product +from . import pricelist diff --git a/product_usability/pricelist.py b/product_usability/pricelist.py new file mode 100644 index 0000000..0272efa --- /dev/null +++ b/product_usability/pricelist.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# © 2017 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields + + +class ProductPricelist(models.Model): + _inherit = 'product.pricelist' + + company_id = fields.Many2one( + default=lambda self: self.env['res.company']._company_default_get( + 'product.pricelist')) From ae9a73488ecc6983cce81a62cd26802487f1c1c8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 22 May 2017 20:57:33 +0200 Subject: [PATCH 18/29] mrp_average_cost: Fix decimal precision product_usability: add link to show history of standard price --- product_usability/product.py | 28 ++++++++++++++++++++++++++++ product_usability/product_view.xml | 16 +++++++--------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/product_usability/product.py b/product_usability/product.py index ce91ef8..fb15faa 100644 --- a/product_usability/product.py +++ b/product_usability/product.py @@ -16,6 +16,17 @@ class ProductTemplate(models.Model): purchase_ok = fields.Boolean(track_visibility='onchange') active = fields.Boolean(track_visibility='onchange') + def show_product_price_history(self): + self.ensure_one() + products = self.env['product.product'].search( + [('product_tmpl_id', '=', self._context['active_id'])]) + action = self.env['ir.actions.act_window'].for_xml_id( + 'product_usability', 'product_price_history_action') + action.update({ + 'domain': "[('id', 'in', %s)]" % products.ids, + }) + return action + class ProductProduct(models.Model): _inherit = 'product.product' @@ -38,9 +49,26 @@ class ProductProduct(models.Model): 'unique(default_code)', 'This internal reference already exists!')] + def show_product_price_history(self): + self.ensure_one() + action = self.env['ir.actions.act_window'].for_xml_id( + 'product_usability', 'product_price_history_action') + action.update({ + 'domain': "[('product_id', '=', %d)]" % self.ids[0], + }) + return action + class ProductSupplierinfo(models.Model): _inherit = 'product.supplierinfo' name = fields.Many2one( domain=[('supplier', '=', True), ('parent_id', '=', False)]) + + +class ProductPriceHistory(models.Model): + _inherit = 'product.price.history' + + company_currency_id = fields.Many2one( + related='company_id.currency_id', readonly=True, + string='Company Currency') diff --git a/product_usability/product_view.xml b/product_usability/product_view.xml index 30dd2ae..7079743 100644 --- a/product_usability/product_view.xml +++ b/product_usability/product_view.xml @@ -16,8 +16,9 @@ - + +
@@ -30,8 +31,9 @@ - + +
@@ -67,13 +69,9 @@ product.template - + +