forked from vandekul/addons-zynthian
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Module:Related Partner Country for sale order and invoce documents
- Loading branch information
vandekul
committed
Jun 2, 2021
1 parent
3ae648e
commit 1b9a82e
Showing
6 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#****************************************************************************** | ||
# ZYNTHIAN SALE ORDER | ||
# | ||
# Copyright (C) 2020 Susanna Fort <[email protected]> | ||
# | ||
#****************************************************************************** | ||
# | ||
# 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'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import sale | ||
import invoice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
22 changes: 22 additions & 0 deletions
22
zynthian_related_partner_country/static/description/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html xmlns="http://www.w3.org/1999/html"> | ||
<body> | ||
|
||
<section class="oe_container"> | ||
<div class="oe_row oe_spaced"> | ||
<h2 class="oe_slogan">Zynthian Related Partner Country</h2> | ||
<h3 class="oe_slogan">This is the module that allows to filter by Partner Country in Odoo 9.0</h3> | ||
<div class="oe_span6"> | ||
<!--<div class="oe_bg_img"> | ||
<img src="Btcpay_com.png" class="oe_picture oe_screenshot"> | ||
</div>--> | ||
</div> | ||
<div"> | ||
<p> | ||
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. | ||
</p> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
</body> | ||
</html> |