diff --git a/pos_pricelist/__openerp__.py b/pos_pricelist/__openerp__.py index c7d9a106..90954c31 100644 --- a/pos_pricelist/__openerp__.py +++ b/pos_pricelist/__openerp__.py @@ -1,27 +1,16 @@ # -*- coding: utf-8 -*- -############################################################################## -# Point Of Sale - Pricelist for POS Odoo -# Copyright (C) 2014 Taktik (http://www.taktik.be) -# @author Adil Houmadi -# -# 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 . -# -############################################################################## +# © 2014-2015 Taktik (http://www.taktik.be) - Adil Houmadi +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + { 'name': 'POS Pricelist', - 'version': '8.0.1.2.0', + 'version': '8.0.1.3.0', 'category': 'Point Of Sale', 'sequence': 1, - 'author': "Adil Houmadi @Taktik,Odoo Community Association (OCA)", + 'author': "Adil Houmadi @Taktik, " + "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "Odoo Community Association (OCA)", 'summary': 'Pricelist for Point of sale', 'depends': [ "point_of_sale", @@ -32,6 +21,7 @@ "views/point_of_sale_view.xml", "report/report_receipt.xml", "security/ir.model.access.csv", + "security/account_fiscal_position_security.xml", ], 'demo': [ 'demo/pos_pricelist_demo.yml', @@ -41,6 +31,4 @@ ], 'post_init_hook': "set_pos_line_taxes", 'installable': True, - 'application': False, - 'auto_install': False, } diff --git a/pos_pricelist/models/__init__.py b/pos_pricelist/models/__init__.py index e139cc36..9d729a0a 100644 --- a/pos_pricelist/models/__init__.py +++ b/pos_pricelist/models/__init__.py @@ -1,20 +1,8 @@ # -*- coding: utf-8 -*- -############################################################################## -# Point Of Sale - Pricelist for POS Odoo -# Copyright (C) 2015 Taktik (http://www.taktik.be) -# @author Adil Houmadi -# -# 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 . -# -############################################################################## +# © 2015 Taktik (http://www.taktik.be) - Adil Houmadi +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import account_fiscal_position from . import pos_pricelist from . import point_of_sale diff --git a/pos_pricelist/models/account_fiscal_position.py b/pos_pricelist/models/account_fiscal_position.py new file mode 100644 index 00000000..a640af9e --- /dev/null +++ b/pos_pricelist/models/account_fiscal_position.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# © 2016 Serv. Tecnol. Avanzados - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import fields, models + + +class AccountFiscalPositionTax(models.Model): + _inherit = "account.fiscal.position.tax" + + company_id = fields.Many2one( + related="position_id.company_id", string="Company") diff --git a/pos_pricelist/security/account_fiscal_position_security.xml b/pos_pricelist/security/account_fiscal_position_security.xml new file mode 100644 index 00000000..af85d9ed --- /dev/null +++ b/pos_pricelist/security/account_fiscal_position_security.xml @@ -0,0 +1,13 @@ + + + + + + + Account fiscal position tax multi-company + + ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])] + + + +