-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
71 lines (40 loc) · 2.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Jeame Media OESync 0.1.2
Jonathan Binas, www.jeame.com
This app connects Satchmo to OpenERP and synchronizes specific models via XML-RPC.
Besides synchronization of products, categories and addresses, this allows the automatic creation of orders, invoices, and payments in OpenErp. The mapping is fully customizable and can be altered to suit your needs.
In the current version, the synchronization is unidirectional (Satchmo -> OpenERP). The other direction should follow soon, though.
INSTALL
=======
Required Python packages:
- Intall the OpenERP client library for python, e.g.
easy_install openerp-client-lib
Required OpenERP addons:
- Install the product_m2mcategories addon
A modified version of the addon for OE 7 is included in this package
Installing the Satchmo app
- Copy oesync to your store directory
- Add 'oesync' to your INSTALLED_APPS in the Satchmo settings.
- Add oesync settings to your local_settings.py:
OPENERP_SETTINGS = {
'HOST' : 'your.openerp.server',
'PORT' : 8069,
'DB' : 'YourOpenErpDB',
'USER' : 'username',
'PASSWORD' : 'password',
'MODE': 'live', #Set this to 'live', or 'manual' (see Usage section below)
'CURRENCY_ID': 1, #OpenErp currency id to be used
'ACCOUNT_ID': 1836, #OpenErp account id new invoices shall be associated with
'JOURNAL_ID': 20, #OpenErp journal id new invoices shall be associated with
}
CONFIGURATION
=============
In its standard configuration, oesync synchronizes AddressBook, Organization, Country, Category, Product, Order and OrderItem objects. However, the mapping of Satchmo models to OpenErp models is flexible and can be fully customized in 'mapping_config.py'.
See 'mapping_config.py' for details.
USAGE
=====
If 'MODE' is set to 'live', all models specified in the mapping are synced automatically whenever they change. Setting 'MODE' to 'manual' allows to trigger the synchronization manually via the admin or a cron.
Synced objects are kept track of in the ObjMapper model (accessible via the admin). If things go wrong, the relevant objects are marked as 'dirty'. Individual objects can be synced in the admin via the 'Sync selected objects' action.
To trigger synchronization of all unsynced objects manually (e.g. by a cron) do the following:
from oesync.listeners import syncnow
syncnow()
Future versions of this app should send emails to notify users of failed synchronizations.