1
1
# -*- coding: utf-8 -*-
2
#########################################################################
3
#This module intergrates Open ERP with the magento core #
4
#Core settings are stored here #
5
#########################################################################
7
# Copyright (C) 2011-2013 Akretion Sébastien Beau #
8
# Copyright (C) 2011-2013 Camptocamp Guewen Baconnier #
10
#This program is free software: you can redistribute it and/or modify #
11
#it under the terms of the GNU General Public License as published by #
12
#the Free Software Foundation, either version 3 of the License, or #
13
#(at your option) any later version. #
15
#This program is distributed in the hope that it will be useful, #
16
#but WITHOUT ANY WARRANTY; without even the implied warranty of #
17
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
18
#GNU General Public License for more details. #
20
#You should have received a copy of the GNU General Public License #
21
#along with this program. If not, see <http://www.gnu.org/licenses/>. #
22
#########################################################################
2
##############################################################################
4
# Author: Guewen Baconnier
5
# Copyright 2013 Camptocamp SA
6
# Copyright 2013 Akretion
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU Affero General Public License as
10
# published by the Free Software Foundation, either version 3 of the
11
# License, or (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU Affero General Public License for more details.
18
# You should have received a copy of the GNU Affero General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
25
24
from datetime import datetime
27
26
from openerp.osv import fields, orm
30
27
from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
31
28
import openerp.addons.connector as connector
32
29
from openerp.addons.connector.session import ConnectorSession
367
364
'A storeview with same ID on Magento already exists.'),
371
367
def import_sale_orders(self, cr, uid, ids, context=None):
372
368
session = ConnectorSession(cr, uid, context=context)
373
369
import_start_time = datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)