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])] - - +