diff --git a/zynthian_related_partner_country/__init__.py b/zynthian_related_partner_country/__init__.py new file mode 100644 index 0000000..2c4eac3 --- /dev/null +++ b/zynthian_related_partner_country/__init__.py @@ -0,0 +1 @@ +import models \ No newline at end of file diff --git a/zynthian_related_partner_country/__openerp__.py b/zynthian_related_partner_country/__openerp__.py new file mode 100644 index 0000000..2d0cb8b --- /dev/null +++ b/zynthian_related_partner_country/__openerp__.py @@ -0,0 +1,37 @@ +#****************************************************************************** +# ZYNTHIAN SALE ORDER +# +# Copyright (C) 2020 Susanna Fort +# +#****************************************************************************** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or 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 General Public License for more details. +# +# For a full copy of the GNU General Public License see the LICENSE.txt file. +# +#****************************************************************************** + +{ + 'name': "Zynthian Related Partner Country", + + 'summary': """This module modify sale order model Odoo v9.0""", + 'author': "Vandekul", + 'website': "https://github.com/vandekul", + 'category': 'Sale Order', + 'version': '9.0', + 'license': 'GPL-3', + 'application': True, + 'depends': ['base','sale','account'], + 'installable': True, + 'auto_install': False, + 'description': 'static/description/index.html', + 'images': ['static/description/icon.png'], +} \ No newline at end of file diff --git a/zynthian_related_partner_country/models/__init__.py b/zynthian_related_partner_country/models/__init__.py new file mode 100644 index 0000000..85b7de6 --- /dev/null +++ b/zynthian_related_partner_country/models/__init__.py @@ -0,0 +1,2 @@ +import sale +import invoice \ No newline at end of file diff --git a/zynthian_related_partner_country/models/invoice.py b/zynthian_related_partner_country/models/invoice.py new file mode 100644 index 0000000..19ecab4 --- /dev/null +++ b/zynthian_related_partner_country/models/invoice.py @@ -0,0 +1,34 @@ +#****************************************************************************** +# Sale Order ODOO +# +# +#****************************************************************************** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or 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 General Public License for more details. +# +# For a full copy of the GNU General Public License see the LICENSE.txt file. +# +#****************************************************************************** + +from openerp import api, fields, models, _ +from openerp.osv import osv + +import logging +import pprint +from openerp.http import request +from openerp import http, SUPERUSER_ID + +_logger = logging.getLogger(__name__) + +class AccountInvoice(models.Model): + _inherit = "account.invoice" + + related_partner_country = fields.Char("Customer Country", related="partner_id.country_id.name", store=True) \ No newline at end of file diff --git a/zynthian_related_partner_country/models/sale.py b/zynthian_related_partner_country/models/sale.py new file mode 100644 index 0000000..54f1352 --- /dev/null +++ b/zynthian_related_partner_country/models/sale.py @@ -0,0 +1,34 @@ +#****************************************************************************** +# Sale Order ODOO +# +# +#****************************************************************************** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or 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 General Public License for more details. +# +# For a full copy of the GNU General Public License see the LICENSE.txt file. +# +#****************************************************************************** + +from openerp import api, fields, models, _ +from openerp.osv import osv + +import logging +import pprint +from openerp.http import request +from openerp import http, SUPERUSER_ID + +_logger = logging.getLogger(__name__) + +class SaleOrder(models.Model): + _inherit = "sale.order" + + related_partner_country = fields.Char("Customer Country", related="partner_id.country_id.name", store=True) \ No newline at end of file diff --git a/zynthian_related_partner_country/static/description/index.html b/zynthian_related_partner_country/static/description/index.html new file mode 100644 index 0000000..1cdd5a8 --- /dev/null +++ b/zynthian_related_partner_country/static/description/index.html @@ -0,0 +1,22 @@ + + + +
+
+

Zynthian Related Partner Country

+

This is the module that allows to filter by Partner Country in Odoo 9.0

+
+ +
+ +

+ This module allows that you can filter and group by Partner Country in the invoice and sale order lists documents. Don't show this field in list view. +

+
+ +
+ + + \ No newline at end of file