Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
275 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,48 @@ | ||
Reason To Export | ||
================ | ||
|
||
This module adds a selection field named x_reason (Reason to export for | ||
customs purpose) in the sale order forms. | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to: | ||
|
||
* Go to Sales -> Configuration -> Sales -> Reasons to Export | ||
* Add reasons to export | ||
|
||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Jean-Philippe JOBIN <jobinrobotiq@gmail.com> | ||
* David DUFRESNE <david.dufresne@savoirfairelinux.com> | ||
* Jordi RIERA <jordi.riera@savoirfairelinux.com> | ||
* Bruno JOLIVEAU <bruno.joliveau@savoirfairelinux.com> | ||
|
||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
To contribute to this module, please visit http://odoo-community.org. | ||
|
||
|
||
* Module exported by the Module Prototyper module for version 8.0. | ||
* If you have any questions, please contact Savoir-faire Linux | ||
(support@savoirfairelinux.com) | ||
""" |
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,24 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# This module copyright (C) 2015 JPJ | ||
# ( http://www.savoirfairelinux.com). | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from . 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,47 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# This module copyright (C) 2015 JPJ | ||
# ( http://www.savoirfairelinux.com). | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
{ | ||
'name': 'CRM Reason to Export', | ||
'version': '0.1', | ||
'author': 'Jean-Philippe Jobin', | ||
'maintainer': 'Savoir-faire Linux', | ||
'website': ' http://www.savoirfairelinux.com', | ||
'license': '', | ||
'category': 'CRM', | ||
'summary': 'Reason to export in Sales Order', | ||
'depends': [ | ||
'sale_crm', | ||
], | ||
'external_dependencies': { | ||
'python': [], | ||
}, | ||
|
||
'data': [ | ||
'views/sale_order_view.xml', | ||
'views/crm_reason_to_export_view.xml', | ||
], | ||
|
||
'installable': True, | ||
'auto_install': False, | ||
'application': False, | ||
} |
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,26 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# This module copyright (C) 2015 JPJ | ||
# ( http://www.savoirfairelinux.com). | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from . import ( | ||
sale_order, | ||
reason_to_export, | ||
) |
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,33 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# This module copyright (C) 2015 JPJ | ||
# ( http://www.savoirfairelinux.com). | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from openerp import models, fields | ||
|
||
|
||
class CrmReasonToExport(models.Model): | ||
_name = "crm.reason_to_export" | ||
_description = "Reason to Export" | ||
|
||
name = fields.Char(translate=True, required=True) | ||
active = fields.Boolean(default=True) | ||
|
||
_order = 'name' |
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,32 @@ | ||
# -*- encoding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# This module copyright (C) 2015 JPJ | ||
# ( http://www.savoirfairelinux.com). | ||
# | ||
# 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 <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
from openerp import models, fields | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = "sale.order" | ||
|
||
reason_to_export_id = fields.Many2one( | ||
comodel_name="crm.reason_to_export", | ||
string="Reason to Export", | ||
) |
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,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_crm_reason_to_export_user,crm.reason_to_export.user,model_crm_reason_to_export,base.group_sale_salesman,1,0,0,0 | ||
access_crm_reason_to_export_manager,crm.reason_to_export.manager,model_crm_reason_to_export,base.group_sale_manager,1,1,1,1 |
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,40 @@ | ||
<?xml version="1.0"?> | ||
<openerp> | ||
<data> | ||
|
||
<record id="view_reason_to_export_tree" model="ir.ui.view"> | ||
<field name="name">crm.reason_to_export.tree</field> | ||
<field name="model">crm.reason_to_export</field> | ||
<field name="arch" type="xml"> | ||
<tree editable="top"> | ||
<field name="name"/> | ||
<field name="active"/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="view_crm_reason_to_export_filter" model="ir.ui.view"> | ||
<field name="name">CRM - Reasons to Export</field> | ||
<field name="model">crm.reason_to_export</field> | ||
<field name="arch" type="xml"> | ||
<search string="Search Reasons to Export"> | ||
<field name="name"/> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record id="action_crm_reason_to_export_view" model="ir.actions.act_window"> | ||
<field name="name">Reasons to Export</field> | ||
<field name="res_model">crm.reason_to_export</field> | ||
<field name="view_id" eval="view_reason_to_export_tree"/> | ||
<field name="search_view_id" ref="view_crm_reason_to_export_filter"/> | ||
</record> | ||
|
||
<menuitem | ||
action="action_crm_reason_to_export_view" id="menu_crm_reason_to_export_act" | ||
name="Reasons to Export" sequence="0" | ||
parent="base.menu_sale_config_sales" | ||
groups="base.group_sale_manager"/> | ||
|
||
</data> | ||
</openerp> |
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 @@ | ||
<?xml version="1.0"?> | ||
<openerp> | ||
<data> | ||
|
||
<record id="view_sale_order_form" model="ir.ui.view"> | ||
<field name="name">sale.order.form</field> | ||
<field name="model">sale.order</field> | ||
<field name="inherit_id" ref="sale.view_order_form"/> | ||
<field name="arch" type="xml"> | ||
<group name="sale_total" position="after"> | ||
<group col="4"> | ||
<group> | ||
<field name="reason_to_export_id"/> | ||
</group> | ||
<group></group> | ||
</group> | ||
</group> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |