forked from OCA/connector-magento
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OCA#112 from camptocamp/1.2.17
1.2.17
- Loading branch information
Showing
15 changed files
with
825 additions
and
5 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Scenario/OERPScenario.local/features/upgrade/1.2.17/upgrade.feature
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,17 @@ | ||
# -*- coding: utf-8 -*- | ||
@upgrade_to_1.2.17 @debonix | ||
|
||
Feature: upgrade to 1.2.17 | ||
|
||
Scenario: upgrade application version | ||
Given I update the module list | ||
Given I install the required modules with dependencies: | ||
| name | | ||
| base_delivery_carrier_files | | ||
| specific_function | | ||
| delivery_carrier_file_chronopost | | ||
| delivery_carrier_label_colisprive | | ||
| delivery_carrier_file_colissimo | | ||
Then my modules should have been installed and models reloaded | ||
|
||
Given I set the version of the instance to "1.2.17" |
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
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
25 changes: 25 additions & 0 deletions
25
specific-parts/specific-addons/delivery_carrier_file_colissimo/__init__.py
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,25 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Author: Charline Dumontet | ||
# Copyright 2017 Camptocamp SA | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## | ||
|
||
import carrier_file | ||
import generator | ||
import res_company | ||
import stock |
48 changes: 48 additions & 0 deletions
48
specific-parts/specific-addons/delivery_carrier_file_colissimo/__openerp__.py
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 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Author: Charline Dumontet | ||
# Copyright 2017 Camptocamp SA | ||
# | ||
# 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': 'Delivery Carrier File: Colissimo', | ||
'version': '1.0', | ||
'category': 'Generic Modules/Warehouse', | ||
'description': """ | ||
Sub-module for Base Delivery Carrier Files. | ||
Definition of the delivery carrier file for "Colissimo". | ||
""", | ||
'author': 'Camptocamp', | ||
'license': 'AGPL-3', | ||
'website': 'http://www.camptocamp.com', | ||
'depends': ['base_delivery_carrier_files', | ||
'connector_ecommerce', | ||
'import_tracking', | ||
'crm_claim',], | ||
'data': [ | ||
'data/colissimo_data.xml', | ||
'carrier_file_view.xml', | ||
'res_company_view.xml' | ||
], | ||
'test': [], | ||
'images': [], | ||
'installable': True, | ||
'auto_install': False, | ||
} |
53 changes: 53 additions & 0 deletions
53
specific-parts/specific-addons/delivery_carrier_file_colissimo/carrier_file.py
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,53 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Author: Charline Dumontet | ||
# Copyright 2017 Camptocamp SA | ||
# | ||
# 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.osv import orm, fields | ||
|
||
|
||
class carrier_file(orm.Model): | ||
_inherit = 'delivery.carrier.file' | ||
|
||
def get_type_selection(self, cr, uid, context=None): | ||
""" | ||
Add colissimo type | ||
""" | ||
result = super(carrier_file, self).get_type_selection( | ||
cr, uid, context=context) | ||
if 'colissimo' not in result: | ||
result.append(('colissimo', 'Colissimo')) | ||
return result | ||
|
||
|
||
class DeliveryCarrier(orm.Model): | ||
_inherit = 'delivery.carrier' | ||
|
||
def _get_carrier_type_selection(self, cr, uid, context=None): | ||
""" Add colissimo type """ | ||
res = super(DeliveryCarrier, self)._get_carrier_type_selection( | ||
cr, uid, context=context) | ||
if 'colissimo' not in res: | ||
res.append(('colissimo', 'Colissimo')) | ||
return res | ||
|
||
_columns = { | ||
'product_code': fields.char('Product code', size=4), | ||
'expeditor_name': fields.char('Expeditor name', size=128), | ||
} |
23 changes: 23 additions & 0 deletions
23
specific-parts/specific-addons/delivery_carrier_file_colissimo/carrier_file_view.xml
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,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<record id="view_delivery_carrier_form_colissimo" model="ir.ui.view"> | ||
<field name="name">view_delivery_carrier_form_colissimo</field> | ||
<field name="model">delivery.carrier</field> | ||
<field name="inherit_id" ref="delivery.view_delivery_carrier_form" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="/form/group/group[last()]" position="after"> | ||
<group name="colissimo_options" | ||
attrs="{'invisible': [('type', '!=', 'colissimo')]}" | ||
colspan="4" col="4"> | ||
<separator string="Colissimo Options" colspan="4"/> | ||
<field name="product_code" attrs="{'required': [('type', '=', 'colissimo')]}"/> | ||
<field name="expeditor_name" attrs="{'required': [('type', '=', 'colissimo')]}"/> | ||
</group> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
51 changes: 51 additions & 0 deletions
51
specific-parts/specific-addons/delivery_carrier_file_colissimo/data/colissimo_data.xml
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,51 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data noupdate="1"> | ||
|
||
<!-- Add colissimo claim category --> | ||
<record model="crm.case.categ" id="categ_claim_colissimo_incident"> | ||
<field name="name">Colissimo - Erreur expedition</field> | ||
<field name="section_id" ref="stockit_synchro.section_stockit_error"/> | ||
<field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | ||
</record> | ||
|
||
<!-- Add colissimo partner --> | ||
<record id="colissimo_partner" model="res.partner"> | ||
<field name="name">COLISSIMO</field> | ||
<field name="country_id" search="[('code','=','FR')]" model="res.country"/> | ||
</record> | ||
|
||
<record id="ir_cron_colissimo_tracking_ref_update" model="ir.cron"> | ||
<field name="name">Import Colissimo tracking references</field> | ||
<field name="interval_number">6</field> | ||
<field name="interval_type">hours</field> | ||
<field name="numbercall">-1</field> | ||
<field eval="False" name="doall"/> | ||
<field eval="'stock.picking'" name="model"/> | ||
<field eval="'import_colissimo_tracking_references'" name="function"/> | ||
<field eval="'()'" name="args"/> | ||
</record> | ||
|
||
<!--Colissimo error Email template --> | ||
<record id="colissimo_import_error_template_mail" model="email.template"> | ||
<field name="name">Colissimo tracking errors</field> | ||
<field name="email_from">contact@debonix.fr</field> | ||
<field name="email_recipients"></field> | ||
<field name="subject">Error with Colissimo tracking </field> | ||
<field name="email_to">info-dsi@debonix.fr</field> | ||
<field name="model_id" ref="crm_claim.model_crm_claim"/> | ||
<field name="auto_delete" eval="True"/> | ||
<field name="lang">${user.lang or 'fr_FR'}</field> | ||
<field name="body_html"><![CDATA[ | ||
<div style="font-family: 'Lucida Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; "> | ||
<p>Hello,</p> | ||
<p>There was an error with the colissimo import tracking number</p> | ||
</div> | ||
]]></field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |
22 changes: 22 additions & 0 deletions
22
specific-parts/specific-addons/delivery_carrier_file_colissimo/generator/__init__.py
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 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Author: Charline Dumontet | ||
# Copyright 2017 Camptocamp SA | ||
# | ||
# 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/>. | ||
# | ||
############################################################################## | ||
|
||
import colissimo_generator |
Oops, something went wrong.