Merge lp:~mikel-martin/openobject-addons/extra-5.0_esale_osc_enhancement into lp:openobject-addons/extra-5.0
- extra-5.0_esale_osc_enhancement
- Merge into stable_5.0-extra-addons
Status: | Needs review |
---|---|
Proposed branch: | lp:~mikel-martin/openobject-addons/extra-5.0_esale_osc_enhancement |
Merge into: | lp:openobject-addons/extra-5.0 |
Diff against target: |
4794 lines (+1651/-1634) (has conflicts) 13 files modified
.bzrignore (+4/-0) esale_osc/__terp__.py (+8/-2) esale_osc/connector/ZhenIT_zencart_compatibility_functions.php (+244/-0) esale_osc/connector/openerp-synchro.php (+371/-521) esale_osc/connector/openerp_login.php (+41/-0) esale_osc/connector/openerp_runonce.php (+10/-0) esale_osc/esale_oscom.py (+348/-326) esale_osc/esale_oscom_product.py (+13/-7) esale_osc/esale_oscom_view.xml (+375/-372) esale_osc/esale_oscom_workflow.xml (+0/-230) esale_osc/i18n/es_ES.po (+36/-6) esale_osc/i18n/esale_osc.pot (+200/-170) esale_osc/wizard/wizard_esale_oscom_update_select_stocks.py (+1/-0) Path conflict: <deleted> / account_product_fiscal_classification.py Path conflict: <deleted> / __init__.py Path conflict: <deleted> / product_view.xml Path conflict: <deleted> / __terp__.py Contents conflict in esale_osc/i18n/es.po |
To merge this branch: | bzr merge lp:~mikel-martin/openobject-addons/extra-5.0_esale_osc_enhancement |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+21279@code.launchpad.net |
Commit message
Description of the change
- 6. By mikel <mikel@pcl2>
-
ok
- 7. By mikel <mikel@pcl2>
-
Merge totnto
- 8. By mikel <mikel@pcl2>
-
Fix oscom_prod_url qhen not oscommerce o not in root folder
Fix import multiple variants qhen options value name is different in different languages
Add option to avoid syncronization of shop products whit openerp's maodifies data
Unmerged revisions
- 8. By mikel <mikel@pcl2>
-
Fix oscom_prod_url qhen not oscommerce o not in root folder
Fix import multiple variants qhen options value name is different in different languages
Add option to avoid syncronization of shop products whit openerp's maodifies data - 7. By mikel <mikel@pcl2>
-
Merge totnto
- 6. By mikel <mikel@pcl2>
-
ok
- 5. By mikel <mikel@pcl2>
-
Ability to define a default category for imported partners
added:
.bzrignore
modified:
esale_osc/connector/ openerp- synchro. php
esale_osc/esale_ oscom.py
esale_osc/esale_ oscom_view. xml
esale_osc/i18n/ es_ES.po
esale_osc/i18n/ esale_osc. pot - 4. By mikel <mikel@pcl2>
-
Comentarios idiomas y bug en sincronización de descripciones de productos
removed:
esale_osc/i18n/ es.po
modified:
esale_osc/__terp_ _.py
esale_osc/connector/ openerp- synchro. php
esale_osc/i18n/ es_ES.po*
esale_osc/i18n/ esale_osc. pot* - 3. By mikel <mikel@pcl2>
-
changes in credits
- 2. By mikel <mikel@pcl2>
-
missing files
- 1. By mikel <mikel@pcl2>
-
Added to esale_osc:
- ZenCart compatibility
- osCommerce admin authentication
Preview Diff
1 | === added file '.bzrignore' | |||
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 | |||
3 | +++ .bzrignore 2010-07-21 10:31:39 +0000 | |||
4 | @@ -0,0 +1,4 @@ | |||
5 | 1 | .orig | ||
6 | 2 | *.orig | ||
7 | 3 | *.pyc | ||
8 | 4 | *~ | ||
9 | 0 | 5 | ||
10 | === modified file 'esale_osc/__terp__.py' | |||
11 | --- esale_osc/__terp__.py 2009-11-16 19:09:09 +0000 | |||
12 | +++ esale_osc/__terp__.py 2010-07-21 10:31:39 +0000 | |||
13 | @@ -1,3 +1,4 @@ | |||
14 | 1 | # -*- coding: utf-8 -*- | ||
15 | 1 | # -*- encoding: utf-8 -*- | 2 | # -*- encoding: utf-8 -*- |
16 | 2 | ############################################################################## | 3 | ############################################################################## |
17 | 3 | # | 4 | # |
18 | @@ -23,7 +24,7 @@ | |||
19 | 23 | 24 | ||
20 | 24 | { | 25 | { |
21 | 25 | "name" : "OScommerce Interface / ZenCart", | 26 | "name" : "OScommerce Interface / ZenCart", |
23 | 26 | "version" : "1.0", | 27 | "version" : "1.5", |
24 | 27 | "author" : "Axelor/Zikzakmedia", | 28 | "author" : "Axelor/Zikzakmedia", |
25 | 28 | "license" : "GPL-3", | 29 | "license" : "GPL-3", |
26 | 29 | "category" : "Interfaces/CMS & eCommerce", | 30 | "category" : "Interfaces/CMS & eCommerce", |
27 | @@ -41,7 +42,12 @@ | |||
28 | 41 | 2. Export Stocks. | 42 | 2. Export Stocks. |
29 | 42 | 3. Change Oscommerce Order status and include comments. Upload Osc Status and comments. | 43 | 3. Change Oscommerce Order status and include comments. Upload Osc Status and comments. |
30 | 43 | 44 | ||
32 | 44 | Developed by Tiny, Axelor, Zikzakmedia and Ana Juaristi""", | 45 | New in this version (1.5.0): |
33 | 46 | * User validation at store's administration | ||
34 | 47 | * Out of the box ZenCart compatibility | ||
35 | 48 | * Encoding isues | ||
36 | 49 | |||
37 | 50 | Developed by Tiny, Axelor, Zikzakmedia, Ana Juaristi and ZhenIT Software""", | ||
38 | 45 | "init_xml" : [], | 51 | "init_xml" : [], |
39 | 46 | "demo_xml" : [], | 52 | "demo_xml" : [], |
40 | 47 | "update_xml" : [ | 53 | "update_xml" : [ |
41 | 48 | 54 | ||
42 | === added file 'esale_osc/connector/ZhenIT_zencart_compatibility_functions.php' | |||
43 | --- esale_osc/connector/ZhenIT_zencart_compatibility_functions.php 1970-01-01 00:00:00 +0000 | |||
44 | +++ esale_osc/connector/ZhenIT_zencart_compatibility_functions.php 2010-07-21 10:31:39 +0000 | |||
45 | @@ -0,0 +1,244 @@ | |||
46 | 1 | <? | ||
47 | 2 | /* | ||
48 | 3 | OsCommerce/Zencart Compatibility Payment Module Copyright (c) 2010 ZhenIT Software | ||
49 | 4 | |||
50 | 5 | Valid for osCommerce, Zencart & soon for xt:commerce | ||
51 | 6 | |||
52 | 7 | http://ZhenIT.com | ||
53 | 8 | info@ZhenIT.com | ||
54 | 9 | |||
55 | 10 | Released under the GNU General Public License | ||
56 | 11 | |||
57 | 12 | No se limita la reutilización o mejora de este código pero se ruega | ||
58 | 13 | se mantengan los créditos y las referencias a ZhenIT, tanto las | ||
59 | 14 | explícitas como en los nombres de ficheros o de funciones. | ||
60 | 15 | |||
61 | 16 | */ | ||
62 | 17 | define('PLATAFORMA','zen'); | ||
63 | 18 | define("IS_ADMIN_FLAG","true"); | ||
64 | 19 | // include("../".DIR_WS_CLASSES."class.base.php"); | ||
65 | 20 | // require("../".DIR_WS_CLASSES."db/" .DB_TYPE . '/query_factory.php'); | ||
66 | 21 | // $db = new queryFactory(); | ||
67 | 22 | // $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false); | ||
68 | 23 | if (file_exists("../".DIR_WS_INCLUDES."compat_ZhenIT/ZhenIT_zencart_compatibility_functions.php")){ | ||
69 | 24 | include_once("../".DIR_WS_INCLUDES."compat_ZhenIT/ZhenIT_zencart_compatibility_functions.php"); | ||
70 | 25 | }else{ | ||
71 | 26 | function tep_db_query($query) | ||
72 | 27 | { | ||
73 | 28 | global $db; | ||
74 | 29 | return($db->Execute($query)); | ||
75 | 30 | } | ||
76 | 31 | |||
77 | 32 | function tep_db_fetch_array(&$query){ | ||
78 | 33 | if(!$query->EOF){ | ||
79 | 34 | $array = $query->fields; | ||
80 | 35 | $query->MoveNext(); | ||
81 | 36 | return $array; | ||
82 | 37 | } | ||
83 | 38 | return false; | ||
84 | 39 | } | ||
85 | 40 | |||
86 | 41 | function tep_db_num_rows($query) | ||
87 | 42 | { | ||
88 | 43 | return($query->RecordCount()); | ||
89 | 44 | } | ||
90 | 45 | |||
91 | 46 | function tep_db_input($string) { | ||
92 | 47 | if (function_exists('mysql_escape_string')) { | ||
93 | 48 | return mysql_escape_string($string); | ||
94 | 49 | } | ||
95 | 50 | return addslashes($string); | ||
96 | 51 | } | ||
97 | 52 | |||
98 | 53 | function tep_db_perform($table, $data, $action = 'insert', $parameters = '') { | ||
99 | 54 | reset($data); | ||
100 | 55 | if ($action == 'insert') { | ||
101 | 56 | $query = 'insert into ' . $table . ' ('; | ||
102 | 57 | while (list($columns, ) = each($data)) { | ||
103 | 58 | $query .= $columns . ', '; | ||
104 | 59 | } | ||
105 | 60 | $query = substr($query, 0, -2) . ') values ('; | ||
106 | 61 | reset($data); | ||
107 | 62 | while (list(, $value) = each($data)) { | ||
108 | 63 | switch ((string)$value) { | ||
109 | 64 | case 'now()': | ||
110 | 65 | $query .= 'now(), '; | ||
111 | 66 | break; | ||
112 | 67 | case 'null': | ||
113 | 68 | $query .= 'null, '; | ||
114 | 69 | break; | ||
115 | 70 | default: | ||
116 | 71 | $query .= '\'' . tep_db_input($value) . '\', '; | ||
117 | 72 | break; | ||
118 | 73 | } | ||
119 | 74 | } | ||
120 | 75 | $query = substr($query, 0, -2) . ')'; | ||
121 | 76 | } elseif ($action == 'update') { | ||
122 | 77 | $query = 'update ' . $table . ' set '; | ||
123 | 78 | while (list($columns, $value) = each($data)) { | ||
124 | 79 | switch ((string)$value) { | ||
125 | 80 | case 'now()': | ||
126 | 81 | $query .= $columns . ' = now(), '; | ||
127 | 82 | break; | ||
128 | 83 | case 'null': | ||
129 | 84 | $query .= $columns .= ' = null, '; | ||
130 | 85 | break; | ||
131 | 86 | default: | ||
132 | 87 | $query .= $columns . ' = \'' . tep_db_input($value) . '\', '; | ||
133 | 88 | break; | ||
134 | 89 | } | ||
135 | 90 | } | ||
136 | 91 | $query = substr($query, 0, -2) . ' where ' . $parameters; | ||
137 | 92 | } | ||
138 | 93 | |||
139 | 94 | return tep_db_query($query); | ||
140 | 95 | } | ||
141 | 96 | |||
142 | 97 | function tep_db_insert_id() { | ||
143 | 98 | return mysql_insert_id(); | ||
144 | 99 | } | ||
145 | 100 | |||
146 | 101 | function tep_draw_hidden_field($name, $value = '', $parameters = '') { | ||
147 | 102 | return zen_draw_hidden_field($name,$value,$parameters); | ||
148 | 103 | } | ||
149 | 104 | |||
150 | 105 | function tep_redirect($url) { | ||
151 | 106 | zen_redirect($url); | ||
152 | 107 | } | ||
153 | 108 | |||
154 | 109 | function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { | ||
155 | 110 | return zen_href_link($page , $parameters, $connection , $add_session_id , $search_engine_safe); | ||
156 | 111 | } | ||
157 | 112 | |||
158 | 113 | function tep_cfg_pull_down_zone_classes($zone_class_id, $key = '') { | ||
159 | 114 | return zen_cfg_pull_down_zone_classes($zone_class_id, $key); | ||
160 | 115 | } | ||
161 | 116 | function tep_cfg_pull_down_order_statuses($zone_class_id, $key = '') { | ||
162 | 117 | return zen_cfg_pull_down_order_statuses($zone_class_id, $key); | ||
163 | 118 | } | ||
164 | 119 | function tep_get_order_status_name($zone_class_id, $key = '') { | ||
165 | 120 | return zen_get_order_status_name($zone_class_id, $key); | ||
166 | 121 | } | ||
167 | 122 | function tep_get_zone_class_title($zone_class_id, $key = '') { | ||
168 | 123 | return zen_get_zone_class_title($zone_class_id, $key); | ||
169 | 124 | } | ||
170 | 125 | |||
171 | 126 | function tep_cfg_select_option($select_array, $key_value, $key = '') { | ||
172 | 127 | return zen_cfg_select_option($select_array, $key_value, $key) ; | ||
173 | 128 | } | ||
174 | 129 | function tep_session_id($sessid = '') { | ||
175 | 130 | return zen_session_id($sessid ); | ||
176 | 131 | } | ||
177 | 132 | function tep_session_register($param) { | ||
178 | 133 | return zen_session_register($param); | ||
179 | 134 | } | ||
180 | 135 | function tep_session_unregister($param) { | ||
181 | 136 | return zen_session_unregister($param); | ||
182 | 137 | } | ||
183 | 138 | function tep_cfg_pull_down_tax_classes($tax_class_id, $key = '') { | ||
184 | 139 | return zen_cfg_pull_down_tax_classes($tax_class_id, $key); | ||
185 | 140 | } | ||
186 | 141 | function tep_get_tax_class_title($tax_class_id) { | ||
187 | 142 | return zen_get_tax_class_title($tax_class_id); | ||
188 | 143 | } | ||
189 | 144 | |||
190 | 145 | function tep_get_tax_rate($tax_class_id){ | ||
191 | 146 | return zen_get_tax_rate($tax_class_id); | ||
192 | 147 | } | ||
193 | 148 | function tep_get_tax_description($tax_class_id, $country, $zone){ | ||
194 | 149 | return zen_get_tax_description($tax_class_id, $country, $zone); | ||
195 | 150 | } | ||
196 | 151 | function tep_calculate_tax($amount, $rate){ | ||
197 | 152 | return zen_calculate_tax($amount, $rate); | ||
198 | 153 | } | ||
199 | 154 | function tep_get_prid($id){ | ||
200 | 155 | return zen_get_prid($id); | ||
201 | 156 | } | ||
202 | 157 | function tep_not_null($variable){ | ||
203 | 158 | return zen_not_null($variable); | ||
204 | 159 | } | ||
205 | 160 | function tep_session_is_registered($variable) { | ||
206 | 161 | if (PHP_VERSION < 4.3) { | ||
207 | 162 | return session_is_registered($variable); | ||
208 | 163 | } else { | ||
209 | 164 | return isset($_SESSION) && array_key_exists($variable, $_SESSION); | ||
210 | 165 | } | ||
211 | 166 | } | ||
212 | 167 | function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { | ||
213 | 168 | return zen_image($src, $alt, $width, $height, $parameters); | ||
214 | 169 | } | ||
215 | 170 | function tep_image_button($image, $alt = '', $parameters = '') { | ||
216 | 171 | global $language; | ||
217 | 172 | return zen_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); | ||
218 | 173 | } | ||
219 | 174 | function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { | ||
220 | 175 | return zen_image(DIR_WS_IMAGES . $image, '', $width, $height); | ||
221 | 176 | } | ||
222 | 177 | function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') { | ||
223 | 178 | return zen_catalog_href_link($page , $parameters , $connection ); | ||
224 | 179 | } | ||
225 | 180 | function tep_call_function($function, $parameter, $object = '') { | ||
226 | 181 | return zen_call_function($function, $parameter, $object = ''); | ||
227 | 182 | } | ||
228 | 183 | function tep_get_all_get_params($exclude_array = ''){ | ||
229 | 184 | return zen_get_all_get_params($exclude_array); | ||
230 | 185 | } | ||
231 | 186 | function tep_db_prepare_input($sql){ | ||
232 | 187 | return zen_db_prepare_input($sql); | ||
233 | 188 | } | ||
234 | 189 | function tep_date_short($raw_date){ | ||
235 | 190 | return zen_date_short($raw_date); | ||
236 | 191 | } | ||
237 | 192 | function tep_datetime_short($raw_datetime) { | ||
238 | 193 | return zen_datetime_short($raw_date); | ||
239 | 194 | } | ||
240 | 195 | function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { | ||
241 | 196 | return zen_draw_pull_down_menu($name, $values, $default, $parameters, $required); | ||
242 | 197 | } | ||
243 | 198 | function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true){ | ||
244 | 199 | return zen_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true); | ||
245 | 200 | } | ||
246 | 201 | function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = ''){ | ||
247 | 202 | return zen_draw_form($name, $action, $parameters , $method, $params ); | ||
248 | 203 | } | ||
249 | 204 | function tep_image_submit($image, $alt = '', $parameters = '') { | ||
250 | 205 | return zen_image_submit($image, $alt, $parameters); | ||
251 | 206 | } | ||
252 | 207 | function tep_hide_session_id() { | ||
253 | 208 | return zen_hide_session_id(); | ||
254 | 209 | } | ||
255 | 210 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { | ||
256 | 211 | return zen_address_format($address_format_id, $address, $html, $boln, $eoln) ; | ||
257 | 212 | } | ||
258 | 213 | function tep_display_tax_value($value, $padding = TAX_DECIMAL_PLACES) { | ||
259 | 214 | return zen_display_tax_value($value, $padding); | ||
260 | 215 | } | ||
261 | 216 | function tep_add_tax($price, $tax, $override = false) { | ||
262 | 217 | return zen_add_tax($price, $tax, $override ); | ||
263 | 218 | } | ||
264 | 219 | function tep_db_output($string) { | ||
265 | 220 | return zen_db_output($string); | ||
266 | 221 | } | ||
267 | 222 | function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { | ||
268 | 223 | return zen_draw_textarea_field($name, $wrap, $width, $height, $text, $parameters, $reinsert_value); | ||
269 | 224 | } | ||
270 | 225 | function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') { | ||
271 | 226 | return zen_draw_checkbox_field($name, $value , $checked , $compare); | ||
272 | 227 | } | ||
273 | 228 | function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') { | ||
274 | 229 | return zen_draw_radio_field($name, $value , $checked , $compare ); | ||
275 | 230 | } | ||
276 | 231 | function tep_get_category_name($category_id, $language_id) { | ||
277 | 232 | return zen_get_category_name($category_id, $language_id); | ||
278 | 233 | } | ||
279 | 234 | function tep_get_country_name($country_id){ | ||
280 | 235 | return zen_get_country_name($country_id); | ||
281 | 236 | } | ||
282 | 237 | function tep_get_languages(){ | ||
283 | 238 | return zen_get_languages(); | ||
284 | 239 | } | ||
285 | 240 | function tep_validate_password($plain, $encrypted) { | ||
286 | 241 | return zen_validate_password($plain, $encrypted); | ||
287 | 242 | } | ||
288 | 243 | } | ||
289 | 244 | ?> | ||
290 | 0 | \ No newline at end of file | 245 | \ No newline at end of file |
291 | 1 | 246 | ||
292 | === modified file 'esale_osc/connector/openerp-synchro.php' | |||
293 | --- esale_osc/connector/openerp-synchro.php 2010-02-02 20:22:20 +0000 | |||
294 | +++ esale_osc/connector/openerp-synchro.php 2010-07-21 10:31:39 +0000 | |||
295 | @@ -3,9 +3,12 @@ | |||
296 | 3 | # | 3 | # |
297 | 4 | # OpenERP, Open Source Management Solution | 4 | # OpenERP, Open Source Management Solution |
298 | 5 | # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. | 5 | # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
300 | 6 | # Jordi Esteve <jesteve@zikzakmedia.com> | 6 | # Jordi Esteve <jesteve@zikzakmedia.com> |
301 | 7 | # Ana Juaristi <ajuaristio@gmail.com> | 7 | # Ana Juaristi <ajuaristio@gmail.com> |
303 | 8 | # $Id$ | 8 | # |
304 | 9 | # Copyright (c) 2010 ZhenIT Software http://ZhenIT.com | ||
305 | 10 | # Added ZenCart compatibility out of the box | ||
306 | 11 | # Added user validation in the stores administration. | ||
307 | 9 | # | 12 | # |
308 | 10 | # This program is free software: you can redistribute it and/or modify | 13 | # This program is free software: you can redistribute it and/or modify |
309 | 11 | # it under the terms of the GNU General Public License as published by | 14 | # it under the terms of the GNU General Public License as published by |
310 | @@ -21,57 +24,75 @@ | |||
311 | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 24 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
312 | 22 | # | 25 | # |
313 | 23 | ##############################################################################*/ | 26 | ##############################################################################*/ |
319 | 24 | 27 | //SET YOUR PREFERENCES | |
320 | 25 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 28 | define('DIR_WS_INCLUDES', 'includes/'); |
321 | 26 | ///////////////// On windows servers line 65 use return utf8_encode($text); //////////////////// | 29 | define('TRANSACTIONAL',true); //Set true if you have installed transactional feature. |
322 | 27 | ///////////////// PLEASE CONFIGURE THE RIGHT INCLUDES AND DEFINES FOR YOUR CONFIGURATION //////////////////// | 30 | define('DEBUG_MODE', true); //Absolute path to debug and warning file |
323 | 28 | 31 | define('DEBUG_FILE', '../images/debug.xmlrpc.txt'); //Absolute path to debug and warning file | |
324 | 32 | |||
325 | 33 | |||
326 | 34 | ///////login////////////// | ||
327 | 35 | include("openerp_login.php"); | ||
328 | 36 | $url = ($_SERVER['HTTPS']?'https':'http').'://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'],0,strrpos($_SERVER['PHP_SELF'],'/')+1); | ||
329 | 37 | login($url,$_GET['admin_user'],$_GET['admin_pass']); | ||
330 | 38 | ////////////////////////// | ||
331 | 39 | |||
332 | 40 | |||
333 | 41 | ////////////////////////////////////////////////////////////////////////////////////////////////// | ||
334 | 42 | ///////////////// THIS INCLUDES SHOULD BE OK, BUT CHANGE THEM IF YOU NEED //////////////////// | ||
335 | 43 | include(DIR_WS_INCLUDES."application_top.php"); | ||
336 | 29 | include("xmlrpcutils/xmlrpc.inc"); | 44 | include("xmlrpcutils/xmlrpc.inc"); |
337 | 30 | include("xmlrpcutils/xmlrpcs.inc"); | 45 | include("xmlrpcutils/xmlrpcs.inc"); |
345 | 31 | include("../../includes/configure.php"); | 46 | |
346 | 32 | 47 | ////ZENCARTS FUCNTIONS MAPPING/////////////////////////////////////////////////////////////////// | |
347 | 33 | define('TRANSACTIONAL',true); //Set true if you have intalled transactional feature. | 48 | if(function_exists('zen_redirect')){ |
348 | 34 | define('RESPONSE_ENCODING', 'ISO-8859-1'); //It must be your DDBB encoding | 49 | include_once('ZhenIT_zencart_compatibility_functions.php'); |
349 | 35 | define('DEBUG_FILE', '../../temp/debug.xmlrpc.txt'); //Absolute path to debug and warning file | 50 | }else{ |
350 | 36 | 51 | define('PLATAFORMA','osc'); | |
351 | 37 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 52 | } |
352 | 53 | ////////////////INSTALL///////////// | ||
353 | 54 | //CHECKS TO MAKE ONCE (CREATE FIELDS IN DB ETC...) | ||
354 | 55 | @include("openerp_runonce.php"); | ||
355 | 56 | //////////////////////////////////// | ||
356 | 57 | |||
357 | 58 | /////DEBUG///////////////////////// | ||
358 | 59 | if(DEBUG_MODE){ | ||
359 | 60 | @ini_set('display_errors', '1'); | ||
360 | 61 | error_reporting(E_ALL & ~E_NOTICE); | ||
361 | 62 | function debug($s) { | ||
362 | 63 | $fp = fopen(DEBUG_FILE,"a"); | ||
363 | 64 | fwrite($fp, $s."\n"); | ||
364 | 65 | fclose($fp); | ||
365 | 66 | } | ||
366 | 67 | |||
367 | 68 | function debug_arr($para_arr,$tab='') { | ||
368 | 69 | if (is_array($para_arr)) { | ||
369 | 70 | foreach($para_arr as $key=>$values) { | ||
370 | 71 | debug($tab.'Key :'.$key.' Value :'.$values); | ||
371 | 72 | } | ||
372 | 73 | } | ||
373 | 74 | } | ||
374 | 75 | }else{ | ||
375 | 76 | function debug($s) {return;} | ||
376 | 77 | function debug_arr($para_arr,$tab='') {return;} | ||
377 | 78 | } | ||
378 | 38 | 79 | ||
379 | 39 | $con = mysql_pconnect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD); | 80 | $con = mysql_pconnect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD); |
380 | 40 | mysql_select_db(DB_DATABASE); | 81 | mysql_select_db(DB_DATABASE); |
381 | 41 | 82 | ||
407 | 42 | 83 | //This function should let openERP know about the shop | |
408 | 43 | function debug($s) { | 84 | function init() { |
409 | 44 | $fp = fopen(DEBUG_FILE,"a"); | 85 | $values = array(); |
410 | 45 | fwrite($fp, $s."\n"); | 86 | $values[] = new xmlrpcval(PLATAFORMA, "string"); |
411 | 46 | fclose($fp); | 87 | return new xmlrpcresp( new xmlrpcval($values, "array")); |
387 | 47 | } | ||
388 | 48 | |||
389 | 49 | function debug_arr($para_arr,$tab='') { | ||
390 | 50 | if (is_array($para_arr)) { | ||
391 | 51 | foreach($para_arr as $key=>$values) { | ||
392 | 52 | debug($tab.'Key :'.$key.' Value :'.$values); | ||
393 | 53 | /* | ||
394 | 54 | if (is_array($values)) { | ||
395 | 55 | $tab.='\t'; | ||
396 | 56 | debug_arr($values,$tab); | ||
397 | 57 | }*/ | ||
398 | 58 | } | ||
399 | 59 | } | ||
400 | 60 | } | ||
401 | 61 | |||
402 | 62 | function clean_special_chars($text){ | ||
403 | 63 | for ($i=128; $i<=159; $i++){ | ||
404 | 64 | $text = ereg_replace(chr($i), "?", $text ); | ||
405 | 65 | } | ||
406 | 66 | return $text; | ||
412 | 67 | } | 88 | } |
413 | 68 | 89 | ||
414 | 69 | function get_taxes() { | 90 | function get_taxes() { |
415 | 70 | $taxes = array(); | 91 | $taxes = array(); |
416 | 71 | 92 | ||
418 | 72 | $result = mysql_query("select tax_class_id, tax_class_title from tax_class;"); | 93 | $result = mysql_query("select tax_class_id, tax_class_title from ".TABLE_TAX_CLASS.";"); |
419 | 73 | if ($result) while ($row = mysql_fetch_row($result)) { | 94 | if ($result) while ($row = mysql_fetch_row($result)) { |
421 | 74 | $taxes[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval($row[1], "string")), "array"); | 95 | $taxes[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(utf8_encode($row[1]), "string")), "array"); |
422 | 75 | } | 96 | } |
423 | 76 | return new xmlrpcresp( new xmlrpcval($taxes, "array")); | 97 | return new xmlrpcresp( new xmlrpcval($taxes, "array")); |
424 | 77 | } | 98 | } |
425 | @@ -79,9 +100,9 @@ | |||
426 | 79 | function get_statuses() { | 100 | function get_statuses() { |
427 | 80 | $status = array(); | 101 | $status = array(); |
428 | 81 | 102 | ||
430 | 82 | $result = mysql_query("select orders_status_id, orders_status_name, language_id from orders_status;"); | 103 | $result = mysql_query("select orders_status_id, orders_status_name, language_id from ".TABLE_ORDERS_STATUS); |
431 | 83 | if ($result) while ($row = mysql_fetch_row($result)) { | 104 | if ($result) while ($row = mysql_fetch_row($result)) { |
433 | 84 | $status[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(clean_special_chars($row[1]), "string"), new xmlrpcval($row[2], "int")), "array"); | 105 | $status[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(utf8_encode($row[1]), "string"), new xmlrpcval($row[2], "int")), "array"); |
434 | 85 | } | 106 | } |
435 | 86 | return new xmlrpcresp( new xmlrpcval($status, "array")); | 107 | return new xmlrpcresp( new xmlrpcval($status, "array")); |
436 | 87 | } | 108 | } |
437 | @@ -89,10 +110,9 @@ | |||
438 | 89 | 110 | ||
439 | 90 | function get_languages() { | 111 | function get_languages() { |
440 | 91 | $languages = array(); | 112 | $languages = array(); |
443 | 92 | 113 | $result = mysql_query("select languages_id, name from ".TABLE_LANGUAGES.";"); | |
442 | 93 | $result = mysql_query("select languages_id, name from languages;"); | ||
444 | 94 | if ($result) while ($row = mysql_fetch_row($result)) { | 114 | if ($result) while ($row = mysql_fetch_row($result)) { |
446 | 95 | $languages[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(clean_special_chars($row[1]), "string")), "array"); | 115 | $languages[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(utf8_encode($row[1]), "string")), "array"); |
447 | 96 | } | 116 | } |
448 | 97 | return new xmlrpcresp(new xmlrpcval($languages, "array")); | 117 | return new xmlrpcresp(new xmlrpcval($languages, "array")); |
449 | 98 | } | 118 | } |
450 | @@ -101,11 +121,11 @@ | |||
451 | 101 | function get_categories() { | 121 | function get_categories() { |
452 | 102 | $categories = array(); | 122 | $categories = array(); |
453 | 103 | 123 | ||
455 | 104 | $result = mysql_query("select categories_id, min(language_id) from categories_description group by categories_id;"); | 124 | $result = mysql_query("select categories_id, min(language_id) from ".TABLE_CATEGORIES_DESCRIPTION." group by categories_id;"); |
456 | 105 | if ($result) while ($row = mysql_fetch_row($result)) { | 125 | if ($result) while ($row = mysql_fetch_row($result)) { |
458 | 106 | $resultb = mysql_query("select categories_id, categories_name from categories_description where categories_id=".$row[0]." and language_id=".$row[1].";"); | 126 | $resultb = mysql_query("select categories_id, categories_name from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id=".$row[0]." and language_id=".$row[1].";"); |
459 | 107 | if ($resultb and $row = mysql_fetch_row($resultb)) { | 127 | if ($resultb and $row = mysql_fetch_row($resultb)) { |
461 | 108 | $categories[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(clean_special_chars(parent_category($row[0],$row[1])), "string")), "array"); | 128 | $categories[] = new xmlrpcval(array(new xmlrpcval($row[0], "int"), new xmlrpcval(utf8_encode(parent_category($row[0],$row[1])), "string")), "array"); |
462 | 109 | } | 129 | } |
463 | 110 | } | 130 | } |
464 | 111 | return new xmlrpcresp( new xmlrpcval($categories, "array")); | 131 | return new xmlrpcresp( new xmlrpcval($categories, "array")); |
465 | @@ -115,17 +135,16 @@ | |||
466 | 115 | $categories = array(); | 135 | $categories = array(); |
467 | 116 | $lang_ids = ""; | 136 | $lang_ids = ""; |
468 | 117 | 137 | ||
471 | 118 | foreach ($languages as $lang) | 138 | foreach ($languages as $lang){ |
472 | 119 | $lang_ids = $lang.", "; | 139 | $lang_ids = $lang.", "; |
473 | 140 | } | ||
474 | 120 | $lang_ids = substr($lang_ids, 0, strlen($lang_ids)-2); | 141 | $lang_ids = substr($lang_ids, 0, strlen($lang_ids)-2); |
476 | 121 | $result = mysql_query("select categories_id, parent_id from categories order by parent_id;"); | 142 | $result = mysql_query("select categories_id, parent_id from ".TABLE_CATEGORIES." order by parent_id;"); |
477 | 122 | if ($result) while ($row = mysql_fetch_row($result)) { | 143 | if ($result) while ($row = mysql_fetch_row($result)) { |
478 | 123 | //debug('Category: ' . $row[0].'-'. $row[1]); | ||
479 | 124 | $cat = array(new xmlrpcval($row[0], "int"), new xmlrpcval($row[1], "int")); | 144 | $cat = array(new xmlrpcval($row[0], "int"), new xmlrpcval($row[1], "int")); |
481 | 125 | $resultlang = mysql_query("select categories_id, categories_name from categories_description where categories_id=".$row[0]." and language_id in ($lang_ids);"); | 145 | $resultlang = mysql_query("select categories_id, categories_name from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id=".$row[0]." and language_id in ($lang_ids);"); |
482 | 126 | if ($resultlang) while ($rowl = mysql_fetch_row($resultlang)) { | 146 | if ($resultlang) while ($rowl = mysql_fetch_row($resultlang)) { |
485 | 127 | //debug('Category language: ' .$rowl[1]); | 147 | $cat[] = new xmlrpcval(utf8_encode($rowl[1]), "string"); |
484 | 128 | $cat[] = new xmlrpcval(clean_special_chars($rowl[1]), "string"); | ||
486 | 129 | } | 148 | } |
487 | 130 | $categories[] = new xmlrpcval($cat, "array"); | 149 | $categories[] = new xmlrpcval($cat, "array"); |
488 | 131 | } | 150 | } |
489 | @@ -133,6 +152,7 @@ | |||
490 | 133 | } | 152 | } |
491 | 134 | 153 | ||
492 | 135 | function get_products($languages, $osCodIni, $block, $last_date) { | 154 | function get_products($languages, $osCodIni, $block, $last_date) { |
493 | 155 | global $languages_id; | ||
494 | 136 | $products = array(); | 156 | $products = array(); |
495 | 137 | $prod = array(); | 157 | $prod = array(); |
496 | 138 | $prod_desc = array(); | 158 | $prod_desc = array(); |
497 | @@ -159,59 +179,59 @@ | |||
498 | 159 | products_status, | 179 | products_status, |
499 | 160 | products_tax_class_id, | 180 | products_tax_class_id, |
500 | 161 | manufacturers_id | 181 | manufacturers_id |
502 | 162 | from products"; | 182 | from ".TABLE_PRODUCTS; |
503 | 163 | 183 | ||
504 | 164 | $nexo = ' where '; | 184 | $nexo = ' where '; |
505 | 165 | 185 | ||
506 | 166 | if (TRANSACTIONAL){ | 186 | if (TRANSACTIONAL){ |
507 | 167 | $sQuery .= $nexo . "( products_last_modified >= '" . $last_date . "' "; | 187 | $sQuery .= $nexo . "( products_last_modified >= '" . $last_date . "' "; |
509 | 168 | $nexo = ' or '; | 188 | $nexo = ' or '; |
510 | 169 | $sQuery .= $nexo . "products_date_added >= '" . $last_date . "' )" ; | 189 | $sQuery .= $nexo . "products_date_added >= '" . $last_date . "' )" ; |
513 | 170 | $nexo = ' and '; | 190 | $nexo = ' and '; |
514 | 171 | } | 191 | } |
515 | 172 | 192 | ||
516 | 173 | if ($osCodIni>0){ | 193 | if ($osCodIni>0){ |
517 | 174 | $sQuery .= $nexo . "products_id > " . $osCodIni; | 194 | $sQuery .= $nexo . "products_id > " . $osCodIni; |
520 | 175 | $nexo = ' and '; | 195 | $nexo = ' and '; |
521 | 176 | } | 196 | } |
522 | 177 | 197 | ||
524 | 178 | $sQuery .= " order by products_id LIMIT " . $block; | 198 | $sQuery .= " order by products_id LIMIT " . $block; |
525 | 179 | debug('Query: ' .$sQuery); | 199 | debug('Query: ' .$sQuery); |
526 | 180 | $result = mysql_query($sQuery); | 200 | $result = mysql_query($sQuery); |
527 | 181 | 201 | ||
528 | 182 | //debug('IF-WHILE-get_products'); | 202 | //debug('IF-WHILE-get_products'); |
529 | 183 | if ($result) while ($row_product = mysql_fetch_row($result)) { | 203 | if ($result) while ($row_product = mysql_fetch_row($result)) { |
531 | 184 | $resultcateg = mysql_query("select min(categories_id) from products_to_categories | 204 | $resultcateg = mysql_query("select min(categories_id) from ".TABLE_PRODUCTS_TO_CATEGORIES." |
532 | 185 | where products_id=".$row_product[0]." group by products_id;"); | 205 | where products_id=".$row_product[0]." group by products_id;"); |
533 | 186 | if ($resultcateg) { | 206 | if ($resultcateg) { |
535 | 187 | $row = mysql_fetch_row($resultcateg); | 207 | $row = mysql_fetch_row($resultcateg); |
536 | 188 | $prod_cat = $row[0]; | 208 | $prod_cat = $row[0]; |
537 | 189 | 209 | ||
538 | 190 | } | 210 | } |
539 | 191 | debug('Producto: ' .$row_product[0]); | 211 | debug('Producto: ' .$row_product[0]); |
540 | 192 | //Get product's manufacturer name | 212 | //Get product's manufacturer name |
541 | 193 | if ($row_product[11] > 0){ | 213 | if ($row_product[11] > 0){ |
543 | 194 | $resultmanuf = mysql_query("select manufacturers_name from manufacturers where manufacturers_id = ".$row_product[11].";"); | 214 | $resultmanuf = mysql_query("select manufacturers_name from ".TABLE_MANUFACTURERS." where manufacturers_id = ".$row_product[11].";"); |
544 | 195 | if ($resultmanuf){ | 215 | if ($resultmanuf){ |
545 | 196 | $row_manuf = mysql_fetch_row($resultmanuf); | 216 | $row_manuf = mysql_fetch_row($resultmanuf); |
546 | 197 | if (strlen($row_manuf[0]) > 0) | 217 | if (strlen($row_manuf[0]) > 0) |
548 | 198 | $manufacturers_name = $row_manuf[0]; | 218 | $manufacturers_name = $row_manuf[0]; |
549 | 199 | else | 219 | else |
551 | 200 | $manufacturers_name = ""; | 220 | $manufacturers_name = ""; |
552 | 201 | } | 221 | } |
553 | 202 | //Get product's manufacturer url on each language | 222 | //Get product's manufacturer url on each language |
554 | 203 | $manuf_url = array(); | 223 | $manuf_url = array(); |
555 | 204 | $resultmanuflang = mysql_query("select manufacturers_url, languages_id | 224 | $resultmanuflang = mysql_query("select manufacturers_url, languages_id |
557 | 205 | from manufacturers_info where manufacturers_id = ".$row_product[11]." and languages_id in (".$lang_ids.");"); | 225 | from ".TABLE_MANUFACTURERS_INFO." where manufacturers_id = ".$row_product[11]." and languages_id in (".$lang_ids.");"); |
558 | 206 | if ($resultmanuflang) while ($row_manuflang = mysql_fetch_row($resultmanuflang)) { | 226 | if ($resultmanuflang) while ($row_manuflang = mysql_fetch_row($resultmanuflang)) { |
559 | 207 | if (strlen($row_manuflang[0]) == 0) | 227 | if (strlen($row_manuflang[0]) == 0) |
561 | 208 | $manufacturers_url = ""; | 228 | $manufacturers_url = ""; |
562 | 209 | else | 229 | else |
564 | 210 | $manufacturers_url = $row_manuflang[0]; | 230 | $manufacturers_url = $row_manuflang[0]; |
565 | 211 | $manuf_url[] = new xmlrpcval(array( | 231 | $manuf_url[] = new xmlrpcval(array( |
566 | 212 | "languages_id" => new xmlrpcval($row_manuflang[1],"int"), | 232 | "languages_id" => new xmlrpcval($row_manuflang[1],"int"), |
567 | 213 | "manufacturers_url" => new xmlrpcval($manufacturers_url,"string"), | 233 | "manufacturers_url" => new xmlrpcval($manufacturers_url,"string"), |
569 | 214 | ), "struct"); | 234 | ), "struct"); |
570 | 215 | } | 235 | } |
571 | 216 | } else { | 236 | } else { |
572 | 217 | $manufacturers_name = ""; | 237 | $manufacturers_name = ""; |
573 | @@ -221,16 +241,16 @@ | |||
574 | 221 | $prod = new xmlrpcval(array( | 241 | $prod = new xmlrpcval(array( |
575 | 222 | "products_id" => new xmlrpcval($row_product[0],"int"), | 242 | "products_id" => new xmlrpcval($row_product[0],"int"), |
576 | 223 | "products_quantity" => new xmlrpcval($row_product[1],"int"), | 243 | "products_quantity" => new xmlrpcval($row_product[1],"int"), |
584 | 224 | "products_model" => new xmlrpcval(clean_special_chars($row_product[2]),"string"), | 244 | "products_model" => new xmlrpcval(utf8_encode($row_product[2]),"string"), |
585 | 225 | "products_image" => new xmlrpcval(clean_special_chars($row_product[3]),"string"), | 245 | "products_image" => new xmlrpcval(utf8_encode($row_product[3]),"string"), |
586 | 226 | "products_price" => new xmlrpcval(clean_special_chars($row_product[4]),"string"), | 246 | "products_price" => new xmlrpcval(utf8_encode($row_product[4]),"string"), |
587 | 227 | "products_date_added" => new xmlrpcval(clean_special_chars($row_product[5]),"string"), | 247 | "products_date_added" => new xmlrpcval(utf8_encode($row_product[5]),"string"), |
588 | 228 | "products_last_modified" => new xmlrpcval(clean_special_chars($row_product[6]),"string"), | 248 | "products_last_modified" => new xmlrpcval(utf8_encode($row_product[6]),"string"), |
589 | 229 | "products_date_available" => new xmlrpcval(clean_special_chars($row_product[7]),"string"), | 249 | "products_date_available" => new xmlrpcval(utf8_encode($row_product[7]),"string"), |
590 | 230 | "products_weight" => new xmlrpcval(clean_special_chars($row_product[8]),"string"), | 250 | "products_weight" => new xmlrpcval(utf8_encode($row_product[8]),"string"), |
591 | 231 | "products_status" => new xmlrpcval($row_product[9],"int"), | 251 | "products_status" => new xmlrpcval($row_product[9],"int"), |
592 | 232 | "products_tax_class_id" => new xmlrpcval($row_product[10],"int"), | 252 | "products_tax_class_id" => new xmlrpcval($row_product[10],"int"), |
594 | 233 | "manufacturers_name" => new xmlrpcval(clean_special_chars($manufacturers_name),"string"), | 253 | "manufacturers_name" => new xmlrpcval(utf8_encode($manufacturers_name),"string"), |
595 | 234 | "categ_id" => new xmlrpcval($prod_cat,"int")), "struct"); | 254 | "categ_id" => new xmlrpcval($prod_cat,"int")), "struct"); |
596 | 235 | //debug('Product_id: ' . $row_product[0] . '-IMG:' .$row_product[3]. '-CAT:' . $prod_cat); | 255 | //debug('Product_id: ' . $row_product[0] . '-IMG:' .$row_product[3]. '-CAT:' . $prod_cat); |
597 | 236 | 256 | ||
598 | @@ -242,33 +262,23 @@ | |||
599 | 242 | products_description, | 262 | products_description, |
600 | 243 | products_url, | 263 | products_url, |
601 | 244 | products_viewed | 264 | products_viewed |
603 | 245 | from products_description where products_id=".$row_product[0]." and language_id in (".$lang_ids.");"); | 265 | from ".TABLE_PRODUCTS_DESCRIPTION." where products_id=".$row_product[0]." and language_id in (".$lang_ids.");"); |
604 | 246 | if ($resultlang) while ($row_desc = mysql_fetch_row($resultlang)) { | 266 | if ($resultlang) while ($row_desc = mysql_fetch_row($resultlang)) { |
617 | 247 | /* if (strlen($row_desc[3] == 0)) | 267 | $description=utf8_encode($row_desc[3]); |
618 | 248 | $products_description_str = ""; | 268 | if ($description!=$row_desc[3]){ |
607 | 249 | else | ||
608 | 250 | $products_description_str = $row_desc[3]; | ||
609 | 251 | if (strlen($row_desc[4] == 0)) | ||
610 | 252 | $products_url_str = ""; | ||
611 | 253 | else | ||
612 | 254 | $products_url_str = $row_desc[4]; | ||
613 | 255 | */ | ||
614 | 256 | |||
615 | 257 | $description=clean_special_chars($row_desc[3]); | ||
616 | 258 | if ($description!=$row_desc[3]){ | ||
619 | 259 | debug(date(DATE_ATOM) . ' -- Product_id: ' . $row_desc[0] . ' Language_id: ' . $row_desc[1] . ' -> Undefined characters: Description has been updated.'); | 269 | debug(date(DATE_ATOM) . ' -- Product_id: ' . $row_desc[0] . ' Language_id: ' . $row_desc[1] . ' -> Undefined characters: Description has been updated.'); |
620 | 260 | } | 270 | } |
621 | 261 | 271 | ||
622 | 262 | $prod_desc[] = new xmlrpcval(array( | 272 | $prod_desc[] = new xmlrpcval(array( |
624 | 263 | //"products_id" => new xmlrpcval($row_desc[0],"int"), | 273 | //"products_id" => new xmlrpcval($row_desc[0],"int"), |
625 | 264 | "language_id" => new xmlrpcval($row_desc[1],"int"), | 274 | "language_id" => new xmlrpcval($row_desc[1],"int"), |
630 | 265 | "products_name" => new xmlrpcval(clean_special_chars($row_desc[2]),"string"), | 275 | "products_name" => new xmlrpcval(utf8_encode($row_desc[2]),"string"), |
631 | 266 | "products_description" => new xmlrpcval($description,"string"), | 276 | "products_description" => new xmlrpcval(utf8_encode($row_desc[3]),"string"), |
632 | 267 | "products_url" => new xmlrpcval(clean_special_chars($row_desc[4]),"string"), | 277 | "products_url" => new xmlrpcval(utf8_encode($row_desc[4]),"string"), |
633 | 268 | "products_viewed" => new xmlrpcval(clean_special_chars($row_desc[5]),"string")), "struct"); | 278 | "products_viewed" => new xmlrpcval(utf8_encode($row_desc[5]),"string")), "struct"); |
634 | 269 | //debug('Product_id: ' . $row_desc[0] . 'language_id: ' . $row_desc[1] . 'products_name: ' . $row_desc[2]); | 279 | //debug('Product_id: ' . $row_desc[0] . 'language_id: ' . $row_desc[1] . 'products_name: ' . $row_desc[2]); |
635 | 270 | } | 280 | } |
637 | 271 | 281 | ||
638 | 272 | // Get product discounts | 282 | // Get product discounts |
639 | 273 | $prod_spec = new xmlrpcval(array(), "struct"); // If product has not any discount | 283 | $prod_spec = new xmlrpcval(array(), "struct"); // If product has not any discount |
640 | 274 | $resultspec = mysql_query("select specials_new_products_price, | 284 | $resultspec = mysql_query("select specials_new_products_price, |
641 | @@ -277,48 +287,44 @@ | |||
642 | 277 | expires_date, | 287 | expires_date, |
643 | 278 | date_status_change, | 288 | date_status_change, |
644 | 279 | status | 289 | status |
646 | 280 | from specials where products_id=". $row_product[0] . | 290 | from ".TABLE_SPECIALS." where products_id=". $row_product[0] . |
647 | 281 | " and specials_date_added = | 291 | " and specials_date_added = |
649 | 282 | (select max(specials_date_added) from specials where products_id=". $row_product[0] . ");"); | 292 | (select max(specials_date_added) from ".TABLE_SPECIALS." where products_id=". $row_product[0] . ");"); |
650 | 283 | if ($resultspec) { | 293 | if ($resultspec) { |
651 | 284 | $rowesp = mysql_fetch_row($resultspec); | 294 | $rowesp = mysql_fetch_row($resultspec); |
652 | 285 | //debug('Product specials: ' . $rowesp[0] . " " . $rowesp[3]); | 295 | //debug('Product specials: ' . $rowesp[0] . " " . $rowesp[3]); |
653 | 286 | $prod_spec = new xmlrpcval(array( | 296 | $prod_spec = new xmlrpcval(array( |
654 | 287 | "specials_new_products_price" => new xmlrpcval($rowesp[0],"string"), | 297 | "specials_new_products_price" => new xmlrpcval($rowesp[0],"string"), |
657 | 288 | //"specials_date_added" => new xmlrpcval($rowesp[1],"string"), | 298 | //"specials_date_added" => new xmlrpcval($rowesp[1],"string"), |
658 | 289 | //"specials_last_modified" => new xmlrpcval($rowesp[2],"string"), | 299 | //"specials_last_modified" => new xmlrpcval($rowesp[2],"string"), |
659 | 290 | "expires_date" => new xmlrpcval($rowesp[3],"string"), | 300 | "expires_date" => new xmlrpcval($rowesp[3],"string"), |
661 | 291 | //"date_status_change" => new xmlrpcval($rowesp[4],"string"), | 301 | //"date_status_change" => new xmlrpcval($rowesp[4],"string"), |
662 | 292 | "status" => new xmlrpcval($rowesp[5],"int")), "struct"); | 302 | "status" => new xmlrpcval($rowesp[5],"int")), "struct"); |
663 | 293 | } | 303 | } |
664 | 294 | // Get product attributes | 304 | // Get product attributes |
665 | 295 | debug('Inicio atributos: ' . $row_product[0]); | 305 | debug('Inicio atributos: ' . $row_product[0]); |
668 | 296 | debug("Query: SELECT p.products_id, op.products_options_name , opv.products_options_values_name | 306 | $sql = "SELECT p.products_id, op.products_options_name , opv.products_options_values_name |
669 | 297 | FROM products p, products_attributes pa, products_options op, products_options_values opv | 307 | FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_ATTRIBUTES." pa, ".TABLE_PRODUCTS_OPTIONS." op, ".TABLE_PRODUCTS_OPTIONS_VALUES." opv |
670 | 298 | WHERE p.products_id = pa.products_id | 308 | WHERE p.products_id = pa.products_id |
671 | 299 | AND pa.options_id = op.products_options_id | 309 | AND pa.options_id = op.products_options_id |
672 | 300 | AND pa.options_values_id = opv.products_options_values_id | 310 | AND pa.options_values_id = opv.products_options_values_id |
674 | 301 | and p.products_id =". $row_product[0]); | 311 | and p.products_id =". $row_product[0] . " |
675 | 312 | AND opv.language_id=".(int)$languages_id.";"; | ||
676 | 313 | debug("Query: ".$sql); | ||
677 | 302 | 314 | ||
678 | 303 | $prod_atrib = array();// If product has not attributes | 315 | $prod_atrib = array();// If product has not attributes |
686 | 304 | 316 | $result_atrib = mysql_query($sql); | |
680 | 305 | $result_atrib = mysql_query("SELECT p.products_id, op.products_options_name , opv.products_options_values_name | ||
681 | 306 | FROM products p, products_attributes pa, products_options op, products_options_values opv | ||
682 | 307 | WHERE p.products_id = pa.products_id | ||
683 | 308 | AND pa.options_id = op.products_options_id | ||
684 | 309 | AND pa.options_values_id = opv.products_options_values_id | ||
685 | 310 | and p.products_id =". $row_product[0] . ";"); | ||
687 | 311 | if ($result_atrib) while ($rowatr = mysql_fetch_row($result_atrib)) { | 317 | if ($result_atrib) while ($rowatr = mysql_fetch_row($result_atrib)) { |
688 | 312 | 318 | ||
691 | 313 | $num_atrib = explode("-", clean_special_chars($rowatr[2])); | 319 | $num_atrib = explode("-", utf8_encode($rowatr[2])); |
692 | 314 | $auxi_model = clean_special_chars($row_product[2]) . '-' . $num_atrib[0]; | 320 | $auxi_model = utf8_encode($row_product[2]) . '-' . $num_atrib[0]; |
693 | 315 | 321 | ||
694 | 316 | debug('Product atributes: ' . $rowatr[0] . " " . $rowatr[1]. " " . $rowatr[2] . 'Codigo prod: ' . $auxi_model); | 322 | debug('Product atributes: ' . $rowatr[0] . " " . $rowatr[1]. " " . $rowatr[2] . 'Codigo prod: ' . $auxi_model); |
695 | 317 | $prod_atrib[] = new xmlrpcval(array( | 323 | $prod_atrib[] = new xmlrpcval(array( |
698 | 318 | "variants_name" => new xmlrpcval(clean_special_chars($rowatr[1]),"string"), | 324 | "variants_name" => new xmlrpcval(utf8_encode($rowatr[1]),"string"), |
699 | 319 | "variants_value" => new xmlrpcval(clean_special_chars($rowatr[2]),"string"), | 325 | "variants_value" => new xmlrpcval(utf8_encode($rowatr[2]),"string"), |
700 | 320 | "composed_code" => new xmlrpcval($auxi_model,"string"), | 326 | "composed_code" => new xmlrpcval($auxi_model,"string"), |
702 | 321 | ), "struct"); | 327 | ), "struct"); |
703 | 322 | } | 328 | } |
704 | 323 | 329 | ||
705 | 324 | 330 | ||
706 | @@ -328,50 +334,59 @@ | |||
707 | 328 | 'product_special' => $prod_spec, | 334 | 'product_special' => $prod_spec, |
708 | 329 | 'manufacturers_url' => new xmlrpcval($manuf_url, "array"), | 335 | 'manufacturers_url' => new xmlrpcval($manuf_url, "array"), |
709 | 330 | 'variants' => new xmlrpcval($prod_atrib, "array"), | 336 | 'variants' => new xmlrpcval($prod_atrib, "array"), |
711 | 331 | ), "struct"); | 337 | ), "struct"); |
712 | 332 | } | 338 | } |
713 | 333 | //debug('END-IF-WHILE-get_products'); | 339 | //debug('END-IF-WHILE-get_products'); |
714 | 334 | return new xmlrpcresp(new xmlrpcval($products, "array")); | 340 | return new xmlrpcresp(new xmlrpcval($products, "array")); |
715 | 335 | } | 341 | } |
716 | 336 | 342 | ||
717 | 337 | function get_payment_methods() { | 343 | function get_payment_methods() { |
718 | 344 | global $language; | ||
719 | 338 | $payment_methods = array(); | 345 | $payment_methods = array(); |
720 | 339 | 346 | ||
722 | 340 | $result_modules = mysql_query("SELECT configuration_value FROM configuration WHERE (configuration_key = 'MODULE_PAYMENT_INSTALLED');"); | 347 | $result_modules = mysql_query("SELECT configuration_value FROM ".TABLE_CONFIGURATION." WHERE (configuration_key = 'MODULE_PAYMENT_INSTALLED');"); |
723 | 341 | if ($result_modules && $row_modules=mysql_fetch_row($result_modules)) { | 348 | if ($result_modules && $row_modules=mysql_fetch_row($result_modules)) { |
724 | 342 | $modules = explode(';', $row_modules[0]); | 349 | $modules = explode(';', $row_modules[0]); |
725 | 343 | } | 350 | } |
726 | 344 | reset($modules); | 351 | reset($modules); |
727 | 345 | while (list($key, $value) = each($modules)) { | 352 | while (list($key, $value) = each($modules)) { |
730 | 346 | include("../../includes/modules/payment/".$value); | 353 | $file = DIR_FS_CATALOG_MODULES."payment/".$value; |
731 | 347 | include("../../includes/languages/espanol/modules/payment/".$value); | 354 | if (!file_exists($file))continue; |
732 | 355 | include($file); | ||
733 | 356 | include(DIR_FS_CATALOG_LANGUAGES.$language."/modules/payment/".$value); | ||
734 | 348 | $class = substr($value, 0, strrpos($value, '.')); | 357 | $class = substr($value, 0, strrpos($value, '.')); |
735 | 349 | $obj = new $class(); | 358 | $obj = new $class(); |
737 | 350 | $payment_methods[] = new xmlrpcval(array(new xmlrpcval($key, "int"), new xmlrpcval(clean_special_chars($obj->title), "string")), "array"); | 359 | $payment_methods[] = new xmlrpcval(array(new xmlrpcval($key, "int"), new xmlrpcval(trim(utf8_encode(html_entity_decode(strip_tags($obj->title)))), "string")), "array"); |
738 | 351 | } | 360 | } |
739 | 352 | return new xmlrpcresp( new xmlrpcval($payment_methods, "array")); | 361 | return new xmlrpcresp( new xmlrpcval($payment_methods, "array")); |
740 | 353 | } | 362 | } |
741 | 354 | 363 | ||
742 | 364 | $arrLanguagesDirs = null; | ||
743 | 365 | function _loadArrLanguageDirs(){//Avoid making this query more then once | ||
744 | 366 | global $arrLanguagesDirs; | ||
745 | 367 | $arrLanguagesDirs = array();; | ||
746 | 368 | $result=mysql_query("select directory from ".TABLE_LANGUAGES.";"); | ||
747 | 369 | if ($result) while ($row=mysql_fetch_row($result)) { | ||
748 | 370 | $arrLanguagesDirs[] = $row[0]; | ||
749 | 371 | } | ||
750 | 372 | } | ||
751 | 373 | |||
752 | 355 | function search_payment_method($payment_name) { | 374 | function search_payment_method($payment_name) { |
754 | 356 | $languages = array(); | 375 | global $arrLanguagesDirs; |
755 | 376 | if(is_null($arrLanguagesDirs))_loadArrLanguageDirs(); | ||
756 | 357 | 377 | ||
758 | 358 | $result_modules = mysql_query("SELECT configuration_value FROM configuration WHERE (configuration_key = 'MODULE_PAYMENT_INSTALLED');"); | 378 | $result_modules = mysql_query("SELECT configuration_value FROM ".TABLE_CONFIGURATION." WHERE (configuration_key = 'MODULE_PAYMENT_INSTALLED');"); |
759 | 359 | if ($result_modules && $row_modules = mysql_fetch_row($result_modules)) { | 379 | if ($result_modules && $row_modules = mysql_fetch_row($result_modules)) { |
760 | 360 | $modules = explode(';', $row_modules[0]); | 380 | $modules = explode(';', $row_modules[0]); |
761 | 361 | } | 381 | } |
762 | 362 | 382 | ||
763 | 363 | $result=mysql_query("select directory from languages;"); | ||
764 | 364 | if ($result) while ($row=mysql_fetch_row($result)) { | ||
765 | 365 | $languages[] = $row[0]; | ||
766 | 366 | } | ||
767 | 367 | |||
768 | 368 | reset($modules); | 383 | reset($modules); |
769 | 369 | while (list($key, $value) = each($modules)) { | 384 | while (list($key, $value) = each($modules)) { |
771 | 370 | foreach ($languages as $lang) { | 385 | foreach ($arrLanguagesDirs as $lang) { |
772 | 371 | $title = ""; | 386 | $title = ""; |
773 | 372 | // We must extract the payment method name from the translation file of the payment module | 387 | // We must extract the payment method name from the translation file of the payment module |
774 | 373 | // We search lines containing the TEXT_TITLE constant like: define('MODULE_PAYMENT_COD_TEXT_TITLE', 'Cash on Delivery'); | 388 | // We search lines containing the TEXT_TITLE constant like: define('MODULE_PAYMENT_COD_TEXT_TITLE', 'Cash on Delivery'); |
776 | 374 | $gestor = @fopen("../../includes/languages/$lang/modules/payment/$value", "r"); | 389 | $gestor = @fopen(DIR_FS_CATALOG_LANGUAGES.$lang."/modules/payment/$value", "r"); |
777 | 375 | if ($gestor) { | 390 | if ($gestor) { |
778 | 376 | while (!feof($gestor) and $title=="") { | 391 | while (!feof($gestor) and $title=="") { |
779 | 377 | // Read translation file line by line | 392 | // Read translation file line by line |
780 | @@ -392,14 +407,14 @@ | |||
781 | 392 | 407 | ||
782 | 393 | 408 | ||
783 | 394 | function parent_category($id, $name) { | 409 | function parent_category($id, $name) { |
785 | 395 | $result = mysql_query("select parent_id from categories where categories_id=".$id.";"); | 410 | $result = mysql_query("select parent_id from ".TABLE_CATEGORIES." where categories_id=".$id.";"); |
786 | 396 | if ($result && $row = mysql_fetch_row($result)) { | 411 | if ($result && $row = mysql_fetch_row($result)) { |
787 | 397 | if ($row[0] == 0) { | 412 | if ($row[0] == 0) { |
788 | 398 | return $name; | 413 | return $name; |
789 | 399 | } else { | 414 | } else { |
791 | 400 | $resultb = mysql_query("select min(language_id) from categories_description where categories_id=".$row[0].";"); | 415 | $resultb = mysql_query("select min(language_id) from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id=".$row[0].";"); |
792 | 401 | if ($resultb && $rowb=mysql_fetch_row($resultb)) { | 416 | if ($resultb && $rowb=mysql_fetch_row($resultb)) { |
794 | 402 | $resultb = mysql_query("select categories_name from categories_description where categories_id=".$row[0]." and language_id=".$rowb[0].";\n"); | 417 | $resultb = mysql_query("select categories_name from ".TABLE_CATEGORIES_DESCRIPTION." where categories_id=".$row[0]." and language_id=".$rowb[0].";\n"); |
795 | 403 | if ($resultb && $rowb=mysql_fetch_row($resultb)) { | 418 | if ($resultb && $rowb=mysql_fetch_row($resultb)) { |
796 | 404 | $name = parent_category($row[0], $rowb[0] . " \\ ". $name); | 419 | $name = parent_category($row[0], $rowb[0] . " \\ ". $name); |
797 | 405 | return $name; | 420 | return $name; |
798 | @@ -415,13 +430,15 @@ | |||
799 | 415 | } | 430 | } |
800 | 416 | 431 | ||
801 | 417 | function setSyncronizedFlag($product_id) { | 432 | function setSyncronizedFlag($product_id) { |
804 | 418 | mysql_query("update products set products_syncronized = 1, products_last_syncronized = now() where products_id=" . $product_id . ";"); | 433 | if(mysql_query("update ".TABLE_PRODUCTS." set products_syncronized = 1, products_last_syncronized = now() where products_id=" . $product_id . ";")){ |
805 | 419 | return new xmlrpcresp(new xmlrpcval(true,"boolean")); | 434 | return new xmlrpcresp(new xmlrpcval(true,"boolean")); |
806 | 435 | } | ||
807 | 436 | return new xmlrpcresp(new xmlrpcval(false,"boolean")); | ||
808 | 420 | } | 437 | } |
809 | 421 | 438 | ||
810 | 422 | function set_product_stock($tiny_product) { | 439 | function set_product_stock($tiny_product) { |
813 | 423 | mysql_query("update products set products_quantity=".$tiny_product['quantity']." where products_id=".$tiny_product['product_id'].";"); | 440 | mysql_query("update ".TABLE_PRODUCTS." set products_quantity=".$tiny_product['quantity']." where products_id=".$tiny_product['product_id'].";"); |
814 | 424 | mysql_query("update products set products_status=".(($tiny_product['quantity']>0)?1:0)." where products_id=".$tiny_product['product_id'].";"); | 441 | mysql_query("update ".TABLE_PRODUCTS." set products_status=".(($tiny_product['quantity']>0)?1:0)." where products_id=".$tiny_product['product_id'].";"); |
815 | 425 | return new xmlrpcresp(new xmlrpcval(0,"int")); | 442 | return new xmlrpcresp(new xmlrpcval(0,"int")); |
816 | 426 | } | 443 | } |
817 | 427 | 444 | ||
818 | @@ -430,29 +447,29 @@ | |||
819 | 430 | $oscom_id = 0; | 447 | $oscom_id = 0; |
820 | 431 | 448 | ||
821 | 432 | if(array_key_exists('manufacturers_name',$tiny_product)) { | 449 | if(array_key_exists('manufacturers_name',$tiny_product)) { |
823 | 433 | $result = mysql_query("select l.languages_id from languages as l ,configuration as c where | 450 | $result = mysql_query("select l.languages_id from ".TABLE_LANGUAGES." as l ,configuration as c where |
824 | 434 | c.configuration_key='DEFAULT_LANGUAGE' and c.configuration_value=l.code;"); | 451 | c.configuration_key='DEFAULT_LANGUAGE' and c.configuration_value=l.code;"); |
825 | 435 | 452 | ||
826 | 436 | if ($result && $row = mysql_fetch_row($result)) { | 453 | if ($result && $row = mysql_fetch_row($result)) { |
827 | 437 | $lang_id = $row[0]; | 454 | $lang_id = $row[0]; |
828 | 438 | } | 455 | } |
830 | 439 | $result = mysql_query("select manufacturers_id from manufacturers where (manufacturers_name='".$tiny_product['manufacturers_name']."');"); | 456 | $result = mysql_query("select manufacturers_id from ".TABLE_MANUFACTURERS." where (manufacturers_name='".$tiny_product['manufacturers_name']."');"); |
831 | 440 | if ($result && $row = mysql_fetch_row($result)) { | 457 | if ($result && $row = mysql_fetch_row($result)) { |
832 | 441 | $id_exist = 1; | 458 | $id_exist = 1; |
833 | 442 | $oscom_id = $row[0]; | 459 | $oscom_id = $row[0]; |
834 | 443 | } | 460 | } |
835 | 444 | if ($id_exist == 0) { | 461 | if ($id_exist == 0) { |
837 | 445 | mysql_query("insert into manufacturers (manufacturers_name, date_added) values ('".$tiny_product['manufacturers_name']."', now());"); | 462 | mysql_query("insert into ".TABLE_MANUFACTURERS." (manufacturers_name, date_added) values ('".$tiny_product['manufacturers_name']."', now());"); |
838 | 446 | $oscom_id = mysql_insert_id(); | 463 | $oscom_id = mysql_insert_id(); |
840 | 447 | mysql_query("insert into manufacturers_info (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang_id.",'".$tiny_product['manufacturers_url']."');"); | 464 | mysql_query("insert into ".TABLE_MANUFACTURERS_INFO." (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang_id.",'".$tiny_product['manufacturers_url']."');"); |
841 | 448 | foreach ($tiny_product['manufacturer_langs'] as $lang=>$values){ | 465 | foreach ($tiny_product['manufacturer_langs'] as $lang=>$values){ |
843 | 449 | mysql_query("insert into manufacturers_info (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang.",'".$values['manufacturers_url']."');"); | 466 | mysql_query("insert into ".TABLE_MANUFACTURERS_INFO." (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang.",'".$values['manufacturers_url']."');"); |
844 | 450 | } | 467 | } |
845 | 451 | } else { | 468 | } else { |
847 | 452 | mysql_query("update manufacturers_info set manufacturers_url='".$tiny_product['manufacturers_url']."' where manufacturers_id=".$oscom_id." and languages_id=".$lang_id.";"); | 469 | mysql_query("update ".TABLE_MANUFACTURERS_INFO." set manufacturers_url='".$tiny_product['manufacturers_url']."' where manufacturers_id=".$oscom_id." and languages_id=".$lang_id.";"); |
848 | 453 | foreach ($tiny_product['manufacturer_langs'] as $lang=>$values){ | 470 | foreach ($tiny_product['manufacturer_langs'] as $lang=>$values){ |
851 | 454 | mysql_query("delete from manufacturers_info where manufacturers_id=".$oscom_id." and languages_id=".$lang.";"); | 471 | mysql_query("delete from ".TABLE_MANUFACTURERS_INFO." where manufacturers_id=".$oscom_id." and languages_id=".$lang.";"); |
852 | 455 | mysql_query("insert into manufacturers_info (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang.",'".$values['manufacturers_url']."');"); | 472 | mysql_query("insert into ".TABLE_MANUFACTURERS_INFO." (manufacturers_id, languages_id,manufacturers_url) values (".$oscom_id.",".$lang.",'".$values['manufacturers_url']."');"); |
853 | 456 | } | 473 | } |
854 | 457 | } | 474 | } |
855 | 458 | } | 475 | } |
856 | @@ -472,123 +489,31 @@ | |||
857 | 472 | $i = $i + 1; | 489 | $i = $i + 1; |
858 | 473 | } | 490 | } |
859 | 474 | foreach(array('_description','_to_categories','') as $key) { | 491 | foreach(array('_description','_to_categories','') as $key) { |
861 | 475 | mysql_query("delete from products".$key." where products_id in (".$a.");"); | 492 | mysql_query("delete from ".TABLE_PRODUCTS.$key." where products_id in (".$a.");"); |
862 | 476 | } | 493 | } |
863 | 477 | } | 494 | } |
864 | 478 | return new xmlrpcresp(new xmlrpcval(1, "int")); | 495 | return new xmlrpcresp(new xmlrpcval(1, "int")); |
865 | 479 | } | 496 | } |
866 | 480 | 497 | ||
867 | 481 | function del_spe_price($tiny_val) { | 498 | function del_spe_price($tiny_val) { |
869 | 482 | mysql_query("delete from specials where products_id = ".$tiny_val.";"); | 499 | mysql_query("delete from ".TABLE_SPECIALS." where products_id = ".$tiny_val.";"); |
870 | 483 | return new xmlrpcresp(new xmlrpcval(1, "int")); | 500 | return new xmlrpcresp(new xmlrpcval(1, "int")); |
871 | 484 | } | 501 | } |
872 | 485 | 502 | ||
873 | 486 | function set_product_spe($tiny_product) { | 503 | function set_product_spe($tiny_product) { |
967 | 487 | $lang_id = 1; | 504 | return set_product_classical($tiny_product,true); |
875 | 488 | $id_exist = 0; | ||
876 | 489 | |||
877 | 490 | ////////Check for existance of product_id /////////// | ||
878 | 491 | debug("localizando producto Oferta: select products_id from products where products_model='".$tiny_product['model']."'"); | ||
879 | 492 | $result = mysql_query("select products_id from products where (products_id=".$tiny_product['product_id'].");"); | ||
880 | 493 | if ($result && $row=mysql_fetch_row($result)) { | ||
881 | 494 | $id_exist = 1; | ||
882 | 495 | } | ||
883 | 496 | |||
884 | 497 | $result = mysql_query("select l.languages_id from languages as l configuration as c where c.configuration_key='DEFAULT_LANGUAGE' and c.configuration_value = l.code;"); | ||
885 | 498 | |||
886 | 499 | if ($result && $row = mysql_fetch_row($result)) { | ||
887 | 500 | $lang_id = $row[0]; | ||
888 | 501 | } | ||
889 | 502 | //if ($tiny_product['quantity']>0) { | ||
890 | 503 | // $tiny_product['status']=1; | ||
891 | 504 | //} else { | ||
892 | 505 | // $tiny_product['status']=0; | ||
893 | 506 | //} | ||
894 | 507 | $manufacturers_id = set_product_manufacturer($tiny_product); | ||
895 | 508 | if ($id_exist == 0) { | ||
896 | 509 | mysql_query("insert into products (products_quantity, products_model, products_price, products_weight, products_tax_class_id, products_status, manufacturers_id, products_date_added) values (".$tiny_product['quantity'].", '". $tiny_product['model']."', ".$tiny_product['price'].", ".$tiny_product['weight'].", ".$tiny_product['tax_class_id'].", ".$tiny_product['status'].", ".$manufacturers_id.", now());"); | ||
897 | 510 | |||
898 | 511 | $oscom_id = mysql_insert_id(); | ||
899 | 512 | if ( $tiny_product['date_available'] != 'NULL') { | ||
900 | 513 | mysql_query("update products set products_date_available='".$tiny_product['date_available']."' where products_id=".$oscom_id.";"); | ||
901 | 514 | } | ||
902 | 515 | mysql_query("insert into specials (products_id, specials_new_products_price, specials_date_added, date_status_change, status) values (".$oscom_id.",".$tiny_product['spe_price'].",now(),now(),".$tiny_product['spe_price_status'].");"); | ||
903 | 516 | if ( $tiny_product['exp_date'] != 'NULL') { | ||
904 | 517 | mysql_query("update specials set expires_date='".$tiny_product['exp_date']."' where products_id=".$oscom_id.";"); | ||
905 | 518 | } | ||
906 | 519 | mysql_query("insert into products_description (products_id, language_id, products_name, products_description, products_url) values (".$oscom_id.", ".$lang_id.", '".$tiny_product['name']."', '".$tiny_product['description']."', '".$tiny_product['url']."');"); | ||
907 | 520 | mysql_query("insert into products_to_categories (categories_id, products_id) values(".$tiny_product['category_id'].",".$oscom_id.");"); | ||
908 | 521 | foreach ($tiny_product['langs'] as $lang=>$values) { | ||
909 | 522 | mysql_query("insert into products_description(products_id, language_id, products_name, products_description, products_url) | ||
910 | 523 | values (".$oscom_id.", ".$lang.", '".$values['name']."', '".$values['description']."', '".$values['url']."');"); | ||
911 | 524 | } | ||
912 | 525 | } else { | ||
913 | 526 | debug("localizando producto Modelo existe: select products_id from products where products_id=".$tiny_product['product_id']); | ||
914 | 527 | $result = mysql_query("select products_id from products where (products_id=".$tiny_product['product_id'].");"); | ||
915 | 528 | if ($result && $row=mysql_fetch_row($result)) { | ||
916 | 529 | $id_exist = 1; | ||
917 | 530 | } | ||
918 | 531 | if ($id_exist){ | ||
919 | 532 | $oscom_id = $tiny_product['product_id']; | ||
920 | 533 | foreach (array('quantity', 'price', 'weight', 'tax_class_id', 'status', 'date_available') as $key) { | ||
921 | 534 | if ($key == 'date_available' and $tiny_product[$key] != 'NULL') { | ||
922 | 535 | mysql_query("update products set products_".$key."='".$tiny_product[$key]."' where products_id=".$oscom_id.";"); | ||
923 | 536 | } else { | ||
924 | 537 | mysql_query("update products set products_".$key."=".$tiny_product[$key]." where products_id=".$oscom_id.";"); | ||
925 | 538 | } | ||
926 | 539 | } | ||
927 | 540 | mysql_query("delete from specials where products_id=".$oscom_id.";"); | ||
928 | 541 | mysql_query("insert into specials (products_id, specials_new_products_price, specials_date_added, date_status_change, status) values (".$oscom_id.",".$tiny_product['spe_price'].",now(),now(),".$tiny_product['spe_price_status'].");"); | ||
929 | 542 | if ( $tiny_product['exp_date'] != 'NULL') { | ||
930 | 543 | mysql_query("update specials set expires_date='".$tiny_product['exp_date']."' where products_id=".$oscom_id.";"); | ||
931 | 544 | } | ||
932 | 545 | |||
933 | 546 | mysql_query("update products set products_model='".$tiny_product['model']."', manufacturers_id=".$manufacturers_id." where products_id=".$oscom_id.";"); | ||
934 | 547 | |||
935 | 548 | mysql_query("update products_to_categories set categories_id=".$tiny_product['category_id']." where products_id=".$oscom_id.";"); | ||
936 | 549 | foreach ($tiny_product['langs'] as $lang=>$values) { | ||
937 | 550 | mysql_query("update products_description set ". | ||
938 | 551 | " products_id = " . $oscom_id . | ||
939 | 552 | ", language_id = ". $lang . | ||
940 | 553 | ", products_name = '".$values['name']."'" . | ||
941 | 554 | ", products_description = '".$values['description']."'" . | ||
942 | 555 | ", products_url = '".$values['url']."'". | ||
943 | 556 | " where products_id=".$oscom_id." and language_id=".$lang.";"); | ||
944 | 557 | } | ||
945 | 558 | } | ||
946 | 559 | } | ||
947 | 560 | |||
948 | 561 | $cpt = 0; | ||
949 | 562 | if ($tiny_product['haspic']==1) { | ||
950 | 563 | if (file_exists('../../images/'.$cpt.'-'.$tiny_product['fname'])) { | ||
951 | 564 | unlink('../../images/'.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES | ||
952 | 565 | } | ||
953 | 566 | if ($hd = fopen('../../images/'.$cpt.'-'.$tiny_product['fname'], "w")) { | ||
954 | 567 | fwrite($hd, base64_decode($tiny_product['picture'])); | ||
955 | 568 | fclose($hd); | ||
956 | 569 | mysql_query("update products set products_image='".$cpt."-".$tiny_product['fname']."' where products_id=".$oscom_id.";"); | ||
957 | 570 | } | ||
958 | 571 | } else if ($tiny_product['haspic']==2) { | ||
959 | 572 | if (file_exists('../../images/'.$cpt.'-'.$tiny_product['fname'])) { | ||
960 | 573 | unlink('../../images/'.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES | ||
961 | 574 | } | ||
962 | 575 | mysql_query("update products set products_image='".$tiny_product['fname']."' where products_id=".$oscom_id.";"); | ||
963 | 576 | } else { | ||
964 | 577 | mysql_query("update products set products_image=NULL where products_id=".$oscom_id.";"); | ||
965 | 578 | } | ||
966 | 579 | return new xmlrpcresp(new xmlrpcval($oscom_id, "int")); | ||
968 | 580 | } | 505 | } |
969 | 581 | 506 | ||
971 | 582 | function set_product_classical($tiny_product) { | 507 | function set_product_classical($tiny_product,$spe = false ) { |
972 | 583 | $lang_id = 1; | 508 | $lang_id = 1; |
973 | 584 | $id_exist = 0; | 509 | $id_exist = 0; |
974 | 585 | 510 | ||
975 | 586 | ////////Check for existance of product /////////// | 511 | ////////Check for existance of product /////////// |
977 | 587 | $result = mysql_query("select products_id from products where (products_id=".$tiny_product['product_id'].");"); | 512 | $result = mysql_query("select products_id from ".TABLE_PRODUCTS." where (products_id=".$tiny_product['product_id'].");"); |
978 | 588 | if ($result && $row=mysql_fetch_row($result)) { | 513 | if ($result && $row=mysql_fetch_row($result)) { |
979 | 589 | $id_exist = 1; | 514 | $id_exist = 1; |
980 | 590 | } | 515 | } |
982 | 591 | $result = mysql_query("select l.languages_id from languages as l configuration as c where c.configuration_key='DEFAULT_LANGUAGE' and c.configuration_value=l.code;"); | 516 | $result = mysql_query("select l.languages_id from ".TABLE_LANGUAGES." as l, ".TABLE_CONFIGURATION." as c where c.configuration_key='DEFAULT_LANGUAGE' and c.configuration_value=l.code;"); |
983 | 592 | 517 | ||
984 | 593 | if ($result && $row = mysql_fetch_row($result)) { | 518 | if ($result && $row = mysql_fetch_row($result)) { |
985 | 594 | $lang_id = $row[0]; | 519 | $lang_id = $row[0]; |
986 | @@ -600,75 +525,87 @@ | |||
987 | 600 | //} | 525 | //} |
988 | 601 | $manufacturers_id = set_product_manufacturer($tiny_product); | 526 | $manufacturers_id = set_product_manufacturer($tiny_product); |
989 | 602 | if ($id_exist == 0) { | 527 | if ($id_exist == 0) { |
991 | 603 | mysql_query("insert into products (products_quantity, products_model, products_price, products_weight, products_tax_class_id, products_status, manufacturers_id, products_date_added) values (".$tiny_product['quantity'].", '". $tiny_product['model']."', ".$tiny_product['price'].", ".$tiny_product['weight'].", ".$tiny_product['tax_class_id'].", ".$tiny_product['status'].", ".$manufacturers_id.", now());"); | 528 | mysql_query("insert into ".TABLE_PRODUCTS." (products_quantity, products_model, products_price, products_weight, products_tax_class_id, products_status, manufacturers_id, products_date_added) values (".$tiny_product['quantity'].", '". $tiny_product['model']."', ".$tiny_product['price'].", ".$tiny_product['weight'].", ".$tiny_product['tax_class_id'].", ".$tiny_product['status'].", ".$manufacturers_id.", now());"); |
992 | 604 | 529 | ||
993 | 605 | $oscom_id = mysql_insert_id(); | 530 | $oscom_id = mysql_insert_id(); |
994 | 606 | if ( $tiny_product['date_available'] != 'NULL') { | 531 | if ( $tiny_product['date_available'] != 'NULL') { |
999 | 607 | mysql_query("update products set products_date_available='".$tiny_product['date_available']."' where products_id=".$oscom_id.";"); | 532 | mysql_query("update ".TABLE_PRODUCTS." set products_date_available='".$tiny_product['date_available']."' where products_id=".$oscom_id.";"); |
1000 | 608 | } | 533 | } |
1001 | 609 | mysql_query("insert into products_description (products_id, language_id, products_name, products_description, products_url) values (".$oscom_id.", ".$lang_id.", '".$tiny_product['name']."', '".$tiny_product['description']."', '".$tiny_product['url']."');"); | 534 | if($spe){ |
1002 | 610 | mysql_query("insert into products_to_categories (categories_id, products_id) values(".$tiny_product['category_id'].",".$oscom_id.");"); | 535 | mysql_query("insert into ".TABLE_SPECIALS." (products_id, specials_new_products_price, specials_date_added, date_status_change, status) values (".$oscom_id.",".$tiny_product['spe_price'].",now(),now(),".$tiny_product['spe_price_status'].");"); |
1003 | 536 | if ( $tiny_product['exp_date'] != 'NULL') { | ||
1004 | 537 | mysql_query("update ".TABLE_SPECIALS." set expires_date='".$tiny_product['exp_date']."' where products_id=".$oscom_id.";"); | ||
1005 | 538 | } | ||
1006 | 539 | } | ||
1007 | 540 | mysql_query("insert into ".TABLE_PRODUCTS_DESCRIPTION." (products_id, language_id, products_name, products_description, products_url) values (".$oscom_id.", ".$lang_id.", '".$tiny_product['name']."', '".$tiny_product['description']."', '".$tiny_product['url']."');"); | ||
1008 | 541 | mysql_query("insert into ".TABLE_PRODUCTS_TO_CATEGORIES." (categories_id, products_id) values(".$tiny_product['category_id'].",".$oscom_id.");"); | ||
1009 | 611 | foreach ($tiny_product['langs'] as $lang=>$values) { | 542 | foreach ($tiny_product['langs'] as $lang=>$values) { |
1011 | 612 | mysql_query("insert into products_description(products_id, language_id, products_name, products_description, products_url) | 543 | mysql_query("insert into ".TABLE_PRODUCTS_DESCRIPTION." (products_id, language_id, products_name, products_description, products_url) |
1012 | 613 | values (".$oscom_id.", ".$lang.", '".$values['name']."', '".$values['description']."', '".$values['url']."');"); | 544 | values (".$oscom_id.", ".$lang.", '".$values['name']."', '".$values['description']."', '".$values['url']."');"); |
1013 | 614 | } | 545 | } |
1014 | 615 | } else { | 546 | } else { |
1017 | 616 | debug("localizando producto Modelo existe: select products_id from products where products_id=".$tiny_product['product_id']); | 547 | $sql = "select products_id from ".TABLE_PRODUCTS." where (products_id=".$tiny_product['product_id'].");"; |
1018 | 617 | $result = mysql_query("select products_id from products where (products_id=".$tiny_product['product_id'].");"); | 548 | debug("localizando producto Modelo existe: ".$sql); |
1019 | 549 | $result = mysql_query($sql); | ||
1020 | 618 | if ($result && $row=mysql_fetch_row($result)) { | 550 | if ($result && $row=mysql_fetch_row($result)) { |
1021 | 619 | $id_exist = 1; | 551 | $id_exist = 1; |
1022 | 620 | } | 552 | } |
1023 | 621 | if ($id_exist){ | 553 | if ($id_exist){ |
1039 | 622 | 554 | ||
1040 | 623 | $oscom_id = $tiny_product['product_id']; | 555 | $oscom_id = $tiny_product['product_id']; |
1041 | 624 | foreach (array('quantity', 'price', 'weight', 'tax_class_id', 'status', 'date_available') as $key) { | 556 | foreach (array('quantity', 'price', 'weight', 'tax_class_id', 'status', 'date_available') as $key) { |
1042 | 625 | if ($key == 'date_available' and $tiny_product[$key] != 'NULL') { | 557 | if ($key == 'date_available' and $tiny_product[$key] != 'NULL') { |
1043 | 626 | mysql_query("update products set products_".$key."='".$tiny_product[$key]."' where products_id=".$oscom_id.";"); | 558 | mysql_query("update ".TABLE_PRODUCTS." set products_".$key."='".$tiny_product[$key]."' where products_id=".$oscom_id.";"); |
1044 | 627 | } else { | 559 | } else { |
1045 | 628 | mysql_query("update products set products_".$key."=".$tiny_product[$key]." where products_id=".$oscom_id.";"); | 560 | mysql_query("update ".TABLE_PRODUCTS." set products_".$key."=".$tiny_product[$key]." where products_id=".$oscom_id.";"); |
1046 | 629 | } | 561 | } |
1047 | 630 | } | 562 | } |
1048 | 631 | 563 | if($spe){ | |
1049 | 632 | mysql_query("update products set products_model='".$tiny_product['model']."', manufacturers_id=".$manufacturers_id." where products_id=".$oscom_id.";"); | 564 | mysql_query("delete from ".TABLE_SPECIALS." where products_id=".$oscom_id.";"); |
1050 | 633 | 565 | mysql_query("insert into ".TABLE_SPECIALS." (products_id, specials_new_products_price, specials_date_added, date_status_change, status) values (".$oscom_id.",".$tiny_product['spe_price'].",now(),now(),".$tiny_product['spe_price_status'].");"); | |
1051 | 634 | mysql_query("update products_to_categories set categories_id=".$tiny_product['category_id']." where products_id=".$oscom_id.";"); | 566 | if ( $tiny_product['exp_date'] != 'NULL') { |
1052 | 635 | foreach ($tiny_product['langs'] as $lang=>$values) { | 567 | mysql_query("update ".TABLE_SPECIALS." set expires_date='".$tiny_product['exp_date']."' where products_id=".$oscom_id.";"); |
1053 | 636 | mysql_query("update products_description set ". | 568 | } |
1054 | 569 | } | ||
1055 | 570 | mysql_query("update ".TABLE_PRODUCTS." set products_model='".$tiny_product['model']."', manufacturers_id=".$manufacturers_id." where products_id=".$oscom_id.";"); | ||
1056 | 571 | |||
1057 | 572 | mysql_query("update ".TABLE_PRODUCTS_TO_CATEGORIES." set categories_id=".$tiny_product['category_id']." where products_id=".$oscom_id.";"); | ||
1058 | 573 | foreach ($tiny_product['langs'] as $lang=>$values) { | ||
1059 | 574 | mysql_query("update ".TABLE_PRODUCTS_DESCRIPTION." set ". | ||
1060 | 637 | " products_id = " . $oscom_id . | 575 | " products_id = " . $oscom_id . |
1061 | 638 | ", language_id = ". $lang . | 576 | ", language_id = ". $lang . |
1062 | 639 | ", products_name = '".$values['name']."'" . | 577 | ", products_name = '".$values['name']."'" . |
1063 | 640 | ", products_description = '".$values['description']."'" . | 578 | ", products_description = '".$values['description']."'" . |
1064 | 641 | ", products_url = '".$values['url']."'". | 579 | ", products_url = '".$values['url']."'". |
1065 | 642 | " where products_id=".$oscom_id." and language_id=".$lang.";"); | 580 | " where products_id=".$oscom_id." and language_id=".$lang.";"); |
1066 | 581 | } | ||
1067 | 643 | } | 582 | } |
1068 | 644 | } | 583 | } |
1069 | 645 | } | ||
1070 | 646 | $cpt = 0; | 584 | $cpt = 0; |
1071 | 647 | if ($tiny_product['haspic']==1) { | 585 | if ($tiny_product['haspic']==1) { |
1074 | 648 | if (file_exists('../../images/'.$cpt.'-'.$tiny_product['fname'])) { | 586 | if (file_exists(DIR_WS_CATALOG_IMAGES.$cpt.'-'.$tiny_product['fname'])) { |
1075 | 649 | unlink('../../images/'.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES | 587 | unlink(DIR_WS_CATALOG_IMAGES.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES |
1076 | 650 | } | 588 | } |
1078 | 651 | if ($hd=fopen('../../images/'.$cpt.'-'.$tiny_product['fname'], "w")){ | 589 | if ($hd=fopen(DIR_WS_CATALOG_IMAGES.$cpt.'-'.$tiny_product['fname'], "w")){ |
1079 | 652 | fwrite($hd, base64_decode($tiny_product['picture'])); | 590 | fwrite($hd, base64_decode($tiny_product['picture'])); |
1080 | 653 | fclose($hd); | 591 | fclose($hd); |
1082 | 654 | mysql_query("update products set products_image='".$cpt."-".$tiny_product['fname']."' where products_id=".$oscom_id.";"); | 592 | mysql_query("update ".TABLE_PRODUCTS." set products_image='".$cpt."-".$tiny_product['fname']."' where products_id=".$oscom_id.";"); |
1083 | 655 | } | 593 | } |
1084 | 656 | } else if ($tiny_product['haspic']==2) { | 594 | } else if ($tiny_product['haspic']==2) { |
1087 | 657 | if (file_exists('../../images/'.$cpt.'-'.$tiny_product['fname'])) { | 595 | if (file_exists(DIR_WS_CATALOG_IMAGES.$cpt.'-'.$tiny_product['fname'])) { |
1088 | 658 | unlink('../../images/'.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES | 596 | unlink(DIR_WS_CATALOG_IMAGES.$cpt.'-'.$tiny_product['fname']); // DELETE THE EXISTING IMAGES |
1089 | 659 | } | 597 | } |
1091 | 660 | mysql_query("update products set products_image='".$tiny_product['fname']."' where products_id=".$oscom_id.";"); | 598 | mysql_query("update ".TABLE_PRODUCTS." set products_image='".$tiny_product['fname']."' where products_id=".$oscom_id.";"); |
1092 | 661 | } else { | 599 | } else { |
1094 | 662 | mysql_query("update products set products_image=NULL where products_id=".$oscom_id.";"); | 600 | mysql_query("update ".TABLE_PRODUCTS." set products_image=NULL where products_id=".$oscom_id.";"); |
1095 | 663 | } | 601 | } |
1096 | 664 | return new xmlrpcresp(new xmlrpcval($oscom_id, "int")); | 602 | return new xmlrpcresp(new xmlrpcval($oscom_id, "int")); |
1097 | 665 | } | 603 | } |
1098 | 666 | 604 | ||
1099 | 667 | |||
1100 | 668 | function get_order_address($address_condition, $oscom_id, $name, $street, $street2, $zip, $city, $state, $zone, $country, $email="", $phone="", $fax="") { | 605 | function get_order_address($address_condition, $oscom_id, $name, $street, $street2, $zip, $city, $state, $zone, $country, $email="", $phone="", $fax="") { |
1101 | 669 | $addresses = array(); | 606 | $addresses = array(); |
1104 | 670 | $num_rows = 0; | 607 | $num_rows = 0; |
1105 | 671 | $query = "SELECT address_book_id,CONCAT(entry_firstname,' ',entry_lastname) as name, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id FROM address_book"; | 608 | $query = "SELECT address_book_id,CONCAT(entry_firstname,' ',entry_lastname) as name, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id FROM ".TABLE_ADDRESS_BOOK; |
1106 | 672 | //debug("Init address controll:". $name . "-zip: ". $zip . "-city" . $city . "-state" . $state . "-country" . $country); | 609 | //debug("Init address controll:". $name . "-zip: ". $zip . "-city" . $city . "-state" . $state . "-country" . $country); |
1107 | 673 | 610 | ||
1108 | 674 | if (is_array($address_condition)) { | 611 | if (is_array($address_condition)) { |
1109 | @@ -692,7 +629,7 @@ | |||
1110 | 692 | } | 629 | } |
1111 | 693 | $result = mysql_query($query.$where); | 630 | $result = mysql_query($query.$where); |
1112 | 694 | $num_rows = mysql_num_rows($result); | 631 | $num_rows = mysql_num_rows($result); |
1114 | 695 | } | 632 | } |
1115 | 696 | if ($num_rows>0) { | 633 | if ($num_rows>0) { |
1116 | 697 | return get_partner_address($address_condition,$email, $phone, $fax); | 634 | return get_partner_address($address_condition,$email, $phone, $fax); |
1117 | 698 | } | 635 | } |
1118 | @@ -708,16 +645,16 @@ | |||
1119 | 708 | $state_data = get_state_detail($country,$state_name); | 645 | $state_data = get_state_detail($country,$state_name); |
1120 | 709 | $ret_address = array( | 646 | $ret_address = array( |
1121 | 710 | "esale_oscom_id" => new xmlrpcval($oscom_id,"int"), | 647 | "esale_oscom_id" => new xmlrpcval($oscom_id,"int"), |
1127 | 711 | "name" => new xmlrpcval(clean_special_chars($name),"string"), | 648 | "name" => new xmlrpcval(utf8_encode($name),"string"), |
1128 | 712 | "street" => new xmlrpcval(clean_special_chars($street),"string"), | 649 | "street" => new xmlrpcval(utf8_encode($street),"string"), |
1129 | 713 | "street2" => new xmlrpcval(clean_special_chars($street2),"string"), | 650 | "street2" => new xmlrpcval(utf8_encode($street2),"string"), |
1130 | 714 | "zip" => new xmlrpcval(clean_special_chars($zip),"string"), | 651 | "zip" => new xmlrpcval(utf8_encode($zip),"string"), |
1131 | 715 | "city" => new xmlrpcval(clean_special_chars($city),"string"), | 652 | "city" => new xmlrpcval(utf8_encode($city),"string"), |
1132 | 716 | "state" => $state_data, | 653 | "state" => $state_data, |
1133 | 717 | "country" => $country_data, | 654 | "country" => $country_data, |
1137 | 718 | "email" => new xmlrpcval(clean_special_chars($email),"string"), | 655 | "email" => new xmlrpcval(utf8_encode($email),"string"), |
1138 | 719 | "phone" => new xmlrpcval(clean_special_chars($phone),"string"), | 656 | "phone" => new xmlrpcval(utf8_encode($phone),"string"), |
1139 | 720 | "fax" => new xmlrpcval(clean_special_chars($fax),"string") | 657 | "fax" => new xmlrpcval(utf8_encode($fax),"string") |
1140 | 721 | ); | 658 | ); |
1141 | 722 | 659 | ||
1142 | 723 | $addresses[] = new xmlrpcval($ret_address,"struct"); | 660 | $addresses[] = new xmlrpcval($ret_address,"struct"); |
1143 | @@ -729,7 +666,7 @@ | |||
1144 | 729 | 666 | ||
1145 | 730 | function get_partner_address($address_condition, $email="", $phone="", $fax="") { | 667 | function get_partner_address($address_condition, $email="", $phone="", $fax="") { |
1146 | 731 | $addresses = array(); | 668 | $addresses = array(); |
1148 | 732 | $query = "SELECT address_book_id,CONCAT(entry_firstname,' ',entry_lastname) as name, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id FROM address_book"; | 669 | $query = "SELECT address_book_id,CONCAT(entry_firstname,' ',entry_lastname) as name, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id FROM ".TABLE_ADDRESS_BOOK; |
1149 | 733 | 670 | ||
1150 | 734 | if (is_array($address_condition)) { | 671 | if (is_array($address_condition)) { |
1151 | 735 | $where = " where "; | 672 | $where = " where "; |
1152 | @@ -762,16 +699,16 @@ | |||
1153 | 762 | $state_data = get_state_detail($row_address['entry_country_id'],$state_name); | 699 | $state_data = get_state_detail($row_address['entry_country_id'],$state_name); |
1154 | 763 | $ret_address = array( | 700 | $ret_address = array( |
1155 | 764 | "esale_oscom_id" => new xmlrpcval($row_address['address_book_id'],"int"), | 701 | "esale_oscom_id" => new xmlrpcval($row_address['address_book_id'],"int"), |
1161 | 765 | "name" => new xmlrpcval(clean_special_chars($row_address['name']),"string"), | 702 | "name" => new xmlrpcval(utf8_encode($row_address['name']),"string"), |
1162 | 766 | "street" => new xmlrpcval(clean_special_chars($row_address['entry_street_address']),"string"), | 703 | "street" => new xmlrpcval(utf8_encode($row_address['entry_street_address']),"string"), |
1163 | 767 | "street2" => new xmlrpcval(clean_special_chars($row_address['entry_suburb']),"string"), | 704 | "street2" => new xmlrpcval(utf8_encode($row_address['entry_suburb']),"string"), |
1164 | 768 | "zip" => new xmlrpcval(clean_special_chars($row_address['entry_postcode']),"string"), | 705 | "zip" => new xmlrpcval(utf8_encode($row_address['entry_postcode']),"string"), |
1165 | 769 | "city" => new xmlrpcval(clean_special_chars($row_address['entry_city']),"string"), | 706 | "city" => new xmlrpcval(utf8_encode($row_address['entry_city']),"string"), |
1166 | 770 | "state" => $state_data, | 707 | "state" => $state_data, |
1167 | 771 | "country" => $country_data, | 708 | "country" => $country_data, |
1171 | 772 | "email" => new xmlrpcval(clean_special_chars($email),"string"), | 709 | "email" => new xmlrpcval(utf8_encode($email),"string"), |
1172 | 773 | "phone" => new xmlrpcval(clean_special_chars($phone),"string"), | 710 | "phone" => new xmlrpcval(utf8_encode($phone),"string"), |
1173 | 774 | "fax" => new xmlrpcval(clean_special_chars($fax),"string") | 711 | "fax" => new xmlrpcval(utf8_encode($fax),"string") |
1174 | 775 | ); | 712 | ); |
1175 | 776 | $addresses[] = new xmlrpcval($ret_address,"struct"); | 713 | $addresses[] = new xmlrpcval($ret_address,"struct"); |
1176 | 777 | } | 714 | } |
1177 | @@ -781,52 +718,22 @@ | |||
1178 | 781 | 718 | ||
1179 | 782 | function get_customer($cust_id) { | 719 | function get_customer($cust_id) { |
1180 | 783 | $ret_partners = array(); | 720 | $ret_partners = array(); |
1191 | 784 | $condition = ''; | 721 | $query = "SELECT customers_id, CONCAT(customers_firstname,' ',customers_lastname) as name, customers_email_address, customers_default_address_id, customers_telephone, customers_fax from ".TABLE_CUSTOMERS.($cust_id != 0?" where customers_id=".$cust_id:""); |
1192 | 785 | $file="../../temp/logsynchrophp.txt"; | 722 | $result = mysql_query($query); |
1193 | 786 | $f=fopen($file,"a"); | 723 | |
1184 | 787 | |||
1185 | 788 | $query = "SELECT customers_id, CONCAT(customers_firstname,' ',customers_lastname) as name, customers_email_address, customers_default_address_id, customers_telephone, customers_fax from customers"; | ||
1186 | 789 | |||
1187 | 790 | if ($cust_id != 0) { | ||
1188 | 791 | $condition = " where customers_id=".$cust_id; | ||
1189 | 792 | } | ||
1190 | 793 | $result = mysql_query($query.$condition.';'); | ||
1194 | 794 | if ($result) while ($row_cust=mysql_fetch_array($result, MYSQL_ASSOC)) { | 724 | if ($result) while ($row_cust=mysql_fetch_array($result, MYSQL_ASSOC)) { |
1195 | 795 | $addresses = get_partner_address(array('customers_id'=>$row_cust['customers_id'])); | 725 | $addresses = get_partner_address(array('customers_id'=>$row_cust['customers_id'])); |
1196 | 726 | $query_company = "select IF(isnull(entry_nif) OR entry_nif='','23232323T',entry_nif) entry_nif,IF(isnull(entry_company) OR entry_company='','NO_COMPANY',entry_company) entry_company from ".TABLE_ADDRESS_BOOK." where customers_id = " .$row_cust['customers_id']; | ||
1197 | 727 | $result_company = mysql_fetch_array(mysql_query($query_company), MYSQL_ASSOC); | ||
1198 | 796 | $partner = array(); | 728 | $partner = array(); |
1199 | 729 | //$partner['nif'] = $result_company[0]; | ||
1200 | 730 | //$partner['company'] = new xmlrpcval($result_company['entry_company'], "string"); | ||
1201 | 797 | $partner['esale_oscom_id'] = new xmlrpcval($row_cust['customers_id'],"int"); | 731 | $partner['esale_oscom_id'] = new xmlrpcval($row_cust['customers_id'],"int"); |
1234 | 798 | $partner['name'] = new xmlrpcval(clean_special_chars($row_cust['name']),"string"); | 732 | $partner['vat'] = new xmlrpcval("ES" . $result_company['entry_nif'], "string"); |
1235 | 799 | 733 | if ($partner['company']<> 'NO_COMPANY' ) { | |
1236 | 800 | //!!!!!!!!!!! BE CAREFULL, ENTRY_NIF is VAT NUMBER IN SPAIN, if you obtain | 734 | $partner['name'] = new xmlrpcval(utf8_encode($row_cust['name']),"string"); |
1237 | 801 | ///// response error when executing sales order download, remove the field or addecuate the name | 735 | }else { |
1238 | 802 | $query_company = "select a.entry_nif, a.entry_company | 736 | $partner['name'] = new xmlrpcval(utf8_encode($partner['company']),"string"); |
1207 | 803 | from address_book a, customers c | ||
1208 | 804 | where c.customers_id = " . $row_cust['customers_id'] . " and a.address_book_id = c.customers_default_address_id;"; | ||
1209 | 805 | $result_company = mysql_query($query_company); | ||
1210 | 806 | if ($result_company) while ($row_nif=mysql_fetch_array($result_company, MYSQL_ASSOC)) { | ||
1211 | 807 | $cif_nif = str_replace(' ', '',str_replace('-', '',strtoupper($row_nif['entry_nif']))); | ||
1212 | 808 | fwrite($f, "TRATANDO NIF: " . $cif_nif . " -- Longitud: " . strlen($cif_nif) ); | ||
1213 | 809 | |||
1214 | 810 | if (strlen($cif_nif)== 9) { | ||
1215 | 811 | $partner['vat'] = new xmlrpcval("ES" . clean_special_chars($cif_nif), "string"); | ||
1216 | 812 | fwrite($f, " -- NIF CORRECTO: " . "ES" . $cif_nif); | ||
1217 | 813 | fwrite($f, " -- Nombre: " . $row_cust['name']); | ||
1218 | 814 | fwrite($f, " -- Compania: " . $row_nif['entry_company']. " -- IDCliente: " . $row_cust['customers_id'] . "\n"); | ||
1219 | 815 | }else { | ||
1220 | 816 | $cif_nif = "01234567L"; | ||
1221 | 817 | $partner['vat'] = new xmlrpcval("ES" . clean_special_chars($cif_nif), "string"); | ||
1222 | 818 | fwrite($f, " -- ERROR EN NIF: " . "ES" . $cif_nif); | ||
1223 | 819 | fwrite($f, " -- Nombre: " . $row_cust['name']); | ||
1224 | 820 | fwrite($f, " -- Compania " . $row_nif['entry_company']. " -- IDCliente " . $row_cust['customers_id'] . "\n"); | ||
1225 | 821 | } | ||
1226 | 822 | |||
1227 | 823 | if ($row_nif['entry_company']!= '' ) { | ||
1228 | 824 | $partner['name'] = new xmlrpcval(clean_special_chars($row_nif['entry_company']),"string"); | ||
1229 | 825 | fwrite($f, "existe compania " . $row_nif['entry_company'] . "\n"); | ||
1230 | 826 | }else{ | ||
1231 | 827 | $partner['name'] = new xmlrpcval(clean_special_chars($row_cust['name']),"string"); | ||
1232 | 828 | fwrite($f, "NO existe compania " . $partner['company'] . "\n"); | ||
1233 | 829 | } | ||
1239 | 830 | } | 737 | } |
1240 | 831 | $partner['addresses'] = $addresses; | 738 | $partner['addresses'] = $addresses; |
1241 | 832 | $ret_partners[] = new xmlrpcval($partner,"struct"); | 739 | $ret_partners[] = new xmlrpcval($partner,"struct"); |
1242 | @@ -836,8 +743,7 @@ | |||
1243 | 836 | 743 | ||
1244 | 837 | 744 | ||
1245 | 838 | function get_country_detail($country_name) { | 745 | function get_country_detail($country_name) { |
1248 | 839 | $query = "select countries_id, countries_name, countries_iso_code_2, countries_iso_code_3 from countries"; | 746 | $query = "select countries_id, countries_name, countries_iso_code_2, countries_iso_code_3 from ".TABLE_COUNTRIES; |
1247 | 840 | $ret_country = '0'; | ||
1249 | 841 | 747 | ||
1250 | 842 | if (!is_numeric($country_name)) { | 748 | if (!is_numeric($country_name)) { |
1251 | 843 | if($country_name != '') { | 749 | if($country_name != '') { |
1252 | @@ -849,19 +755,24 @@ | |||
1253 | 849 | if ($result && $row=mysql_fetch_row($result)) { | 755 | if ($result && $row=mysql_fetch_row($result)) { |
1254 | 850 | $ret_country = new xmlrpcval( array ( | 756 | $ret_country = new xmlrpcval( array ( |
1255 | 851 | "esale_oscom_id" => new xmlrpcval($row[0],"int"), | 757 | "esale_oscom_id" => new xmlrpcval($row[0],"int"), |
1259 | 852 | "name" => new xmlrpcval(clean_special_chars($row[1]),"string"), | 758 | "name" => new xmlrpcval(utf8_encode($row[1]),"string"), |
1260 | 853 | "code" => new xmlrpcval(clean_special_chars($row[2]),"string"), | 759 | "code" => new xmlrpcval(utf8_encode($row[2]),"string"), |
1261 | 854 | "code3" => new xmlrpcval(clean_special_chars($row[3]),"string") | 760 | "code3" => new xmlrpcval(utf8_encode($row[3]),"string") |
1262 | 855 | ),"struct"); | 761 | ),"struct"); |
1263 | 856 | return $ret_country; | 762 | return $ret_country; |
1264 | 857 | } | 763 | } |
1266 | 858 | return new xmlrpcval($ret_country,'string'); | 764 | return new xmlrpcval( array ( |
1267 | 765 | "esale_oscom_id" => new xmlrpcval(0,"int"), | ||
1268 | 766 | "name" => new xmlrpcval("UNKNOWN","string"), | ||
1269 | 767 | "code" => new xmlrpcval("UN","string"), | ||
1270 | 768 | "code3" => new xmlrpcval("UNK","string") | ||
1271 | 769 | ),"struct"); | ||
1272 | 859 | } | 770 | } |
1273 | 860 | 771 | ||
1274 | 861 | 772 | ||
1275 | 862 | function get_state_detail($country_id,$state_name) { | 773 | function get_state_detail($country_id,$state_name) { |
1276 | 863 | $ret_state = '0'; | 774 | $ret_state = '0'; |
1278 | 864 | $query = "select zone_id, zone_code, zone_name from zones"; | 775 | $query = "select zone_id, zone_code, zone_name from ".TABLE_ZONES; |
1279 | 865 | $condition = ''; | 776 | $condition = ''; |
1280 | 866 | 777 | ||
1281 | 867 | if (!is_numeric($state_name)) { | 778 | if (!is_numeric($state_name)) { |
1282 | @@ -875,42 +786,49 @@ | |||
1283 | 875 | if ($result && $row=mysql_fetch_row($result)) { | 786 | if ($result && $row=mysql_fetch_row($result)) { |
1284 | 876 | $ret_state = new xmlrpcval( array ( | 787 | $ret_state = new xmlrpcval( array ( |
1285 | 877 | "esale_oscom_id" => new xmlrpcval($row[0],"int"), | 788 | "esale_oscom_id" => new xmlrpcval($row[0],"int"), |
1288 | 878 | "name" => new xmlrpcval(clean_special_chars($row[2]),"string"), | 789 | "name" => new xmlrpcval(utf8_encode($row[2]),"string"), |
1289 | 879 | "code" => new xmlrpcval(clean_special_chars($row[1]),"string") | 790 | "code" => new xmlrpcval(utf8_encode($row[1]),"string") |
1290 | 880 | ),"struct"); | 791 | ),"struct"); |
1291 | 881 | return $ret_state; | 792 | return $ret_state; |
1292 | 882 | } | 793 | } |
1293 | 883 | $ret_state = new xmlrpcval( array ( | 794 | $ret_state = new xmlrpcval( array ( |
1294 | 884 | "esale_oscom_id" => new xmlrpcval(0,"int"), | 795 | "esale_oscom_id" => new xmlrpcval(0,"int"), |
1296 | 885 | "name" => new xmlrpcval(clean_special_chars($state_name),"string"), | 796 | "name" => new xmlrpcval(utf8_encode($state_name),"string"), |
1297 | 886 | "code" => new xmlrpcval('',"string") | 797 | "code" => new xmlrpcval('',"string") |
1298 | 887 | ),"struct"); | 798 | ),"struct"); |
1299 | 888 | return $ret_state; | 799 | return $ret_state; |
1300 | 889 | } | 800 | } |
1301 | 890 | 801 | ||
1302 | 891 | 802 | ||
1304 | 892 | function get_saleorders($last_so, $statuses_ids) { | 803 | function get_saleorders($last_so, $statuses_ids, $block_size=100) { |
1305 | 893 | $saleorders = array(); | 804 | $saleorders = array(); |
1306 | 894 | $status_ids = implode(", ", $statuses_ids); | 805 | $status_ids = implode(", ", $statuses_ids); |
1307 | 895 | 806 | ||
1314 | 896 | 807 | $result = mysql_query("SELECT `orders_id` , `customers_name` , `customers_street_address` , `customers_city` , `customers_postcode` , `customers_state` , `customers_country` , `customers_email_address`, `customers_telephone` , `delivery_name` , `delivery_street_address` , `delivery_city` , `delivery_postcode` , `delivery_state` , `delivery_country` , `billing_name` , `billing_street_address` , `billing_city` , `billing_postcode` , `billing_state` , `billing_country` , `date_purchased` , `orders_status`, `customers_id`, `payment_method`, `customers_id`,`customers_company`,`delivery_company`,`billing_company` | |
1315 | 897 | debug("SELECT `orders_id` , `customers_name` , `customers_street_address` , `customers_city` , `customers_postcode` , `customers_state` , `customers_country` , `customers_telephone` , `customers_email_address` , `delivery_name` , `delivery_street_address` , `delivery_city` , `delivery_postcode` , `delivery_state` , `delivery_country` , `billing_name` , `billing_street_address` , `billing_city` , `billing_postcode` , `billing_state` , `billing_country` , `date_purchased` , `orders_status`, `customers_id`, `payment_method`, `customers_id`,`customers_company`,`delivery_company`,`billing_company` | 808 | FROM ".TABLE_ORDERS." where (orders_id > ".$last_so." and orders_status in (" . $status_ids . ")) order by orders_id limit ".$block_size.";"); |
1310 | 898 | FROM `orders` where (orders_id > ".$last_so." and orders_status in (" . $status_ids . ")) order by orders_id limit 1;"); | ||
1311 | 899 | |||
1312 | 900 | $result = mysql_query("SELECT `orders_id` , `customers_name` , `customers_street_address` , `customers_city` , `customers_postcode` , `customers_state` , `customers_country` , `customers_telephone` , `customers_email_address` , `delivery_name` , `delivery_street_address` , `delivery_city` , `delivery_postcode` , `delivery_state` , `delivery_country` , `billing_name` , `billing_street_address` , `billing_city` , `billing_postcode` , `billing_state` , `billing_country` , `date_purchased` , `orders_status`, `customers_id`, `payment_method`, `customers_id`,`customers_company`,`delivery_company`,`billing_company` | ||
1313 | 901 | FROM `orders` where (orders_id > ".$last_so." and orders_status in (" . $status_ids . ")) order by orders_id limit 1;"); | ||
1316 | 902 | 809 | ||
1317 | 903 | if ($result){ | 810 | if ($result){ |
1318 | 904 | while ($row = mysql_fetch_row($result)) { | 811 | while ($row = mysql_fetch_row($result)) { |
1319 | 905 | debug("En pedido while: " . $row[0]); | ||
1320 | 906 | $shopping_price = 0; | 812 | $shopping_price = 0; |
1322 | 907 | $result_shopping = mysql_query("SELECT value, title from orders_total where class='ot_shipping' and orders_id=".$row[0].";"); | 813 | $result_shopping = mysql_query("SELECT value, title from ".TABLE_ORDERS_TOTAL." where class='ot_shipping' and orders_id=".$row[0].";"); |
1323 | 908 | if ($result_shopping && $row_shopping=mysql_fetch_row($result_shopping)) { | 814 | if ($result_shopping && $row_shopping=mysql_fetch_row($result_shopping)) { |
1324 | 909 | $shopping_price = $row_shopping[0]; | 815 | $shopping_price = $row_shopping[0]; |
1325 | 910 | $shipping_title = $row_shopping[1]; | 816 | $shipping_title = $row_shopping[1]; |
1326 | 911 | } | 817 | } |
1327 | 818 | $dcoupon_price = 0; | ||
1328 | 819 | $result_coupon = mysql_query("SELECT value, title from ".TABLE_ORDERS_TOTAL." where class='ot_discount_coupon' and orders_id=".$row[0].";"); | ||
1329 | 820 | if ($result_coupon && $row_coupon=mysql_fetch_row($result_coupon)) { | ||
1330 | 821 | $dcoupon_price = $row_coupon[0]; | ||
1331 | 822 | $dcoupon_title = $row_coupon[1]; | ||
1332 | 823 | } | ||
1333 | 824 | $cash_price = 0; | ||
1334 | 825 | $result_cash = mysql_query("SELECT value, title from ".TABLE_ORDERS_TOTAL." where class='ot_fixed_payment_chg' and orders_id=".$row[0].";"); | ||
1335 | 826 | if ($result_cash && $row_cash=mysql_fetch_row($result_cash)) { | ||
1336 | 827 | $cash_price = $row_cash[0]; | ||
1337 | 828 | $cash_title = $row_cash[1]; | ||
1338 | 829 | } | ||
1339 | 912 | 830 | ||
1341 | 913 | $result_customer = mysql_query("SELECT customers_email_address, customers_telephone, customers_fax FROM customers WHERE customers_id=".$row[25].";"); | 831 | $result_customer = mysql_query("SELECT customers_email_address, customers_telephone, customers_fax FROM ".TABLE_CUSTOMERS." WHERE customers_id=".$row[25].";"); |
1342 | 914 | if ($result_customer && $row_customer=mysql_fetch_row($result_customer)) { | 832 | if ($result_customer && $row_customer=mysql_fetch_row($result_customer)) { |
1343 | 915 | $email = $row_customer[0]; | 833 | $email = $row_customer[0]; |
1344 | 916 | $phone = $row_customer[1]; | 834 | $phone = $row_customer[1]; |
1345 | @@ -922,7 +840,7 @@ | |||
1346 | 922 | "entry_street_address"=>$row[2], | 840 | "entry_street_address"=>$row[2], |
1347 | 923 | "entry_city"=>$row[3], | 841 | "entry_city"=>$row[3], |
1348 | 924 | "entry_postcode"=>$row[4] | 842 | "entry_postcode"=>$row[4] |
1350 | 925 | ); | 843 | ); |
1351 | 926 | $oscom_id = 9990; | 844 | $oscom_id = 9990; |
1352 | 927 | $name= $row[1]; | 845 | $name= $row[1]; |
1353 | 928 | $street = $row[2]; | 846 | $street = $row[2]; |
1354 | @@ -944,7 +862,7 @@ | |||
1355 | 944 | "entry_street_address"=>$row[10], | 862 | "entry_street_address"=>$row[10], |
1356 | 945 | "entry_city"=>$row[11], | 863 | "entry_city"=>$row[11], |
1357 | 946 | "entry_postcode"=>$row[12] | 864 | "entry_postcode"=>$row[12] |
1359 | 947 | ); | 865 | ); |
1360 | 948 | $oscom_id = 9991; | 866 | $oscom_id = 9991; |
1361 | 949 | $name= $row[9]; | 867 | $name= $row[9]; |
1362 | 950 | $street = $row[10]; | 868 | $street = $row[10]; |
1363 | @@ -963,7 +881,7 @@ | |||
1364 | 963 | "entry_street_address"=>$row[16], | 881 | "entry_street_address"=>$row[16], |
1365 | 964 | "entry_city"=>$row[17], | 882 | "entry_city"=>$row[17], |
1366 | 965 | "entry_postcode"=>$row[18] | 883 | "entry_postcode"=>$row[18] |
1368 | 966 | ); | 884 | ); |
1369 | 967 | $oscom_id = 9992; | 885 | $oscom_id = 9992; |
1370 | 968 | $name= $row[15]; | 886 | $name= $row[15]; |
1371 | 969 | $street = $row[16]; | 887 | $street = $row[16]; |
1372 | @@ -976,63 +894,62 @@ | |||
1373 | 976 | $billing_address =get_order_address($billing_condition, $oscom_id, $name, $street, $street2, $zip, $city, $state, $zone, $country, $email, $phone, $fax); | 894 | $billing_address =get_order_address($billing_condition, $oscom_id, $name, $street, $street2, $zip, $city, $state, $zone, $country, $email, $phone, $fax); |
1374 | 977 | //$billing_address = get_partner_address($billing_condition, $email, $phone, $fax); | 895 | //$billing_address = get_partner_address($billing_condition, $email, $phone, $fax); |
1375 | 978 | 896 | ||
1377 | 979 | $result_status = mysql_query("select orders_status_name from orders_status where orders_status_id = " . $row[22].";"); | 897 | $result_status = mysql_query("select orders_status_name from ".TABLE_ORDER_STATUS." where orders_status_id = " . $row[22].";"); |
1378 | 980 | if ($result_status && $row_status=mysql_fetch_row($result_status)) { | 898 | if ($result_status && $row_status=mysql_fetch_row($result_status)) { |
1380 | 981 | $status = $row_status[0]; | 899 | $status = $row_status[0]; |
1381 | 982 | } | 900 | } |
1382 | 983 | $orderlines = array(); | 901 | $orderlines = array(); |
1385 | 984 | $resultb = mysql_query("select products_id, products_quantity, products_price, products_tax, products_name, orders_products_id, products_model from orders_products where orders_id=".$row[0]." UNION select 999999, 1, value, '16.0000', title, 0,'' from orders_total where class not in('ot_subtotal', 'ot_total', 'ot_tax') and orders_id=".$row[0].";"); | 902 | $resultb = mysql_query("select products_id, products_quantity, products_price, products_tax, products_name, orders_products_id from ".TABLE_ORDERS_PRODUCTS." where orders_id=".$row[0].";"); |
1384 | 985 | debug("query lineas pedidos:". $resultb); | ||
1386 | 986 | if ($resultb){ | 903 | if ($resultb){ |
1387 | 987 | while ($rowb = mysql_fetch_row($resultb)) { | 904 | while ($rowb = mysql_fetch_row($resultb)) { |
1388 | 988 | $values_array = array("product_id" => new xmlrpcval($rowb[0], "int"), | 905 | $values_array = array("product_id" => new xmlrpcval($rowb[0], "int"), |
1389 | 989 | "product_qty" => new xmlrpcval($rowb[1], "int"), | 906 | "product_qty" => new xmlrpcval($rowb[1], "int"), |
1390 | 990 | "price" => new xmlrpcval($rowb[2], "double"), | 907 | "price" => new xmlrpcval($rowb[2], "double"), |
1391 | 991 | "tax_rate" => new xmlrpcval($rowb[3],"double"), | 908 | "tax_rate" => new xmlrpcval($rowb[3],"double"), |
1395 | 992 | "products_model" => new xmlrpcval(html_entity_decode(clean_special_chars($rowb[6])),"string"), | 909 | "products_model" => new xmlrpcval(trim(utf8_encode(html_entity_decode($rowb[6]))),"string"), |
1396 | 993 | "name" => new xmlrpcval(html_entity_decode(clean_special_chars($rowb[4])),"string")); | 910 | "name" => new xmlrpcval(utf8_encode(html_entity_decode($rowb[4])),"string")); |
1397 | 994 | $result_orders_product_attributes = mysql_query("select products_options, products_options_values, options_values_price, price_prefix from orders_products_attributes where orders_id=".$row[0]." and orders_products_id=".$rowb[5].";"); | 911 | $result_orders_product_attributes = mysql_query("select products_options, products_options_values, options_values_price, if(isnull(price_prefix) OR price_prefix='','+',price_prefix) price_prefix from ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES." where orders_id=".$row[0]." and orders_products_id=".$rowb[5].";"); |
1398 | 995 | if($result_orders_product_attributes && $row_orders_product_attributes= mysql_fetch_row($result_orders_product_attributes)) { | 912 | if($result_orders_product_attributes && $row_orders_product_attributes= mysql_fetch_row($result_orders_product_attributes)) { |
1405 | 996 | //debug("En atributos línea:" . $row_orders_product_attributes[0]); | 913 | $num_atrib = explode("-", utf8_encode($row_orders_product_attributes[1])); |
1406 | 997 | if ($row_orders_product_attributes[3] !== '+' and $row_orders_product_attributes[3] !== '-'){$row_orders_product_attributes[3]='+';} | 914 | $auxi_model = utf8_encode($rowb[6]) . '-' . $num_atrib[0]; |
1401 | 998 | |||
1402 | 999 | //debug("En atributos línea prefijo :" . $row_orders_product_attributes[3]); | ||
1403 | 1000 | $num_atrib = explode("-", clean_special_chars($row_orders_product_attributes[1])); | ||
1404 | 1001 | $auxi_model = clean_special_chars($rowb[6]) . '-' . $num_atrib[0]; | ||
1407 | 1002 | 915 | ||
1408 | 1003 | $orders_product_attributes = new xmlrpcval( array( | 916 | $orders_product_attributes = new xmlrpcval( array( |
1411 | 1004 | "products_options" => new xmlrpcval(clean_special_chars($row_orders_product_attributes[0]),"string"), | 917 | "products_options" => new xmlrpcval(utf8_encode($row_orders_product_attributes[0]),"string"), |
1412 | 1005 | "products_options_values" => new xmlrpcval(clean_special_chars($row_orders_product_attributes[1]),"string"), | 918 | "products_options_values" => new xmlrpcval(utf8_encode($row_orders_product_attributes[1]),"string"), |
1413 | 1006 | "options_values_price" => new xmlrpcval($row_orders_product_attributes[2],"double"), | 919 | "options_values_price" => new xmlrpcval($row_orders_product_attributes[2],"double"), |
1414 | 1007 | "composed_code" => new xmlrpcval($auxi_model,"string"), | 920 | "composed_code" => new xmlrpcval($auxi_model,"string"), |
1416 | 1008 | "price_prefix" => new xmlrpcval(clean_special_chars($row_orders_product_attributes[3]),"string")), "struct"); | 921 | "price_prefix" => new xmlrpcval(utf8_encode($row_orders_product_attributes[3]),"string")), "struct"); |
1417 | 1009 | $values_array["attributes"] = $orders_product_attributes; | 922 | $values_array["attributes"] = $orders_product_attributes; |
1418 | 1010 | } | 923 | } |
1419 | 1011 | $orderlines[] = new xmlrpcval($values_array, "struct"); | 924 | $orderlines[] = new xmlrpcval($values_array, "struct"); |
1420 | 1012 | } | 925 | } |
1421 | 1013 | } | 926 | } |
1422 | 1014 | $note = ""; | 927 | $note = ""; |
1424 | 1015 | $result_comments = mysql_query("select comments FROM orders_status_history where (orders_id = ".$row[0]." and orders_status_id = 1);"); | 928 | $result_comments = mysql_query("select comments FROM ".TABLE_ORDERS_STATUS_HISTORY." where (orders_id = ".$row[0]." and orders_status_id = 1);"); |
1425 | 1016 | if ($result_comments && $row_comments=mysql_fetch_row($result_comments)) { | 929 | if ($result_comments && $row_comments=mysql_fetch_row($result_comments)) { |
1426 | 1017 | $note=$row_comments[0]; | 930 | $note=$row_comments[0]; |
1427 | 1018 | } | 931 | } |
1436 | 1019 | // $result_price_with_tax = mysql_query("SELECT configuration_value FROM configuration where (configuration_key = 'DISPLAY_PRICE_WITH_TAX');"); | 932 | // $result_price_with_tax = mysql_query("SELECT configuration_value FROM configuration where (configuration_key = 'DISPLAY_PRICE_WITH_TAX');"); |
1437 | 1020 | // if ($result_price_with_tax && $row_price_with_tax=mysql_fetch_row($result_price_with_tax)) { | 933 | // if ($result_price_with_tax && $row_price_with_tax=mysql_fetch_row($result_price_with_tax)) { |
1438 | 1021 | // if ($row_price_with_tax[0] == 'false') { | 934 | // if ($row_price_with_tax[0] == 'false') { |
1439 | 1022 | $price_type="tax_excluded"; | 935 | $price_type="tax_excluded"; |
1440 | 1023 | // } else { | 936 | // } else { |
1441 | 1024 | // $price_type="tax_included"; | 937 | // $price_type="tax_included"; |
1442 | 1025 | // } | 938 | // } |
1443 | 1026 | // } | 939 | // } |
1444 | 1027 | $saleorders[] = new xmlrpcval( array("id" => new xmlrpcval( $row[0], "int"), | 940 | $saleorders[] = new xmlrpcval( array("id" => new xmlrpcval( $row[0], "int"), |
1447 | 1028 | "price_type" => new xmlrpcval( clean_special_chars($price_type), "string" ), | 941 | "price_type" => new xmlrpcval( utf8_encode($price_type), "string" ), |
1448 | 1029 | "note" => new xmlrpcval(clean_special_chars($note), "string" ), | 942 | "note" => new xmlrpcval(utf8_encode($note), "string" ), |
1449 | 1030 | "lines" => new xmlrpcval( $orderlines, "array"), | 943 | "lines" => new xmlrpcval( $orderlines, "array"), |
1452 | 1031 | "pay_met" => new xmlrpcval( search_payment_method($row[24]), "int"), | 944 | "pay_met" => new xmlrpcval(search_payment_method($row[24]), "int"), |
1453 | 1032 | "pay_met_title" => new xmlrpcval( clean_special_chars($row[24]), "string"), | 945 | "pay_met_title" => new xmlrpcval( trim(utf8_encode(html_entity_decode(strip_tags($row[24])))), "string"), |
1454 | 1033 | "shipping_price" => new xmlrpcval( $shopping_price, "double"), | 946 | "shipping_price" => new xmlrpcval( $shopping_price, "double"), |
1457 | 1034 | "shipping_title" => new xmlrpcval(html_entity_decode(clean_special_chars($shipping_title)), "string"), | 947 | "shipping_title" => new xmlrpcval(utf8_encode($shipping_title), "string"), |
1458 | 1035 | "orders_status" => new xmlrpcval( clean_special_chars($status), "string"), | 948 | "dcoupon_price" => new xmlrpcval( $dcoupon_price, "double"), |
1459 | 949 | "dcoupon_title" => new xmlrpcval(utf8_encode($dcoupon_title), "string"), | ||
1460 | 950 | "cash_price" => new xmlrpcval( $cash_price, "double"), | ||
1461 | 951 | "cash_title" => new xmlrpcval(utf8_encode($cash_title), "string"), | ||
1462 | 952 | "orders_status" => new xmlrpcval( utf8_encode($status), "string"), | ||
1463 | 1036 | "partner" => get_customer($row[25]), | 953 | "partner" => get_customer($row[25]), |
1464 | 1037 | "date" => new xmlrpcval( $row[21], "string"), | 954 | "date" => new xmlrpcval( $row[21], "string"), |
1465 | 1038 | "address" => $default_address, | 955 | "address" => $default_address, |
1466 | @@ -1046,79 +963,77 @@ | |||
1467 | 1046 | 963 | ||
1468 | 1047 | 964 | ||
1469 | 1048 | function get_min_open_orders($last_so) { | 965 | function get_min_open_orders($last_so) { |
1471 | 1049 | $result = mysql_query("SELECT min(`orders_id`) as min FROM `orders` where (orders_id <= ".$last_so.") and (orders_status = 2);"); | 966 | $result = mysql_query("SELECT min(`orders_id`) as min FROM ".TABLE_ORDERS." where (orders_id <= ".$last_so.") and (orders_status = 2);"); |
1472 | 1050 | if ($result) { | 967 | if ($result) { |
1473 | 1051 | $min = mysql_fetch_row($result); | 968 | $min = mysql_fetch_row($result); |
1474 | 1052 | return new xmlrpcresp( new xmlrpcval($min[0], "int")); | 969 | return new xmlrpcresp( new xmlrpcval($min[0], "int")); |
1475 | 1053 | } else | 970 | } else |
1477 | 1054 | return new xmlrpcresp( new xmlrpcval(-1, "int")); | 971 | return new xmlrpcresp( new xmlrpcval(-1, "int")); |
1478 | 1055 | } | 972 | } |
1479 | 1056 | 973 | ||
1480 | 1057 | 974 | ||
1481 | 1058 | 975 | ||
1482 | 1059 | function get_max_products_id() { | 976 | function get_max_products_id() { |
1484 | 1060 | $result = mysql_query("SELECT max(`products_id`) as max FROM `products`;"); | 977 | $result = mysql_query("SELECT max(`products_id`) as max FROM ".TABLE_PRODUCTS); |
1485 | 1061 | if ($result) { | 978 | if ($result) { |
1486 | 1062 | $max = mysql_fetch_row($result); | 979 | $max = mysql_fetch_row($result); |
1487 | 1063 | return new xmlrpcresp( new xmlrpcval($max[0], "int")); | 980 | return new xmlrpcresp( new xmlrpcval($max[0], "int")); |
1488 | 1064 | } else | 981 | } else |
1490 | 1065 | return new xmlrpcresp( new xmlrpcval(-1, "int")); | 982 | return new xmlrpcresp( new xmlrpcval(-1, "int")); |
1491 | 1066 | } | 983 | } |
1492 | 1067 | 984 | ||
1493 | 1068 | function get_min_products_id() { | 985 | function get_min_products_id() { |
1495 | 1069 | $result = mysql_query("SELECT min(`products_id`) as min FROM `products`;"); | 986 | $result = mysql_query("SELECT min(`products_id`) as min FROM ".TABLE_PRODUCTS); |
1496 | 1070 | if ($result) { | 987 | if ($result) { |
1497 | 1071 | $min = mysql_fetch_row($result); | 988 | $min = mysql_fetch_row($result); |
1498 | 1072 | return new xmlrpcresp( new xmlrpcval($min[0], "int")); | 989 | return new xmlrpcresp( new xmlrpcval($min[0], "int")); |
1499 | 1073 | } else | 990 | } else |
1501 | 1074 | return new xmlrpcresp( new xmlrpcval(-1, "int")); | 991 | return new xmlrpcresp( new xmlrpcval(-1, "int")); |
1502 | 1075 | } | 992 | } |
1503 | 1076 | 993 | ||
1504 | 1077 | 994 | ||
1505 | 1078 | function close_open_orders($order_id, $order_status_id) { | 995 | function close_open_orders($order_id, $order_status_id) { |
1507 | 1079 | mysql_query("update orders set orders_status= " . $order_status_id . " where orders_id=".$order_id.";"); | 996 | mysql_query("update ".TABLE_ORDERS." set orders_status=3 where orders_id=".$order_id.";"); |
1508 | 1080 | return new xmlrpcresp(new xmlrpcval(0, "int")); | 997 | return new xmlrpcresp(new xmlrpcval(0, "int")); |
1509 | 1081 | } | 998 | } |
1510 | 1082 | 999 | ||
1511 | 1083 | 1000 | ||
1512 | 1084 | function process_order($order_id, $order_status_id) { | 1001 | function process_order($order_id, $order_status_id) { |
1516 | 1085 | debug("ONPROCESS: update orders set orders_status = " . $order_status_id . " where orders_id = ".$order_id.";"); | 1002 | mysql_query("update ".TABLE_ORDERS." set orders_status= " . $order_status_id . " where orders_id=".$order_id.";"); |
1514 | 1086 | |||
1515 | 1087 | mysql_query("update orders set orders_status= " . $order_status_id . " where orders_id=".$order_id.";"); | ||
1517 | 1088 | return new xmlrpcresp(new xmlrpcval(0, "int")); | 1003 | return new xmlrpcresp(new xmlrpcval(0, "int")); |
1518 | 1089 | } | 1004 | } |
1519 | 1090 | 1005 | ||
1520 | 1091 | 1006 | ||
1521 | 1092 | function update_order_status($order_id, $order_status_id, $status_comment, $update_comment, $send_web_email) { | 1007 | function update_order_status($order_id, $order_status_id, $status_comment, $update_comment, $send_web_email) { |
1522 | 1093 | 1008 | ||
1527 | 1094 | $oID = $order_id; | 1009 | $oID = $order_id; |
1528 | 1095 | 1010 | ||
1529 | 1096 | mysql_query("update orders set orders_status = '" . $order_status_id . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); | 1011 | mysql_query("update ".TABLE_ORDERS." set orders_status = '" . $order_status_id . "', last_modified = now() where orders_id = '" . (int)$oID . "'"); |
1530 | 1097 | $customer_notified = $send_web_email; | 1012 | $customer_notified = $send_web_email; |
1531 | 1098 | 1013 | ||
1532 | 1099 | if ($update_comment){ | 1014 | if ($update_comment){ |
1535 | 1100 | debug("ACTUALIZAR COMENTARIOS insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '1', '" . $status_comment . "')"); | 1015 | debug("ACTUALIZAR COMENTARIOS insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '1', '" . $status_comment . "')"); |
1536 | 1101 | mysql_query("insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '". $customer_notified . "', '" . $status_comment . "')"); | 1016 | mysql_query("insert into ".TABLE_ORDERS_STATUS_HISTORY." (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '". $customer_notified . "', '" . $status_comment . "')"); |
1537 | 1102 | }else { | 1017 | }else { |
1540 | 1103 | debug("NO ACTUALIZAR COMENTARIOS insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '1', '')"); | 1018 | debug("NO ACTUALIZAR COMENTARIOS insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '1', '')"); |
1541 | 1104 | mysql_query("insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '". $customer_notified . "', '')"); | 1019 | mysql_query("insert into ".TABLE_ORDERS_STATUS_HISTORY." (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int)$oID . "', '" . $order_status_id . "', now(), '". $customer_notified . "', '')"); |
1542 | 1105 | } | 1020 | } |
1543 | 1106 | 1021 | ||
1544 | 1107 | if ($send_web_email) { | 1022 | if ($send_web_email) { |
1559 | 1108 | $check_status_query = mysql_query("select customers_name, customers_email_address, orders_status, date_purchased | 1023 | $check_status_query = mysql_query("select customers_name, customers_email_address, orders_status, date_purchased |
1560 | 1109 | from orders where orders_id = '" . (int)$oID . "'"); | 1024 | from ".TABLE_ORDER." where orders_id = '" . (int)$oID . "'"); |
1561 | 1110 | 1025 | ||
1562 | 1111 | if ($check_status_query && $check_status=mysql_fetch_row($check_status_query)) { | 1026 | if ($check_status_query && $check_status=mysql_fetch_row($check_status_query)) { |
1563 | 1112 | debug("ONCHANGEORDER1: en envio e-mail;"); | 1027 | debug("ONCHANGEORDER1: en envio e-mail;"); |
1564 | 1113 | $email = $status_comment ; | 1028 | $email = $status_comment ; |
1565 | 1114 | 1029 | ||
1566 | 1115 | debug("ONCHANGEORDER2: " . $email); | 1030 | debug("ONCHANGEORDER2: " . $email); |
1567 | 1116 | // $headers = "From: \r\n"; | 1031 | // $headers = "From: \r\n"; |
1568 | 1117 | // mail($check_status['customers_email_address'],'Subject', $email, $headers ); | 1032 | // mail($check_status['customers_email_address'],'Subject', $email, $headers ); |
1569 | 1118 | 1033 | ||
1570 | 1119 | 1034 | ||
1571 | 1120 | debug("ONCHANGEORDER: en envio e-mail;"); | 1035 | debug("ONCHANGEORDER: en envio e-mail;"); |
1572 | 1121 | } | 1036 | } |
1573 | 1122 | } else { | 1037 | } else { |
1574 | 1123 | debug("ONCHANGEORDER: en NO envio e-mail;"); | 1038 | debug("ONCHANGEORDER: en NO envio e-mail;"); |
1575 | 1124 | } | 1039 | } |
1576 | @@ -1127,99 +1042,34 @@ | |||
1577 | 1127 | return new xmlrpcresp(new xmlrpcval(0, "int")); | 1042 | return new xmlrpcresp(new xmlrpcval(0, "int")); |
1578 | 1128 | } | 1043 | } |
1579 | 1129 | 1044 | ||
1672 | 1130 | $server = new xmlrpc_server( array( "get_taxes" => array( "function" => "get_taxes", | 1045 | $server = new xmlrpc_server(array( |
1673 | 1131 | "signature" => array( array($xmlrpcArray) | 1046 | "init" => array("function" => "init" ,"signature" => array(array($xmlrpcArray))), |
1674 | 1132 | ) | 1047 | "get_taxes" => array("function" => "get_taxes" ,"signature" => array(array($xmlrpcArray))), |
1675 | 1133 | ), | 1048 | "get_statuses" => array("function" => "get_statuses" ,"signature" => array(array($xmlrpcArray))), |
1676 | 1134 | "get_statuses" => array( "function" => "get_statuses", | 1049 | "get_languages" => array("function" => "get_languages" ,"signature" => array(array($xmlrpcArray))), |
1677 | 1135 | "signature" => array( array($xmlrpcArray) | 1050 | "get_categories" => array("function" => "get_categories" ,"signature" => array(array($xmlrpcArray))), |
1678 | 1136 | ) | 1051 | "get_categories_parent" => array("function" => "get_categories_parent","signature" => array(array($xmlrpcArray, $xmlrpcArray))), |
1679 | 1137 | ), | 1052 | "get_products" => array("function" => "get_products" ,"signature" => array(array($xmlrpcArray, $xmlrpcArray, $xmlrpcInt, $xmlrpcInt, $xmlrpcString))), |
1680 | 1138 | 1053 | "get_payment_methods" => array("function" => "get_payment_methods" ,"signature" => array(array($xmlrpcArray))), | |
1681 | 1139 | "get_languages" => array( "function" => "get_languages", | 1054 | "get_saleorders" => array("function" => "get_saleorders" ,"signature" => array(array($xmlrpcArray, $xmlrpcInt ,$xmlrpcArray, $xmlrpcInt))), |
1682 | 1140 | "signature" => array( array($xmlrpcArray) | 1055 | "get_min_products_id" => array("function" => "get_min_products_id" ,"signature" => array(array($xmlrpcInt))), |
1683 | 1141 | ) | 1056 | "get_max_products_id" => array("function" => "get_max_products_id" ,"signature" => array(array($xmlrpcInt))), |
1684 | 1142 | ), | 1057 | "get_min_open_orders" => array("function" => "get_min_open_orders" ,"signature" => array(array($xmlrpcInt, $xmlrpcInt))), |
1685 | 1143 | "get_categories" => array( "function" => "get_categories", | 1058 | "set_product_spe" => array("function" => "set_product_spe" ,"signature" => array(array($xmlrpcInt, $xmlrpcStruct))), |
1686 | 1144 | "signature" => array( array($xmlrpcArray) | 1059 | "set_product_classical" => array("function" => "set_product_classical","signature" => array(array($xmlrpcInt, $xmlrpcStruct))), |
1687 | 1145 | ) | 1060 | "remove_product" => array("function" => "remove_product" ,"signature" => array(array($xmlrpcInt, $xmlrpcStruct))), |
1688 | 1146 | ), | 1061 | "del_spe_price" => array("function" => "del_spe_price" ,"signature" => array(array($xmlrpcInt, $xmlrpcInt))), |
1689 | 1147 | "get_categories_parent" => array( "function" => "get_categories_parent", | 1062 | "update_order_status" => array("function" => "update_order_status" ,"signature" => array(array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt, $xmlrpcString, $xmlrpcInt, $xmlrpcInt))), |
1690 | 1148 | "signature" => array( array($xmlrpcArray, $xmlrpcArray) | 1063 | "isTransactional" => array("function" => "isTransactional" ,"signature" => array(array($xmlrpcBoolean))), |
1691 | 1149 | ) | 1064 | "setSyncronizedFlag" => array("function" => "setSyncronizedFlag" ,"signature" => array(array($xmlrpcBoolean, $xmlrpcInt))), |
1692 | 1150 | ), | 1065 | "set_product_stock" => array("function" => "set_product_stock" ,"signature" => array(array($xmlrpcInt, $xmlrpcStruct))), |
1693 | 1151 | "get_products" => array( "function" => "get_products", | 1066 | "process_order" => array("function" => "process_order" ,"signature" => array(array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt))), |
1694 | 1152 | "signature" => array( array($xmlrpcArray, $xmlrpcArray, $xmlrpcInt, $xmlrpcInt, $xmlrpcString) | 1067 | "close_open_orders" => array("function" => "close_open_orders" ,"signature" => array(array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt))), |
1695 | 1153 | ) | 1068 | "get_customer" => array("function" => "get_customer" ,"signature" => array(array($xmlrpcArray, $xmlrpcInt))) |
1696 | 1154 | ), | 1069 | |
1697 | 1155 | "get_payment_methods" => array( "function" => "get_payment_methods", | 1070 | ), false); |
1606 | 1156 | "signature" => array( array($xmlrpcArray) | ||
1607 | 1157 | ) | ||
1608 | 1158 | ), | ||
1609 | 1159 | "get_saleorders" => array( "function" => "get_saleorders", | ||
1610 | 1160 | "signature" => array( array($xmlrpcArray, $xmlrpcInt ,$xmlrpcArray) | ||
1611 | 1161 | ) | ||
1612 | 1162 | ), | ||
1613 | 1163 | "get_min_products_id" => array( "function" => "get_min_products_id", | ||
1614 | 1164 | "signature" => array( array($xmlrpcInt) | ||
1615 | 1165 | ) | ||
1616 | 1166 | ), | ||
1617 | 1167 | "get_max_products_id" => array( "function" => "get_max_products_id", | ||
1618 | 1168 | "signature" => array( array($xmlrpcInt) | ||
1619 | 1169 | ) | ||
1620 | 1170 | ), | ||
1621 | 1171 | "get_min_open_orders" => array( "function" => "get_min_open_orders", | ||
1622 | 1172 | "signature" => array( array($xmlrpcInt, $xmlrpcInt) | ||
1623 | 1173 | ) | ||
1624 | 1174 | ), | ||
1625 | 1175 | "set_product_spe" => array( "function" => "set_product_spe", | ||
1626 | 1176 | "signature" => array( array($xmlrpcInt, $xmlrpcStruct) | ||
1627 | 1177 | ) | ||
1628 | 1178 | ), | ||
1629 | 1179 | "set_product_classical" => array( "function" => "set_product_classical", | ||
1630 | 1180 | "signature" => array( array($xmlrpcInt, $xmlrpcStruct) | ||
1631 | 1181 | ) | ||
1632 | 1182 | ), | ||
1633 | 1183 | "remove_product" => array( "function" => "remove_product", | ||
1634 | 1184 | "signature" => array( array($xmlrpcInt, $xmlrpcStruct) | ||
1635 | 1185 | ) | ||
1636 | 1186 | ), | ||
1637 | 1187 | "del_spe_price" => array( "function" => "del_spe_price", | ||
1638 | 1188 | "signature" => array( array($xmlrpcInt, $xmlrpcInt) | ||
1639 | 1189 | ) | ||
1640 | 1190 | ), | ||
1641 | 1191 | "update_order_status" => array( "function" => "update_order_status", | ||
1642 | 1192 | "signature" => array( array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt, $xmlrpcString, $xmlrpcInt, $xmlrpcInt) | ||
1643 | 1193 | ) | ||
1644 | 1194 | ), | ||
1645 | 1195 | |||
1646 | 1196 | "isTransactional" => array( "function" => "isTransactional", | ||
1647 | 1197 | "signature" => array( array($xmlrpcBoolean) | ||
1648 | 1198 | ) | ||
1649 | 1199 | ), | ||
1650 | 1200 | "setSyncronizedFlag" => array( "function" => "setSyncronizedFlag", | ||
1651 | 1201 | "signature" => array( array($xmlrpcBoolean, $xmlrpcInt) | ||
1652 | 1202 | ) | ||
1653 | 1203 | ), | ||
1654 | 1204 | "set_product_stock" => array( "function" => "set_product_stock", | ||
1655 | 1205 | "signature" => array( array($xmlrpcInt, $xmlrpcStruct) | ||
1656 | 1206 | ) | ||
1657 | 1207 | ), | ||
1658 | 1208 | "process_order" => array( "function" => "process_order", | ||
1659 | 1209 | "signature" => array( array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt) | ||
1660 | 1210 | ) | ||
1661 | 1211 | ), | ||
1662 | 1212 | "close_open_orders" => array( "function" => "close_open_orders", | ||
1663 | 1213 | "signature" => array( array($xmlrpcInt, $xmlrpcInt, $xmlrpcInt) | ||
1664 | 1214 | ) | ||
1665 | 1215 | ), | ||
1666 | 1216 | "get_customer" => array( "function" => "get_customer", | ||
1667 | 1217 | "signature" => array( array($xmlrpcArray, $xmlrpcInt) | ||
1668 | 1218 | ) | ||
1669 | 1219 | ) | ||
1670 | 1220 | |||
1671 | 1221 | ), false); | ||
1698 | 1222 | $server->functions_parameters_type = 'phpvals'; | 1071 | $server->functions_parameters_type = 'phpvals'; |
1700 | 1223 | $server->response_charset_encoding = RESPONSE_ENCODING; | 1072 | //$server->response_charset_encoding = RESPONSE_ENCODING; |
1701 | 1224 | $server->service(); | 1073 | $server->service(); |
1703 | 1225 | ?> | 1074 | include(DIR_WS_INCLUDES."application_bottom.php"); |
1704 | 1075 | ?> | ||
1705 | 1226 | \ No newline at end of file | 1076 | \ No newline at end of file |
1706 | 1227 | 1077 | ||
1707 | === added file 'esale_osc/connector/openerp_login.php' | |||
1708 | --- esale_osc/connector/openerp_login.php 1970-01-01 00:00:00 +0000 | |||
1709 | +++ esale_osc/connector/openerp_login.php 2010-07-21 10:31:39 +0000 | |||
1710 | @@ -0,0 +1,41 @@ | |||
1711 | 1 | <?php | ||
1712 | 2 | function login($url,$user,$pass){ | ||
1713 | 3 | //GET SESSION COOKIE AND SECURITY TOKEN FOR ZENCART | ||
1714 | 4 | $ch = curl_init(); | ||
1715 | 5 | curl_setopt($ch, CURLOPT_URL, $url."login.php"); | ||
1716 | 6 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | ||
1717 | 7 | curl_setopt($ch, CURLOPT_HEADER, 1); | ||
1718 | 8 | curl_setopt($ch, CURLOPT_POST, 0); | ||
1719 | 9 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); | ||
1720 | 10 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | ||
1721 | 11 | curl_setopt($ch, CURLOPT_TIMEOUT, 30); | ||
1722 | 12 | $res = curl_exec ($ch); | ||
1723 | 13 | preg_match("/Set-Cookie\: ([^;]*);/",$res,$cookie); | ||
1724 | 14 | preg_match("/name=\"securityToken\" value=\"([^\"]*)\"/",$res,$sec_token); | ||
1725 | 15 | if($sec_token[1]){ | ||
1726 | 16 | $post_fields="admin_name=".$user."&admin_pass=".$pass."&securityToken=".$sec_token[1]."&submit=Login"; | ||
1727 | 17 | }else{ | ||
1728 | 18 | $post_fields="username=".$user."&password=".$pass; | ||
1729 | 19 | } | ||
1730 | 20 | //LOGIN INTO ADMINISTRATION | ||
1731 | 21 | $header[] = "Content-type: application/x-www-form-urlencoded"; //Important header, won't work if any other content type set | ||
1732 | 22 | $header[] = "Content-length: ".strlen($post_fields); | ||
1733 | 23 | $header[] = "Cookie: ".$cookie[1]; | ||
1734 | 24 | $ch = curl_init(); | ||
1735 | 25 | curl_setopt($ch, CURLOPT_URL, $url."login.php?action=process&".$cookie[1]); | ||
1736 | 26 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | ||
1737 | 27 | curl_setopt($ch, CURLOPT_HEADER, 1); | ||
1738 | 28 | curl_setopt($ch, CURLOPT_POST, 1); | ||
1739 | 29 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); | ||
1740 | 30 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); | ||
1741 | 31 | curl_setopt($ch, CURLOPT_HTTPHEADER,$header); | ||
1742 | 32 | curl_setopt($ch, CURLOPT_POSTFIELDS,$post_fields); | ||
1743 | 33 | curl_setopt($ch, CURLOPT_TIMEOUT, 30); | ||
1744 | 34 | $res = curl_exec ($ch); | ||
1745 | 35 | preg_match("/Set-Cookie\: ([^;]*);/",$res,$new_cookie); | ||
1746 | 36 | if($new_cookie[1])$cookie[1]=$new_cookie[1]; | ||
1747 | 37 | list($ses_name,$sessid)=split('=',$cookie[1]); | ||
1748 | 38 | session_id($sessid); | ||
1749 | 39 | //echo $res; | ||
1750 | 40 | } | ||
1751 | 41 | ?> | ||
1752 | 0 | \ No newline at end of file | 42 | \ No newline at end of file |
1753 | 1 | 43 | ||
1754 | === added file 'esale_osc/connector/openerp_runonce.php' | |||
1755 | --- esale_osc/connector/openerp_runonce.php 1970-01-01 00:00:00 +0000 | |||
1756 | +++ esale_osc/connector/openerp_runonce.php 2010-07-21 10:31:39 +0000 | |||
1757 | @@ -0,0 +1,10 @@ | |||
1758 | 1 | <?php | ||
1759 | 2 | if(tep_db_num_rows(tep_db_query('describe '.TABLE_ADDRESS_BOOK.' entry_nif'))==0){ | ||
1760 | 3 | tep_db_query('ALTER TABLE '.TABLE_ADDRESS_BOOK.' ADD entry_nif VARCHAR( 32 )'); | ||
1761 | 4 | } | ||
1762 | 5 | if(tep_db_num_rows(tep_db_query('describe '.TABLE_PRODUCTS.' products_syncronized'))==0){ | ||
1763 | 6 | tep_db_query('ALTER TABLE '.TABLE_PRODUCTS.' ADD products_syncronized int(1)'); | ||
1764 | 7 | tep_db_query('ALTER TABLE '.TABLE_PRODUCTS.' ADD products_last_syncronized datetime'); | ||
1765 | 8 | } | ||
1766 | 9 | unlink(__FILE__); | ||
1767 | 10 | ?> | ||
1768 | 0 | \ No newline at end of file | 11 | \ No newline at end of file |
1769 | 1 | 12 | ||
1770 | === modified file 'esale_osc/esale_oscom.py' | |||
1771 | --- esale_osc/esale_oscom.py 2010-06-04 15:39:08 +0000 | |||
1772 | +++ esale_osc/esale_oscom.py 2010-07-21 10:31:39 +0000 | |||
1773 | @@ -1,3 +1,4 @@ | |||
1774 | 1 | # -*- coding: utf-8 -*- | ||
1775 | 1 | # -*- encoding: utf-8 -*- | 2 | # -*- encoding: utf-8 -*- |
1776 | 2 | ############################################################################## | 3 | ############################################################################## |
1777 | 3 | # | 4 | # |
1778 | @@ -5,6 +6,7 @@ | |||
1779 | 5 | # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. | 6 | # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
1780 | 6 | # Jordi Esteve <jesteve@zikzakmedia.com> | 7 | # Jordi Esteve <jesteve@zikzakmedia.com> |
1781 | 7 | # Ana Juaristi <ajuaristio@gmail.com> | 8 | # Ana Juaristi <ajuaristio@gmail.com> |
1782 | 9 | # Copyright (c) 2010 ZhenIT Software (http://ZhenIT.com/). | ||
1783 | 8 | # $Id$ | 10 | # $Id$ |
1784 | 9 | # | 11 | # |
1785 | 10 | # This program is free software: you can redistribute it and/or modify | 12 | # This program is free software: you can redistribute it and/or modify |
1786 | @@ -30,24 +32,6 @@ | |||
1787 | 30 | from mx import DateTime | 32 | from mx import DateTime |
1788 | 31 | from tools.translate import _ | 33 | from tools.translate import _ |
1789 | 32 | 34 | ||
1790 | 33 | |||
1791 | 34 | class esale_oscom_web(osv.osv): | ||
1792 | 35 | _name = 'esale.oscom.web' | ||
1793 | 36 | esale_oscom_web() | ||
1794 | 37 | |||
1795 | 38 | |||
1796 | 39 | class esale_oscom_tax(osv.osv): | ||
1797 | 40 | _name = "esale.oscom.tax" | ||
1798 | 41 | _description = "esale_oscom Tax" | ||
1799 | 42 | _columns = { | ||
1800 | 43 | 'name': fields.char('Tax name', size=32, required=True, readonly=True), | ||
1801 | 44 | 'esale_oscom_id': fields.integer('OScommerce Id'), | ||
1802 | 45 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
1803 | 46 | 'tax_id': fields.many2one('account.tax', 'OpenERP tax'), | ||
1804 | 47 | } | ||
1805 | 48 | esale_oscom_tax() | ||
1806 | 49 | |||
1807 | 50 | |||
1808 | 51 | class esale_oscom_status(osv.osv): | 35 | class esale_oscom_status(osv.osv): |
1809 | 52 | _name = "esale.oscom.status" | 36 | _name = "esale.oscom.status" |
1810 | 53 | _description = "esale_oscom Status" | 37 | _description = "esale_oscom Status" |
1811 | @@ -60,86 +44,16 @@ | |||
1812 | 60 | } | 44 | } |
1813 | 61 | esale_oscom_status() | 45 | esale_oscom_status() |
1814 | 62 | 46 | ||
1815 | 63 | |||
1816 | 64 | class esale_oscom_category(osv.osv): | ||
1817 | 65 | _name = "esale.oscom.category" | ||
1818 | 66 | _description = "esale_oscom Category" | ||
1819 | 67 | _columns = { | ||
1820 | 68 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
1821 | 69 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
1822 | 70 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
1823 | 71 | 'category_id': fields.many2one('product.category', 'OpenERP category'), | ||
1824 | 72 | } | ||
1825 | 73 | esale_oscom_category() | ||
1826 | 74 | |||
1827 | 75 | |||
1828 | 76 | class esale_oscom_paytype(osv.osv): | ||
1829 | 77 | _name = "esale.oscom.paytype" | ||
1830 | 78 | _description = "esale_oscom PayType" | ||
1831 | 79 | _columns = { | ||
1832 | 80 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
1833 | 81 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
1834 | 82 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
1835 | 83 | 'payment_id': fields.many2one('payment.type', 'OpenERP payment'), | ||
1836 | 84 | 'paytyp': fields.selection([('type1','SO in State Draft'),('type2','SO Confirmed'),('type3','Invoice Draft'),('type4','Invoice Confirmed'),('type5','Invoice Payed')], 'Payment type'), | ||
1837 | 85 | 'journal_id': fields.many2one('account.journal', 'OpenERP payment journal'), | ||
1838 | 86 | } | ||
1839 | 87 | esale_oscom_paytype() | ||
1840 | 88 | |||
1841 | 89 | |||
1842 | 90 | class esale_oscom_language(osv.osv): | ||
1843 | 91 | _name = "esale.oscom.lang" | ||
1844 | 92 | _description = "esale_oscom Language" | ||
1845 | 93 | _columns = { | ||
1846 | 94 | 'name': fields.char('Name', size=32, required=True, readonly=True), | ||
1847 | 95 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
1848 | 96 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
1849 | 97 | 'language_id': fields.many2one('res.lang', 'OpenERP language'), | ||
1850 | 98 | } | ||
1851 | 99 | esale_oscom_language() | ||
1852 | 100 | |||
1853 | 101 | |||
1854 | 102 | class esale_oscom_product(osv.osv): | ||
1855 | 103 | _name = "esale.oscom.product" | ||
1856 | 104 | _description = "esale_oscom Product" | ||
1857 | 105 | _columns = { | ||
1858 | 106 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
1859 | 107 | 'esale_oscom_id': fields.integer('OScommerce product Id'), | ||
1860 | 108 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
1861 | 109 | 'product_id': fields.many2one('product.product', 'OpenERP product'), | ||
1862 | 110 | } | ||
1863 | 111 | |||
1864 | 112 | def onchange_product_id(self, cr, uid, ids, product_id, web_id): | ||
1865 | 113 | value = {} | ||
1866 | 114 | if (product_id): | ||
1867 | 115 | product = self.pool.get('product.product').browse(cr, uid, product_id) | ||
1868 | 116 | value['name'] = product.name | ||
1869 | 117 | return {'value': value} | ||
1870 | 118 | |||
1871 | 119 | def unlink(self, cr, uid, ids, context=None): | ||
1872 | 120 | websites = {} | ||
1873 | 121 | for esale_product in self.browse(cr, uid, ids): | ||
1874 | 122 | web_product_ids = websites.get(esale_product.web_id and esale_product.web_id.id) | ||
1875 | 123 | if web_product_ids and len(web_product_ids): | ||
1876 | 124 | web_product_ids.append(esale_product.esale_oscom_id) | ||
1877 | 125 | else: | ||
1878 | 126 | websites[esale_product.web_id and esale_product.web_id.id] = [esale_product.esale_oscom_id] | ||
1879 | 127 | websites_objs = self.pool.get('esale.oscom.web').browse(cr, uid, [x for x in websites.keys() if type(x) is int]) | ||
1880 | 128 | for website in websites_objs: | ||
1881 | 129 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | ||
1882 | 130 | server.remove_product({'oscom_product_ids':websites.get(website.id)}) | ||
1883 | 131 | return super(esale_oscom_product,self).unlink(cr, uid, ids, context) | ||
1884 | 132 | esale_oscom_product() | ||
1885 | 133 | |||
1886 | 134 | |||
1887 | 135 | class esale_oscom_web(osv.osv): | 47 | class esale_oscom_web(osv.osv): |
1888 | 136 | _name = "esale.oscom.web" | 48 | _name = "esale.oscom.web" |
1889 | 137 | _description = "OScommerce Website" | 49 | _description = "OScommerce Website" |
1890 | 138 | _columns = { | 50 | _columns = { |
1891 | 139 | 'name': fields.char('Name',size=64, required=True), | 51 | 'name': fields.char('Name',size=64, required=True), |
1892 | 140 | 'url': fields.char('URL', size=128, required=True), | 52 | 'url': fields.char('URL', size=128, required=True), |
1893 | 53 | 'admin_user': fields.char('Admin User', size=128, required=True), | ||
1894 | 54 | 'admin_pass': fields.char('Admin Pass', size=128, required=True), | ||
1895 | 141 | 'shop_id': fields.many2one('sale.shop', 'Sale shop', required=True), | 55 | 'shop_id': fields.many2one('sale.shop', 'Sale shop', required=True), |
1897 | 142 | # 'partner_anonymous_id': fields.many2one('res.partner', 'Anonymous', required=True), | 56 | 'default_partner_category': fields.many2one('res.partner.category', 'Customers partner category', required=False), |
1898 | 143 | 'active': fields.boolean('Active'), | 57 | 'active': fields.boolean('Active'), |
1899 | 144 | 'product_ids': fields.one2many('esale.oscom.product', 'web_id', 'Web products'), | 58 | 'product_ids': fields.one2many('esale.oscom.product', 'web_id', 'Web products'), |
1900 | 145 | 'language_ids': fields.one2many('esale.oscom.lang', 'web_id', 'Languages'), | 59 | 'language_ids': fields.one2many('esale.oscom.lang', 'web_id', 'Languages'), |
1901 | @@ -152,13 +66,22 @@ | |||
1902 | 152 | 'date_download_from':fields.date('Date Download From', help="Specify date since you want to download modified or new products"), | 66 | 'date_download_from':fields.date('Date Download From', help="Specify date since you want to download modified or new products"), |
1903 | 153 | 'intermediate': fields.many2one('esale.oscom.status', 'Intermediate Status', help="Select intermediate status for Osc downloaded Orders"), | 67 | 'intermediate': fields.many2one('esale.oscom.status', 'Intermediate Status', help="Select intermediate status for Osc downloaded Orders"), |
1904 | 154 | 'download_number': fields.integer('Download number', help="Osc product number to download by block. You should find the optimum block to download for your shop"), | 68 | 'download_number': fields.integer('Download number', help="Osc product number to download by block. You should find the optimum block to download for your shop"), |
1905 | 69 | 'override_products_data': fields.boolean('Override Products Data', help="Click if you want to Update products data on the shop with changes made in openerp."), | ||
1906 | 70 | 'plataforma': fields.char('Plataforma', size=16), | ||
1907 | 155 | } | 71 | } |
1908 | 156 | _defaults = { | 72 | _defaults = { |
1909 | 157 | 'active': lambda *a: 1, | 73 | 'active': lambda *a: 1, |
1911 | 158 | 'price_type': lambda *a:'0', | 74 | 'plataforma': lambda *a:'osc', |
1912 | 75 | 'price_type': lambda *a:'0', | ||
1913 | 76 | 'override_products_data': lambda *a:True, | ||
1914 | 159 | 'download_number': lambda *a:30, | 77 | 'download_number': lambda *a:30, |
1915 | 160 | } | 78 | } |
1917 | 161 | 79 | def create(self, cr, uid, vals, context=None): | |
1918 | 80 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (vals['url'],vals['admin_user'],vals['admin_pass'])) | ||
1919 | 81 | init_vals = server.init() | ||
1920 | 82 | vals["plataforma"] = init_vals[0] | ||
1921 | 83 | return super(esale_oscom_web, self).create(cr, uid, vals, context=context) | ||
1922 | 84 | |||
1923 | 162 | def add_all_products(self, cr, uid, ids, *args): | 85 | def add_all_products(self, cr, uid, ids, *args): |
1924 | 163 | esale_product_obj = self.pool.get('esale.oscom.product') | 86 | esale_product_obj = self.pool.get('esale.oscom.product') |
1925 | 164 | for id in ids: | 87 | for id in ids: |
1926 | @@ -176,7 +99,7 @@ | |||
1927 | 176 | def tax_import(self, cr, uid, ids, *args): | 99 | def tax_import(self, cr, uid, ids, *args): |
1928 | 177 | esale_tax_obj = self.pool.get('esale.oscom.tax') | 100 | esale_tax_obj = self.pool.get('esale.oscom.tax') |
1929 | 178 | for website in self.browse(cr, uid, ids): | 101 | for website in self.browse(cr, uid, ids): |
1931 | 179 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 102 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1932 | 180 | taxes = server.get_taxes() | 103 | taxes = server.get_taxes() |
1933 | 181 | for tax in taxes: | 104 | for tax in taxes: |
1934 | 182 | update_taxes_ids = esale_tax_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',tax[0])]) | 105 | update_taxes_ids = esale_tax_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',tax[0])]) |
1935 | @@ -194,7 +117,7 @@ | |||
1936 | 194 | def status_import(self, cr, uid, ids, *args): | 117 | def status_import(self, cr, uid, ids, *args): |
1937 | 195 | esale_status_obj = self.pool.get('esale.oscom.status') | 118 | esale_status_obj = self.pool.get('esale.oscom.status') |
1938 | 196 | for website in self.browse(cr, uid, ids): | 119 | for website in self.browse(cr, uid, ids): |
1940 | 197 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 120 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1941 | 198 | statuses = server.get_statuses() | 121 | statuses = server.get_statuses() |
1942 | 199 | for status in statuses: | 122 | for status in statuses: |
1943 | 200 | update_statuses_ids = esale_status_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',status[0])]) | 123 | update_statuses_ids = esale_status_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',status[0])]) |
1944 | @@ -215,7 +138,7 @@ | |||
1945 | 215 | def lang_import(self, cr, uid, ids, *args): | 138 | def lang_import(self, cr, uid, ids, *args): |
1946 | 216 | esale_lang_obj = self.pool.get('esale.oscom.lang') | 139 | esale_lang_obj = self.pool.get('esale.oscom.lang') |
1947 | 217 | for website in self.browse(cr, uid, ids): | 140 | for website in self.browse(cr, uid, ids): |
1949 | 218 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 141 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1950 | 219 | languages = server.get_languages() | 142 | languages = server.get_languages() |
1951 | 220 | for language in languages: | 143 | for language in languages: |
1952 | 221 | update_language_ids = esale_lang_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',language[0])]) | 144 | update_language_ids = esale_lang_obj.search(cr, uid, [('web_id','=',website.id), ('esale_oscom_id','=',language[0])]) |
1953 | @@ -234,7 +157,7 @@ | |||
1954 | 234 | def get_payment_methods(self, cr, uid, ids, *args): | 157 | def get_payment_methods(self, cr, uid, ids, *args): |
1955 | 235 | esale_paytype_obj = self.pool.get('esale.oscom.paytype') | 158 | esale_paytype_obj = self.pool.get('esale.oscom.paytype') |
1956 | 236 | for website in self.browse(cr, uid, ids): | 159 | for website in self.browse(cr, uid, ids): |
1958 | 237 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 160 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1959 | 238 | payment_methods = server.get_payment_methods() | 161 | payment_methods = server.get_payment_methods() |
1960 | 239 | for payment_method in payment_methods: | 162 | for payment_method in payment_methods: |
1961 | 240 | value={ | 163 | value={ |
1962 | @@ -254,7 +177,7 @@ | |||
1963 | 254 | """Imports product categories from OSCommerce""" | 177 | """Imports product categories from OSCommerce""" |
1964 | 255 | esale_category_obj = self.pool.get('esale.oscom.category') | 178 | esale_category_obj = self.pool.get('esale.oscom.category') |
1965 | 256 | for website in self.browse(cr, uid, ids): | 179 | for website in self.browse(cr, uid, ids): |
1967 | 257 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 180 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1968 | 258 | categories = server.get_categories() | 181 | categories = server.get_categories() |
1969 | 259 | for category in categories: | 182 | for category in categories: |
1970 | 260 | value = { | 183 | value = { |
1971 | @@ -277,7 +200,7 @@ | |||
1972 | 277 | 200 | ||
1973 | 278 | created, updated = 0,0 | 201 | created, updated = 0,0 |
1974 | 279 | for website in self.browse(cr, uid, ids): | 202 | for website in self.browse(cr, uid, ids): |
1976 | 280 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 203 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
1977 | 281 | 204 | ||
1978 | 282 | # Search OScommerce languages mapped to OpenERP | 205 | # Search OScommerce languages mapped to OpenERP |
1979 | 283 | osc_langs = [lang.esale_oscom_id for lang in website.language_ids if lang.language_id and lang.language_id.translatable] | 206 | osc_langs = [lang.esale_oscom_id for lang in website.language_ids if lang.language_id and lang.language_id.translatable] |
1980 | @@ -356,6 +279,17 @@ | |||
1981 | 356 | """If you want create additonal information in OpenERP objects related to product you can redefine this method in your own module""" | 279 | """If you want create additonal information in OpenERP objects related to product you can redefine this method in your own module""" |
1982 | 357 | return True | 280 | return True |
1983 | 358 | 281 | ||
1984 | 282 | def get_products_oscom_url(self, cr, uid, website, prod_id,cat_id): | ||
1985 | 283 | website_url = website.url.split("/") | ||
1986 | 284 | prod_url = website_url[0] + "//" + website_url[2] + "/" | ||
1987 | 285 | for x in range(3,len(website_url)-1): | ||
1988 | 286 | prod_url += website_url[x] + "/" | ||
1989 | 287 | if(website.plataforma=='zen'): | ||
1990 | 288 | prod_url += "index.php?page=product_info&cPath=" + cat_id + "&products_id=" + prod_id | ||
1991 | 289 | else: | ||
1992 | 290 | prod_url += "product_info.php?cPath=" + cat_id + "&products_id=" + prod_id | ||
1993 | 291 | return prod_url | ||
1994 | 292 | |||
1995 | 359 | 293 | ||
1996 | 360 | def product_import_create(self, cr, uid, ids, *args): | 294 | def product_import_create(self, cr, uid, ids, *args): |
1997 | 361 | """Imports products from OSCommerce and creates/updates OpenERP products""" | 295 | """Imports products from OSCommerce and creates/updates OpenERP products""" |
1998 | @@ -367,8 +301,7 @@ | |||
1999 | 367 | 301 | ||
2000 | 368 | created, updated = 0,0 | 302 | created, updated = 0,0 |
2001 | 369 | for website in self.browse(cr, uid, ids): | 303 | for website in self.browse(cr, uid, ids): |
2004 | 370 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 304 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
2003 | 371 | website_url = website.url.split("/") | ||
2005 | 372 | 305 | ||
2006 | 373 | # Search esale languages mapped to OpenERP | 306 | # Search esale languages mapped to OpenERP |
2007 | 374 | osc_langs = [lang.esale_oscom_id for lang in website.language_ids if lang.language_id and lang.language_id.translatable] | 307 | osc_langs = [lang.esale_oscom_id for lang in website.language_ids if lang.language_id and lang.language_id.translatable] |
2008 | @@ -457,7 +390,7 @@ | |||
2009 | 457 | 'spe_price_status': 'status' in spec_prod and str(spec_prod['status']) or False, | 390 | 'spe_price_status': 'status' in spec_prod and str(spec_prod['status']) or False, |
2010 | 458 | 'spe_price': 'specials_new_products_price' in spec_prod and spec_prod['specials_new_products_price'] or False, | 391 | 'spe_price': 'specials_new_products_price' in spec_prod and spec_prod['specials_new_products_price'] or False, |
2011 | 459 | 'exp_date': 'expires_date' in spec_prod and spec_prod['expires_date']!='0000-00-00 00:00:00' and spec_prod['expires_date'] or False, | 392 | 'exp_date': 'expires_date' in spec_prod and spec_prod['expires_date']!='0000-00-00 00:00:00' and spec_prod['expires_date'] or False, |
2013 | 460 | 'oscom_url': website_url[0] + "//" + website_url[2] + "/" +"product_info.php?cPath=" + str(info_prod['categ_id']) + "&products_id=" + str(info_prod['products_id']), | 393 | 'oscom_url': self.get_products_oscom_url(cr, uid, website, str(info_prod['products_id']),str(info_prod['categ_id'])), |
2014 | 461 | 'manufacturer_id': manuf_id or False, | 394 | 'manufacturer_id': manuf_id or False, |
2015 | 462 | #'ean13': info_prod['products_model'], | 395 | #'ean13': info_prod['products_model'], |
2016 | 463 | #'type': 'Stockable product', | 396 | #'type': 'Stockable product', |
2017 | @@ -560,6 +493,8 @@ | |||
2018 | 560 | oscom_id = info_prod['products_id'] | 493 | oscom_id = info_prod['products_id'] |
2019 | 561 | else: | 494 | else: |
2020 | 562 | raise osv.except_osv(_('Product import done'),_('New or updated products are not found')) | 495 | raise osv.except_osv(_('Product import done'),_('New or updated products are not found')) |
2021 | 496 | #website.date_download_from = lambda *a:time.strftime('%Y-%m-%d') | ||
2022 | 497 | #website.write(cr, uid, website.id, {'date_download_from':time.strftime('%Y-%m-%d')}) | ||
2023 | 563 | raise osv.except_osv(_('Product import done'), _('Created: %d products\nUpdated: %d products\n\nRefresh screen to see updates') % (created, updated)) | 498 | raise osv.except_osv(_('Product import done'), _('Created: %d products\nUpdated: %d products\n\nRefresh screen to see updates') % (created, updated)) |
2024 | 564 | return True | 499 | return True |
2025 | 565 | 500 | ||
2026 | @@ -632,241 +567,328 @@ | |||
2027 | 632 | website = self.pool.get('esale.oscom.web').browse(cr, uid, website_id) | 567 | website = self.pool.get('esale.oscom.web').browse(cr, uid, website_id) |
2028 | 633 | osc_int = esale_status_obj.read(cr, uid, website.intermediate.id, ['esale_oscom_id']) | 568 | osc_int = esale_status_obj.read(cr, uid, website.intermediate.id, ['esale_oscom_id']) |
2029 | 634 | intermediate = osc_int['esale_oscom_id'] | 569 | intermediate = osc_int['esale_oscom_id'] |
2042 | 635 | #print "intermediate before import", intermediate | 570 | |
2043 | 636 | 571 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) | |
2044 | 637 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 572 | exists_more_packages = True |
2033 | 638 | cr.execute("select max(esale_oscom_id) from sale_order where esale_oscom_web=%s;" % str(website.id)) | ||
2034 | 639 | max_web_id = cr.fetchone()[0] | ||
2035 | 640 | |||
2036 | 641 | min_openorder=-1 | ||
2037 | 642 | if max_web_id: | ||
2038 | 643 | saleorders = server.get_saleorders(max_web_id, statuses_ids) | ||
2039 | 644 | min_openorder = server.get_min_open_orders(max_web_id) | ||
2040 | 645 | else: | ||
2041 | 646 | saleorders = server.get_saleorders(0, statuses_ids) | ||
2045 | 647 | no_of_so = 0 | 573 | no_of_so = 0 |
2047 | 648 | for saleorder in saleorders: | 574 | while exists_more_packages: |
2048 | 575 | cr.execute("select max(esale_oscom_id) from sale_order where esale_oscom_web=%s;" % str(website.id)) | ||
2049 | 576 | max_web_id = cr.fetchone()[0] | ||
2050 | 577 | |||
2051 | 578 | min_openorder=-1 | ||
2052 | 579 | if max_web_id: | ||
2053 | 580 | saleorders = server.get_saleorders(max_web_id, statuses_ids,website.download_number) | ||
2054 | 581 | min_openorder = server.get_min_open_orders(max_web_id) | ||
2055 | 582 | else: | ||
2056 | 583 | saleorders = server.get_saleorders(0, statuses_ids,website.download_number) | ||
2057 | 584 | if len(saleorders) != website.download_number: | ||
2058 | 585 | exists_more_packages = False | ||
2059 | 586 | for saleorder in saleorders: | ||
2060 | 649 | #print "==========*********NEW**************===========" | 587 | #print "==========*********NEW**************===========" |
2061 | 650 | #print "== Oscommerce Sale Order Number :", saleorder['id'] | 588 | #print "== Oscommerce Sale Order Number :", saleorder['id'] |
2062 | 651 | #print "PEDIDO VENTA: " , saleorder | 589 | #print "PEDIDO VENTA: " , saleorder |
2171 | 652 | if len(saleorder['partner']) > 0 : | 590 | if len(saleorder['partner']) > 0 : |
2172 | 653 | oscom_partner = saleorder['partner'][0] | 591 | oscom_partner = saleorder['partner'][0] |
2173 | 654 | #print "== Sale order partner:", saleorder['partner'][0] | 592 | #print "== Sale order partner:", saleorder['partner'][0] |
2174 | 655 | partner_ids = partner_obj.search(cr, uid, [('esale_oscom_id','=',oscom_partner['esale_oscom_id'])]) | 593 | partner_ids = partner_obj.search(cr, uid, [('esale_oscom_id','=',oscom_partner['esale_oscom_id'])]) |
2175 | 656 | if len(partner_ids): | 594 | if len(partner_ids): |
2176 | 657 | partner_id = partner_ids[0] | 595 | partner_id = partner_ids[0] |
2177 | 658 | #print "partner: ", partner_ids | 596 | #print "partner: ", partner_ids |
2178 | 659 | partner_obj.write(cr, uid, partner_ids, {'name':oscom_partner['name']}) | 597 | partner_obj.write(cr, uid, partner_ids, {'name':oscom_partner['name']}) |
2179 | 660 | else: | 598 | else: |
2180 | 661 | del oscom_partner['addresses'] | 599 | del oscom_partner['addresses'] |
2181 | 662 | partner_id = partner_obj.create(cr, uid, oscom_partner) | 600 | partner_id = partner_obj.create(cr, uid, oscom_partner) |
2182 | 663 | partner_obj.write(cr, uid, partner_ids, {'ref':oscom_partner['esale_oscom_id']}) | 601 | partner_obj.write(cr, uid, partner_ids, {'ref':oscom_partner['esale_oscom_id']}) |
2183 | 664 | 602 | cr.execute("INSERT INTO res_partner_category_rel(partner_id, category_id) VALUES (%d,%d);" % (partner_id,(website.default_partner_category)['id'])) | |
2184 | 665 | self.customer_extra_info(cr, uid, website, partner_id, oscom_partner['esale_oscom_id']) # Creates additonal information in OpenERP objects related to customer | 603 | |
2185 | 666 | 604 | self.customer_extra_info(cr, uid, website, partner_id, oscom_partner['esale_oscom_id']) # Creates additonal information in OpenERP objects related to customer | |
2186 | 667 | # Default address is right on Website so we create the order. | 605 | |
2187 | 668 | if len(saleorder['address']) > 0 : | 606 | # Default address is right on Website so we create the order. |
2188 | 669 | #print "" | 607 | if len(saleorder['address']) > 0 : |
2189 | 670 | #print "===Sale order default address:",saleorder['address'][0] | 608 | #print "" |
2190 | 671 | default_address = saleorder['address'][0] | 609 | #print "===Sale order default address:",saleorder['address'][0] |
2191 | 672 | del saleorder['address'] | 610 | default_address = saleorder['address'][0] |
2192 | 673 | default_address['type'] = 'default' | 611 | del saleorder['address'] |
2193 | 674 | default_address_id = _add_address(self, cr, uid, default_address.copy(), partner_id, context) | 612 | default_address['type'] = 'default' |
2194 | 675 | shipping_address = [] | 613 | default_address_id = _add_address(self, cr, uid, default_address.copy(), partner_id, context) |
2195 | 676 | if len(saleorder['delivery']) > 0 : | 614 | shipping_address = [] |
2196 | 677 | #print "" | 615 | if len(saleorder['delivery']) > 0 : |
2197 | 678 | #print "===Sale order Delivery:",saleorder['delivery'][0] | 616 | #print "" |
2198 | 679 | shipping_address = saleorder['delivery'][0] | 617 | #print "===Sale order Delivery:",saleorder['delivery'][0] |
2199 | 680 | del saleorder['delivery'] | 618 | shipping_address = saleorder['delivery'][0] |
2200 | 681 | shipping_address['type'] = 'delivery' | 619 | del saleorder['delivery'] |
2201 | 682 | shipping_address_id = _add_address(self, cr, uid, shipping_address.copy(), partner_id, context) | 620 | shipping_address['type'] = 'delivery' |
2202 | 683 | billing_address = [] | 621 | shipping_address_id = _add_address(self, cr, uid, shipping_address.copy(), partner_id, context) |
2203 | 684 | if len(saleorder['billing']) > 0 : | 622 | billing_address = [] |
2204 | 685 | #print "" | 623 | if len(saleorder['billing']) > 0 : |
2205 | 686 | #print "===Sale order Billing:",saleorder['billing'][0] | 624 | #print "" |
2206 | 687 | billing_address = saleorder['billing'][0] | 625 | #print "===Sale order Billing:",saleorder['billing'][0] |
2207 | 688 | del saleorder['billing'] | 626 | billing_address = saleorder['billing'][0] |
2208 | 689 | billing_address['type'] = 'invoice' | 627 | del saleorder['billing'] |
2209 | 690 | billing_address_id = _add_address(self, cr, uid, billing_address.copy(),partner_id, context) | 628 | billing_address['type'] = 'invoice' |
2210 | 691 | 629 | billing_address_id = _add_address(self, cr, uid, billing_address.copy(),partner_id, context) | |
2211 | 692 | value={ 'esale_oscom_web': website.id, | 630 | |
2212 | 693 | 'esale_oscom_id' : saleorder['id'], | 631 | value={ 'esale_oscom_web': website.id, |
2213 | 694 | 'shop_id' : website.shop_id.id, | 632 | 'esale_oscom_id' : saleorder['id'], |
2214 | 695 | 'partner_id' : partner_id, | 633 | 'shop_id' : website.shop_id.id, |
2215 | 696 | 'note' : saleorder['note'], | 634 | 'partner_id' : partner_id, |
2216 | 697 | 'pay_met_title' : saleorder['pay_met_title'], | 635 | 'note' : saleorder['note'], |
2217 | 698 | 'shipping_title' : saleorder['shipping_title'], | 636 | 'pay_met_title' : saleorder['pay_met_title'], |
2218 | 699 | 'orders_status' : saleorder['orders_status'], | 637 | 'shipping_title' : saleorder['shipping_title'], |
2219 | 700 | 'date_order' : saleorder['date'], | 638 | 'orders_status' : saleorder['orders_status'], |
2220 | 701 | #'price_type' : saleorder['price_type'] | 639 | 'date_order' : saleorder['date'], |
2221 | 702 | } | 640 | #'price_type' : saleorder['price_type'] |
2222 | 703 | 641 | } | |
2223 | 704 | value.update(saleorder_obj.onchange_shop_id(cr, uid, [], value['shop_id'])['value']) | 642 | |
2224 | 705 | value.update(saleorder_obj.onchange_partner_id(cr, uid, [], value['partner_id'])['value']) | 643 | value.update(saleorder_obj.onchange_shop_id(cr, uid, [], value['shop_id'])['value']) |
2225 | 706 | # address_obj = self.pool.get('res.partner.address') | 644 | value.update(saleorder_obj.onchange_partner_id(cr, uid, [], value['partner_id'])['value']) |
2226 | 707 | # for address in [('address','order'), ('billing', 'invoice'), ('delivery', 'shipping')]: | 645 | # address_obj = self.pool.get('res.partner.address') |
2227 | 708 | # criteria = [('partner_id', '=', website.partner_anonymous_id.id)] | 646 | # for address in [('address','order'), ('billing', 'invoice'), ('delivery', 'shipping')]: |
2228 | 709 | # insert = {'partner_id': website.partner_anonymous_id.id} | 647 | # criteria = [('partner_id', '=', website.partner_anonymous_id.id)] |
2229 | 710 | # for criterium in [('city', 'city'), ('name', 'name'), ('zip','zip'), ('address', 'street') ]: | 648 | # insert = {'partner_id': website.partner_anonymous_id.id} |
2230 | 711 | # criteria.append((criterium[1], 'like', saleorder[address[0]][criterium[0]])) | 649 | # for criterium in [('city', 'city'), ('name', 'name'), ('zip','zip'), ('address', 'street') ]: |
2231 | 712 | # insert[criterium[1]] = saleorder[address[0]][criterium[0]] | 650 | # criteria.append((criterium[1], 'like', saleorder[address[0]][criterium[0]])) |
2232 | 713 | # address_ids = address_obj.search(cr, uid, criteria) | 651 | # insert[criterium[1]] = saleorder[address[0]][criterium[0]] |
2233 | 714 | # if len(address_ids): | 652 | # address_ids = address_obj.search(cr, uid, criteria) |
2234 | 715 | # id = address_ids[0] | 653 | # if len(address_ids): |
2235 | 716 | # else: | 654 | # id = address_ids[0] |
2236 | 717 | # country_ids = self.pool.get('res.country').search(cr, uid, [('name', 'ilike', saleorder[address[0]]['country'])]) | 655 | # else: |
2237 | 718 | # if len(country_ids): | 656 | # country_ids = self.pool.get('res.country').search(cr, uid, [('name', 'ilike', saleorder[address[0]]['country'])]) |
2238 | 719 | # country_id = country_ids[0] | 657 | # if len(country_ids): |
2239 | 720 | # else: | 658 | # country_id = country_ids[0] |
2240 | 721 | # country_id = self.pool.get('res.country').create(cr, uid, { 'name' : saleorder[address[0]]['country'], | 659 | # else: |
2241 | 722 | # 'code' : saleorder[address[0]]['country'][0:2].lower()}) | 660 | # country_id = self.pool.get('res.country').create(cr, uid, { 'name' : saleorder[address[0]]['country'], |
2242 | 723 | # insert['country_id'] = country_id | 661 | # 'code' : saleorder[address[0]]['country'][0:2].lower()}) |
2243 | 724 | # if address[0] == 'address': | 662 | # insert['country_id'] = country_id |
2244 | 725 | # insert['email'] = saleorder['address']['email'] | 663 | # if address[0] == 'address': |
2245 | 726 | # id = address_obj.create(cr, uid, insert) | 664 | # insert['email'] = saleorder['address']['email'] |
2246 | 727 | # | 665 | # id = address_obj.create(cr, uid, insert) |
2247 | 728 | # value.update({'partner_%s_id' % address[1]: id}) | 666 | # |
2248 | 729 | value['partner_order_id'] = default_address_id | 667 | # value.update({'partner_%s_id' % address[1]: id}) |
2249 | 730 | if len(shipping_address) > 0 : | 668 | value['partner_order_id'] = default_address_id |
2250 | 731 | value['partner_shipping_id'] = shipping_address_id | 669 | if len(shipping_address) > 0 : |
2251 | 732 | else: | 670 | value['partner_shipping_id'] = shipping_address_id |
2252 | 733 | value['partner_shipping_id'] = default_address_id | 671 | else: |
2253 | 734 | 672 | value['partner_shipping_id'] = default_address_id | |
2254 | 735 | if len(billing_address) > 0 : | 673 | |
2255 | 736 | value['partner_invoice_id'] = billing_address_id | 674 | if len(billing_address) > 0 : |
2256 | 737 | else: | 675 | value['partner_invoice_id'] = billing_address_id |
2257 | 738 | value['partner_invoice_id'] = default_address_id | 676 | else: |
2258 | 739 | order_id = saleorder_obj.create(cr, uid, value) | 677 | value['partner_invoice_id'] = default_address_id |
2259 | 740 | order_id_obj = saleorder_obj.browse(cr, uid, order_id) | 678 | order_id = saleorder_obj.create(cr, uid, value) |
2260 | 741 | concat_cod = self.sale_order_code(order_id_obj) | 679 | order_id_obj = saleorder_obj.browse(cr, uid, order_id) |
2261 | 742 | saleorder_obj.write(cr, uid, order_id, {'name':concat_cod}) | 680 | concat_cod = self.sale_order_code(order_id_obj) |
2262 | 743 | 681 | saleorder_obj.write(cr, uid, order_id, {'name':concat_cod}) | |
2263 | 744 | for orderline in saleorder['lines']: | 682 | |
2264 | 745 | ids = esale_product_obj.search(cr, uid, [('esale_oscom_id', '=', orderline['product_id']), ('web_id', '=', website.id)]) | 683 | for orderline in saleorder['lines']: |
2265 | 746 | if len(ids): | 684 | ids = esale_product_obj.search(cr, uid, [('esale_oscom_id', '=', orderline['product_id']), ('web_id', '=', website.id)]) |
2158 | 747 | oscom_product_id = ids[0] | ||
2159 | 748 | oscom_product = esale_product_obj.browse(cr, uid, oscom_product_id) | ||
2160 | 749 | product_id = oscom_product.product_id.id | ||
2161 | 750 | #print "producto oscommerce encontrado:", product_id | ||
2162 | 751 | else: | ||
2163 | 752 | product_id = product_obj.search(cr, uid, [('name','=','Shipping Cost')])[0] | ||
2164 | 753 | # if product comes with attributes, we will try to find the exact product variant | ||
2165 | 754 | #print "tratando linea" , orderline | ||
2166 | 755 | attributes = (orderline.has_key('attributes') and orderline['attributes']) or False | ||
2167 | 756 | if attributes: | ||
2168 | 757 | #print orderline['attributes'] | ||
2169 | 758 | #print "codigo producto", attributes['composed_code'] | ||
2170 | 759 | ids = product_obj.search(cr, uid, [('default_code', '=', attributes['composed_code']),('variants', '=', attributes['products_options_values'])]) | ||
2266 | 760 | if len(ids): | 685 | if len(ids): |
2293 | 761 | #print "producto con atributos encontrado:", ids | 686 | oscom_product_id = ids[0] |
2294 | 762 | product_id = ids[0] | 687 | oscom_product = esale_product_obj.browse(cr, uid, oscom_product_id) |
2295 | 763 | 688 | product_id = oscom_product.product_id.id | |
2296 | 764 | linevalue = { | 689 | #print "producto oscommerce encontrado:", product_id |
2297 | 765 | 'product_id' : product_id, | 690 | else: |
2298 | 766 | 'product_uom_qty': orderline['product_qty'], | 691 | #raise osv.except_osv(_('Ordered product not found in OpenErp'), _('Default product named \'Shipping Cost\' will be used.\nIn case it doesn\'t exist, please create it')) |
2299 | 767 | 'order_id' : order_id, | 692 | product_id = product_obj.search(cr, uid, [('name','=','Shipping Cost')])[0] |
2300 | 768 | } | 693 | # if product comes with attributes, we will try to find the exact product variant |
2301 | 769 | onchange_product_sol = saleorder_line_obj.product_id_change(cr, uid, [], value['pricelist_id'], linevalue['product_id'], linevalue['product_uom_qty'],False, 0, False, '', value['partner_id'])['value'] | 694 | #print "tratando linea" , orderline |
2302 | 770 | onchange_product_sol['tax_id'] = False | 695 | attributes = (orderline.has_key('attributes') and orderline['attributes']) or False |
2277 | 771 | if orderline['tax_rate'] > 0.0000: | ||
2278 | 772 | tax_rate_search_ids = tax_obj.search(cr, uid, [('tax_group','=','vat'),('amount','=',orderline['tax_rate']/100), ('type_tax_use', '=','sale')]) | ||
2279 | 773 | else: | ||
2280 | 774 | tax_rate_search_ids = tax_obj.search(cr, uid, [('tax_group','=','vat'),('amount','=',0), ('type_tax_use', '=','sale')]) | ||
2281 | 775 | if tax_rate_search_ids: | ||
2282 | 776 | onchange_product_sol['tax_id'] = tax_rate_search_ids | ||
2283 | 777 | price = orderline['price'] | ||
2284 | 778 | name = orderline['name'] | ||
2285 | 779 | if saleorder['price_type'] == 'tax_excluded' and attributes: | ||
2286 | 780 | # print "EVALUANDO PRECIOS ATRIBUTOS: ", str(price) | ||
2287 | 781 | # print "prefix: ", attributes['price_prefix'] | ||
2288 | 782 | # print "EVALUANDO PRECIOS ATRIBUTOS2: ", str(attributes['options_values_price']) | ||
2289 | 783 | price = eval(str(price) + attributes['price_prefix'] + str(attributes['options_values_price'])) | ||
2290 | 784 | name = name + ' ' + attributes['products_options'] + ' + ' + attributes['products_options_values'] | ||
2291 | 785 | elif saleorder['price_type'] == 'tax_included': | ||
2292 | 786 | price = price * (1+orderline['tax_rate']/100) | ||
2303 | 787 | if attributes: | 696 | if attributes: |
2307 | 788 | options_value_price = attributes['options_values_price'] | 697 | #print orderline['attributes'] |
2308 | 789 | cal_options_value_price = options_value_price * (1+orderline['tax_rate']/100) | 698 | #print "codigo producto", attributes['composed_code'] |
2309 | 790 | price = eval(str(price) + attributes['price_prefix'] + str(cal_options_value_price)) | 699 | ids = product_obj.search(cr, uid, [('default_code', '=', attributes['composed_code']),('variants', '=', attributes['products_options_values'])]) |
2310 | 700 | if len(ids): | ||
2311 | 701 | #print "producto con atributos encontrado:", ids | ||
2312 | 702 | product_id = ids[0] | ||
2313 | 703 | |||
2314 | 704 | linevalue = { | ||
2315 | 705 | 'product_id' : product_id, | ||
2316 | 706 | 'product_uom_qty': orderline['product_qty'], | ||
2317 | 707 | 'order_id' : order_id, | ||
2318 | 708 | } | ||
2319 | 709 | onchange_product_sol = saleorder_line_obj.product_id_change(cr, uid, [], value['pricelist_id'], linevalue['product_id'], linevalue['product_uom_qty'],False, 0, False, '', value['partner_id'])['value'] | ||
2320 | 710 | onchange_product_sol['tax_id'] = False | ||
2321 | 711 | if orderline['tax_rate'] > 0.0000: | ||
2322 | 712 | tax_rate_search_ids = tax_obj.search(cr, uid, [('tax_group','=','vat'),('amount','=',orderline['tax_rate']/100), ('type_tax_use', '=','sale')]) | ||
2323 | 713 | else: | ||
2324 | 714 | tax_rate_search_ids = tax_obj.search(cr, uid, [('tax_group','=','vat'),('amount','=',0), ('type_tax_use', '=','sale')]) | ||
2325 | 715 | if tax_rate_search_ids: | ||
2326 | 716 | onchange_product_sol['tax_id'] = tax_rate_search_ids | ||
2327 | 717 | price = orderline['price'] | ||
2328 | 718 | name = orderline['name'] | ||
2329 | 719 | if saleorder['price_type'] == 'tax_excluded' and attributes: | ||
2330 | 720 | # print "EVALUANDO PRECIOS ATRIBUTOS: ", str(price) | ||
2331 | 721 | # print "prefix: ", attributes['price_prefix'] | ||
2332 | 722 | # print "EVALUANDO PRECIOS ATRIBUTOS2: ", str(attributes['options_values_price']) | ||
2333 | 723 | price = eval(str(price) + attributes['price_prefix'] + str(attributes['options_values_price'])) | ||
2334 | 791 | name = name + ' ' + attributes['products_options'] + ' + ' + attributes['products_options_values'] | 724 | name = name + ' ' + attributes['products_options'] + ' + ' + attributes['products_options_values'] |
2407 | 792 | onchange_product_sol['price_unit'] = round(price,2) | 725 | elif saleorder['price_type'] == 'tax_included': |
2408 | 793 | linevalue.update(onchange_product_sol) | 726 | price = price * (1+orderline['tax_rate']/100) |
2409 | 794 | linevalue.update(saleorder_line_obj.default_get(cr, uid, ['sequence', 'invoiced', 'state', 'product_packaging'])) | 727 | if attributes: |
2410 | 795 | linevalue['name'] = name | 728 | options_value_price = attributes['options_values_price'] |
2411 | 796 | if linevalue.get('weight',False): | 729 | cal_options_value_price = options_value_price * (1+orderline['tax_rate']/100) |
2412 | 797 | del linevalue['weight'] | 730 | price = eval(str(price) + attributes['price_prefix'] + str(cal_options_value_price)) |
2413 | 798 | linevalue["product_uos"] = linevalue['product_uos'] and linevalue['product_uos'][0] | 731 | name = name + ' ' + attributes['products_options'] + ' + ' + attributes['products_options_values'] |
2414 | 799 | tax_id = linevalue['tax_id'] and linevalue['tax_id'][0] | 732 | onchange_product_sol['price_unit'] = round(price,2) |
2415 | 800 | del linevalue['tax_id'] | 733 | linevalue.update(onchange_product_sol) |
2416 | 801 | ptax_id = [tax_id] | 734 | linevalue.update(saleorder_line_obj.default_get(cr, uid, ['sequence', 'invoiced', 'state', 'product_packaging'])) |
2417 | 802 | id_orderline = saleorder_line_obj.create(cr, uid, linevalue) | 735 | linevalue['name'] = name |
2418 | 803 | saleorder_line_obj.write(cr, uid, [id_orderline], {'tax_id':[(6, 0, ptax_id)]}) | 736 | if linevalue.get('weight',False): |
2419 | 804 | no_of_so +=1 | 737 | del linevalue['weight'] |
2420 | 805 | 738 | linevalue["product_uos"] = linevalue['product_uos'] and linevalue['product_uos'][0] | |
2421 | 806 | ###################################################################################### | 739 | tax_id = linevalue['tax_id'] and linevalue['tax_id'][0] |
2422 | 807 | oscom_pay_met = saleorder['pay_met'] | 740 | del linevalue['tax_id'] |
2423 | 808 | typ_ids = esale_paytype_obj.search(cr, uid, [('esale_oscom_id', '=', oscom_pay_met), ('web_id', '=', website.id)]) | 741 | if tax_id: |
2424 | 809 | saleorder = saleorder_obj.browse(cr, uid, order_id) | 742 | ptax_id = [tax_id] |
2425 | 810 | if typ_ids: | 743 | id_orderline = saleorder_line_obj.create(cr, uid, linevalue) |
2426 | 811 | typ_data = esale_paytype_obj.browse(cr, uid, typ_ids)[0] | 744 | saleorder_line_obj.write(cr, uid, [id_orderline], {'tax_id':[(6, 0, ptax_id)]}) |
2427 | 812 | paytype = typ_data.paytyp | 745 | no_of_so +=1 |
2428 | 813 | cr.execute('select * from ir_module_module where name=%s and state=%s', ('sale_payment','installed')) | 746 | |
2429 | 814 | if cr.fetchone(): | 747 | ###################################################################################### |
2430 | 815 | saleorder_obj.write(cr, uid, [order_id], {'payment_type': typ_data.payment_id.id}) | 748 | oscom_pay_met = saleorder['pay_met'] |
2431 | 816 | else: | 749 | typ_ids = esale_paytype_obj.search(cr, uid, [('esale_oscom_id', '=', oscom_pay_met), ('web_id', '=', website.id)]) |
2432 | 817 | paytype = 'type1' | 750 | saleorder = saleorder_obj.browse(cr, uid, order_id) |
2433 | 818 | wf_service = netsvc.LocalService("workflow") | 751 | if typ_ids: |
2434 | 819 | if paytype == 'type1': | 752 | typ_data = esale_paytype_obj.browse(cr, uid, typ_ids)[0] |
2435 | 820 | #SO in state draft so nothing | 753 | paytype = typ_data.paytyp |
2436 | 821 | pass | 754 | cr.execute('select * from ir_module_module where name=%s and state=%s', ('sale_payment','installed')) |
2437 | 822 | elif paytype == 'type2': | 755 | if cr.fetchone(): |
2438 | 823 | #SO in state confirmed | 756 | saleorder_obj.write(cr, uid, [order_id], {'payment_type': typ_data.payment_id.id}) |
2439 | 824 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) | 757 | else: |
2440 | 825 | elif paytype == 'type3': | 758 | paytype = 'type1' |
2441 | 826 | #INVOICE draft | 759 | wf_service = netsvc.LocalService("workflow") |
2442 | 827 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) | 760 | if paytype == 'type1': |
2443 | 828 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) | 761 | #SO in state draft so nothing |
2444 | 829 | elif paytype == 'type4': | 762 | pass |
2445 | 830 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) | 763 | elif paytype == 'type2': |
2446 | 831 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) | 764 | #SO in state confirmed |
2447 | 832 | inv_ids = inv_obj.search(cr, uid, [('origin','=',saleorder.name)]) | 765 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) |
2448 | 833 | inv_obj.button_compute(cr, uid, inv_ids) | 766 | elif paytype == 'type3': |
2449 | 834 | wf_service.trg_validate(uid, 'account.invoice',inv_ids[0], 'invoice_open', cr) | 767 | #INVOICE draft |
2450 | 835 | elif paytype == 'type5': | 768 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) |
2451 | 836 | #INVOICE payed | 769 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) |
2452 | 837 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) | 770 | elif paytype == 'type4': |
2453 | 838 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) | 771 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) |
2454 | 839 | pay_account_id = (website.esale_account_id)['id'] | 772 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) |
2455 | 840 | pay_journal_id = typ_data.journal_id.id | 773 | inv_ids = inv_obj.search(cr, uid, [('origin','=',saleorder.name)]) |
2456 | 841 | inv_ids = inv_obj.search(cr, uid, [('origin','=',saleorder.name)]) | 774 | inv_obj.button_compute(cr, uid, inv_ids) |
2457 | 842 | inv_obj.button_compute(cr, uid, inv_ids) | 775 | wf_service.trg_validate(uid, 'account.invoice',inv_ids[0], 'invoice_open', cr) |
2458 | 843 | wf_service.trg_validate(uid, 'account.invoice',inv_ids[0], 'invoice_open', cr) | 776 | elif paytype == 'type5': |
2459 | 844 | ids = self.pool.get('account.period').find(cr, uid, context=context) | 777 | #INVOICE payed |
2460 | 845 | period_id = False | 778 | wf_service.trg_validate(uid, 'sale.order', order_id, 'order_confirm', cr) |
2461 | 846 | if len(ids): | 779 | wf_service.trg_validate(uid, 'sale.order', order_id, 'manual_invoice', cr) |
2462 | 847 | period_id = ids[0] | 780 | pay_account_id = (website.esale_account_id)['id'] |
2463 | 848 | 781 | pay_journal_id = typ_data.journal_id.id | |
2464 | 849 | invoice = inv_obj.browse(cr, uid,inv_ids[0],{}) | 782 | inv_ids = inv_obj.search(cr, uid, [('origin','=',saleorder.name)]) |
2465 | 850 | company_currency = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id | 783 | inv_obj.button_compute(cr, uid, inv_ids) |
2466 | 851 | if invoice.currency_id.id != company_currency: | 784 | wf_service.trg_validate(uid, 'account.invoice',inv_ids[0], 'invoice_open', cr) |
2467 | 852 | amount = round(self.pool.get('res.currency').compute(cr, uid, invoice.currency_id.id, company_currency, invoice.amount_total), 2) | 785 | ids = self.pool.get('account.period').find(cr, uid, context=context) |
2468 | 853 | else: | 786 | period_id = False |
2469 | 854 | amount = invoice.amount_total | 787 | if len(ids): |
2470 | 855 | 788 | period_id = ids[0] | |
2471 | 856 | inv_obj.pay_and_reconcile(cr, uid, inv_ids, amount, pay_account_id, period_id, pay_journal_id, False, False, False, context={}) | 789 | |
2472 | 857 | else: | 790 | invoice = inv_obj.browse(cr, uid,inv_ids[0],{}) |
2473 | 858 | #The payment method hasn't been mapped | 791 | company_currency = self.pool.get('res.users').browse(cr, uid, uid).company_id.currency_id.id |
2474 | 859 | pass | 792 | if invoice.currency_id.id != company_currency: |
2475 | 860 | cr.commit() | 793 | amount = round(self.pool.get('res.currency').compute(cr, uid, invoice.currency_id.id, company_currency, invoice.amount_total), 2) |
2476 | 861 | for saleorder in saleorders: | 794 | else: |
2477 | 862 | #print "website.intermediate: " , intermediate | 795 | amount = invoice.amount_total |
2478 | 863 | server.update_order_status(saleorder['id'], intermediate, '',0,0) | 796 | |
2479 | 797 | inv_obj.pay_and_reconcile(cr, uid, inv_ids, amount, pay_account_id, period_id, pay_journal_id, False, False, False, context={}) | ||
2480 | 798 | else: | ||
2481 | 799 | #The payment method hasn't been mapped | ||
2482 | 800 | pass | ||
2483 | 801 | cr.commit() | ||
2484 | 802 | for saleorder in saleorders: | ||
2485 | 803 | #print "website.intermediate: " , intermediate | ||
2486 | 804 | server.update_order_status(saleorder['id'], intermediate, '',0,0) | ||
2487 | 805 | |||
2488 | 864 | 806 | ||
2489 | 865 | ###################### look for open orders in site that are 'done' in TinyERP ################### | 807 | ###################### look for open orders in site that are 'done' in TinyERP ################### |
2490 | 866 | ###################### and close them ################### | 808 | ###################### and close them ################### |
2491 | 867 | return no_of_so | 809 | return no_of_so |
2492 | 868 | esale_oscom_web() | 810 | esale_oscom_web() |
2493 | 869 | 811 | ||
2494 | 812 | class esale_oscom_tax(osv.osv): | ||
2495 | 813 | _name = "esale.oscom.tax" | ||
2496 | 814 | _description = "esale_oscom Tax" | ||
2497 | 815 | _columns = { | ||
2498 | 816 | 'name': fields.char('Tax name', size=32, required=True, readonly=True), | ||
2499 | 817 | 'esale_oscom_id': fields.integer('OScommerce Id'), | ||
2500 | 818 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
2501 | 819 | 'tax_id': fields.many2one('account.tax', 'OpenERP tax'), | ||
2502 | 820 | } | ||
2503 | 821 | esale_oscom_tax() | ||
2504 | 822 | |||
2505 | 823 | class esale_oscom_category(osv.osv): | ||
2506 | 824 | _name = "esale.oscom.category" | ||
2507 | 825 | _description = "esale_oscom Category" | ||
2508 | 826 | _columns = { | ||
2509 | 827 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
2510 | 828 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
2511 | 829 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
2512 | 830 | 'category_id': fields.many2one('product.category', 'OpenERP category'), | ||
2513 | 831 | } | ||
2514 | 832 | esale_oscom_category() | ||
2515 | 833 | |||
2516 | 834 | class esale_oscom_paytype(osv.osv): | ||
2517 | 835 | _name = "esale.oscom.paytype" | ||
2518 | 836 | _description = "esale_oscom PayType" | ||
2519 | 837 | _columns = { | ||
2520 | 838 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
2521 | 839 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
2522 | 840 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
2523 | 841 | 'payment_id': fields.many2one('payment.type', 'OpenERP payment'), | ||
2524 | 842 | 'paytyp': fields.selection([('type1','SO in State Draft'),('type2','SO Confirmed'),('type3','Invoice Draft'),('type4','Invoice Confirmed'),('type5','Invoice Payed')], 'Payment type'), | ||
2525 | 843 | 'journal_id': fields.many2one('account.journal', 'OpenERP payment journal'), | ||
2526 | 844 | } | ||
2527 | 845 | esale_oscom_paytype() | ||
2528 | 846 | |||
2529 | 847 | |||
2530 | 848 | class esale_oscom_language(osv.osv): | ||
2531 | 849 | _name = "esale.oscom.lang" | ||
2532 | 850 | _description = "esale_oscom Language" | ||
2533 | 851 | _columns = { | ||
2534 | 852 | 'name': fields.char('Name', size=32, required=True, readonly=True), | ||
2535 | 853 | 'esale_oscom_id': fields.integer('OScommerce Id', required=True), | ||
2536 | 854 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
2537 | 855 | 'language_id': fields.many2one('res.lang', 'OpenERP language'), | ||
2538 | 856 | } | ||
2539 | 857 | esale_oscom_language() | ||
2540 | 858 | |||
2541 | 859 | |||
2542 | 860 | class esale_oscom_product(osv.osv): | ||
2543 | 861 | _name = "esale.oscom.product" | ||
2544 | 862 | _description = "esale_oscom Product" | ||
2545 | 863 | _columns = { | ||
2546 | 864 | 'name': fields.char('Name', size=64, required=True, readonly=True), | ||
2547 | 865 | 'esale_oscom_id': fields.integer('OScommerce product Id'), | ||
2548 | 866 | 'web_id': fields.many2one('esale.oscom.web', 'Website'), | ||
2549 | 867 | 'product_id': fields.many2one('product.product', 'OpenERP product'), | ||
2550 | 868 | } | ||
2551 | 869 | |||
2552 | 870 | def onchange_product_id(self, cr, uid, ids, product_id, web_id): | ||
2553 | 871 | value = {} | ||
2554 | 872 | if (product_id): | ||
2555 | 873 | product = self.pool.get('product.product').browse(cr, uid, product_id) | ||
2556 | 874 | value['name'] = product.name | ||
2557 | 875 | return {'value': value} | ||
2558 | 876 | |||
2559 | 877 | def unlink(self, cr, uid, ids, context=None): | ||
2560 | 878 | websites = {} | ||
2561 | 879 | for esale_product in self.browse(cr, uid, ids): | ||
2562 | 880 | web_product_ids = websites.get(esale_product.web_id and esale_product.web_id.id) | ||
2563 | 881 | if web_product_ids and len(web_product_ids): | ||
2564 | 882 | web_product_ids.append(esale_product.esale_oscom_id) | ||
2565 | 883 | else: | ||
2566 | 884 | websites[esale_product.web_id and esale_product.web_id.id] = [esale_product.esale_oscom_id] | ||
2567 | 885 | websites_objs = self.pool.get('esale.oscom.web').browse(cr, uid, [x for x in websites.keys() if type(x) is int]) | ||
2568 | 886 | for website in websites_objs: | ||
2569 | 887 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) | ||
2570 | 888 | server.remove_product({'oscom_product_ids':websites.get(website.id)}) | ||
2571 | 889 | return super(esale_oscom_product,self).unlink(cr, uid, ids, context) | ||
2572 | 890 | esale_oscom_product() | ||
2573 | 891 | |||
2574 | 870 | 892 | ||
2575 | 871 | class esale_oscom_saleorder_line(osv.osv): | 893 | class esale_oscom_saleorder_line(osv.osv): |
2576 | 872 | def _amount_line_net(self, cr, uid, ids, field_name, arg, context): | 894 | def _amount_line_net(self, cr, uid, ids, field_name, arg, context): |
2577 | @@ -925,7 +947,7 @@ | |||
2578 | 925 | value={} | 947 | value={} |
2579 | 926 | if esale_oscom_web: | 948 | if esale_oscom_web: |
2580 | 927 | website = self.pool.get('esale.oscom.web').browse(cr, uid, esale_oscom_web) | 949 | website = self.pool.get('esale.oscom.web').browse(cr, uid, esale_oscom_web) |
2582 | 928 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 950 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
2583 | 929 | esale_status_obj = self.pool.get('esale.oscom.status') | 951 | esale_status_obj = self.pool.get('esale.oscom.status') |
2584 | 930 | osc_int = esale_status_obj.read(cr, uid, orders_status_id, ['esale_oscom_id']) | 952 | osc_int = esale_status_obj.read(cr, uid, orders_status_id, ['esale_oscom_id']) |
2585 | 931 | ostatus_id = osc_int['esale_oscom_id'] | 953 | ostatus_id = osc_int['esale_oscom_id'] |
2586 | @@ -1022,4 +1044,4 @@ | |||
2587 | 1022 | _columns = { | 1044 | _columns = { |
2588 | 1023 | 'esale_oscom_id': fields.integer('OScommerce Id'), | 1045 | 'esale_oscom_id': fields.integer('OScommerce Id'), |
2589 | 1024 | } | 1046 | } |
2591 | 1025 | esale_oscom_partner_address() | 1047 | esale_oscom_partner_address() |
2592 | 1026 | \ No newline at end of file | 1048 | \ No newline at end of file |
2593 | 1027 | 1049 | ||
2594 | === modified file 'esale_osc/esale_oscom_product.py' | |||
2595 | --- esale_osc/esale_oscom_product.py 2010-02-02 20:22:20 +0000 | |||
2596 | +++ esale_osc/esale_oscom_product.py 2010-07-21 10:31:39 +0000 | |||
2597 | @@ -1,3 +1,4 @@ | |||
2598 | 1 | # -*- coding: utf-8 -*- | ||
2599 | 1 | # -*- encoding: utf-8 -*- | 2 | # -*- encoding: utf-8 -*- |
2600 | 2 | ############################################################################## | 3 | ############################################################################## |
2601 | 3 | # | 4 | # |
2602 | @@ -18,9 +19,9 @@ | |||
2603 | 18 | # | 19 | # |
2604 | 19 | # You should have received a copy of the GNU General Public License | 20 | # You should have received a copy of the GNU General Public License |
2605 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
2609 | 21 | # | 22 | # |
2610 | 22 | ############################################################################## | 23 | ############################################################################## |
2611 | 23 | 24 | ||
2612 | 24 | from osv import fields,osv,orm | 25 | from osv import fields,osv,orm |
2613 | 25 | import xmlrpclib | 26 | import xmlrpclib |
2614 | 26 | from tools.translate import _ | 27 | from tools.translate import _ |
2615 | @@ -203,8 +204,10 @@ | |||
2616 | 203 | websites_objs = esale_web_obj.browse(cr, uid, websites.keys()) | 204 | websites_objs = esale_web_obj.browse(cr, uid, websites.keys()) |
2617 | 204 | #print websites_objs | 205 | #print websites_objs |
2618 | 205 | for website in websites_objs: | 206 | for website in websites_objs: |
2619 | 207 | if not website.override_products_data: | ||
2620 | 208 | continue | ||
2621 | 206 | # print "%s/openerp-synchro.php" % website.url | 209 | # print "%s/openerp-synchro.php" % website.url |
2623 | 207 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 210 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
2624 | 208 | website_url = website.url.split("/") | 211 | website_url = website.url.split("/") |
2625 | 209 | 212 | ||
2626 | 210 | # Pricelist of the web shop | 213 | # Pricelist of the web shop |
2627 | @@ -351,7 +354,7 @@ | |||
2628 | 351 | esale_prod_ids = esale_product_obj.search(cr, uid, [('esale_oscom_id','=',oscom_id)]) | 354 | esale_prod_ids = esale_product_obj.search(cr, uid, [('esale_oscom_id','=',oscom_id)]) |
2629 | 352 | esale_prod = esale_product_obj.browse(cr, uid, esale_prod_ids[0]) | 355 | esale_prod = esale_product_obj.browse(cr, uid, esale_prod_ids[0]) |
2630 | 353 | #print "ESALE PROD DATA (id, web, product, category):",esale_prod.id, esale_prod.web_id.id, esale_prod.product_id.id, esale_prod.product_id.categ_id.id | 356 | #print "ESALE PROD DATA (id, web, product, category):",esale_prod.id, esale_prod.web_id.id, esale_prod.product_id.id, esale_prod.product_id.categ_id.id |
2632 | 354 | prod_url = website_url[0] + "//" + website_url[2] + "/" +"product_info.php?cPath=" + str(category_id) + "&products_id=" + str(oscom_id) | 357 | prod_url = website.get_products_oscom_url(cr, uid, website, str(oscom_id),str(category_id)), |
2633 | 355 | super(esale_oscom_product_inherit, self).write(cr, uid, esale_prod.product_id.id, {'oscom_url': prod_url}) | 358 | super(esale_oscom_product_inherit, self).write(cr, uid, esale_prod.product_id.id, {'oscom_url': prod_url}) |
2634 | 356 | 359 | ||
2635 | 357 | # Remove delete products | 360 | # Remove delete products |
2636 | @@ -382,7 +385,7 @@ | |||
2637 | 382 | else: | 385 | else: |
2638 | 383 | websites_objs.append(website) | 386 | websites_objs.append(website) |
2639 | 384 | for website in websites_objs: | 387 | for website in websites_objs: |
2641 | 385 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php" % website.url) | 388 | server = xmlrpclib.ServerProxy("%s/openerp-synchro.php?admin_user=%s&admin_pass=%s" % (website.url,website.admin_user,website.admin_pass)) |
2642 | 386 | if not product_ids: | 389 | if not product_ids: |
2643 | 387 | esale_products = website.product_ids | 390 | esale_products = website.product_ids |
2644 | 388 | else: | 391 | else: |
2645 | @@ -394,7 +397,10 @@ | |||
2646 | 394 | 'quantity': product_obj._product_available(cr, uid, [esale_product.product_id.id], ['virtual_available'], False, {'shop':website.shop_id.id})[esale_product.product_id.id]['virtual_available'] | 397 | 'quantity': product_obj._product_available(cr, uid, [esale_product.product_id.id], ['virtual_available'], False, {'shop':website.shop_id.id})[esale_product.product_id.id]['virtual_available'] |
2647 | 395 | } | 398 | } |
2648 | 396 | oscom_id = server.set_product_stock(webproduct) | 399 | oscom_id = server.set_product_stock(webproduct) |
2650 | 397 | 400 | if(int(webproduct['quantity'])>0): | |
2651 | 401 | product_obj.write(cr, uid, [esale_product.product_id.id], {'in_out_stock':'1'}) | ||
2652 | 402 | else: | ||
2653 | 403 | product_obj.write(cr, uid, [esale_product.product_id.id], {'in_out_stock':'0'}) | ||
2654 | 398 | return {} | 404 | return {} |
2655 | 399 | 405 | ||
2656 | 400 | ## def on_change_gross_price(self, cr, uid, ids, list_price): | 406 | ## def on_change_gross_price(self, cr, uid, ids, list_price): |
2657 | 401 | 407 | ||
2658 | === modified file 'esale_osc/esale_oscom_view.xml' | |||
2659 | --- esale_osc/esale_oscom_view.xml 2010-02-20 13:12:01 +0000 | |||
2660 | +++ esale_osc/esale_oscom_view.xml 2010-07-21 10:31:39 +0000 | |||
2661 | @@ -1,385 +1,388 @@ | |||
2662 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2663 | 2 | <openerp> | 2 | <openerp> |
2664 | 3 | <data> | 3 | <data> |
2889 | 4 | <menuitem name="Sales Management/Internet Sales" id="menu_esale_oscom_root"/> | 4 | <menuitem name="Sales Management/Internet Sales" id="menu_esale_oscom_root"/> |
2890 | 5 | 5 | ||
2891 | 6 | <record model="ir.ui.view" id="view_esale_oscom_form"> | 6 | <record model="ir.ui.view" id="view_esale_oscom_form"> |
2892 | 7 | <field name="name">esale.oscom.web.form</field> | 7 | <field name="name">esale.oscom.web.form</field> |
2893 | 8 | <field name="model">esale.oscom.web</field> | 8 | <field name="model">esale.oscom.web</field> |
2894 | 9 | <field name="type">form</field> | 9 | <field name="type">form</field> |
2895 | 10 | <field name="arch" type="xml"> | 10 | <field name="arch" type="xml"> |
2896 | 11 | <form string="OScommerce Web Shop"> | 11 | <form string="OScommerce Web Shop"> |
2897 | 12 | <notebook> | 12 | <notebook> |
2898 | 13 | <page string="General Informations"> | 13 | <page string="General Informations"> |
2899 | 14 | <separator string="esale_oscom Shop Info" colspan="4"/> | 14 | <separator string="esale_oscom Shop Info" colspan="4"/> |
2900 | 15 | <field name="name" select="1" colspan="4"/> | 15 | <field name="name" select="1"/> |
2901 | 16 | <field name="url" widget="url" required="1"/> | 16 | <field name="admin_user" required="1"/> |
2902 | 17 | <field name="active" select="1"/> | 17 | <field name="url" widget="url" required="1"/> |
2903 | 18 | <field name="shop_id" select="1" required="1"/> | 18 | <field name="admin_pass" required="1" password="True"/> |
2904 | 19 | <!--<field name="partner_anonymous_id" required="1"/>--> | 19 | <newline/> |
2905 | 20 | <field name="price_type"/> | 20 | <field name="active" select="1"/> |
2906 | 21 | <field name="esale_account_id"/> | 21 | <field name="shop_id" select="1" required="1"/> |
2907 | 22 | <newline/> | 22 | <field name="default_partner_category" required="False"/> |
2908 | 23 | <label string="Proceed with the mappings before adding products!" colspan="2"/> | 23 | <field name="price_type"/> |
2909 | 24 | <field name="date_download_from"/> | 24 | <field name="esale_account_id"/> |
2910 | 25 | <field name="download_number"/> | 25 | <newline/> |
2911 | 26 | <button name="product_import_create" string="Import all products from OSCommerce" colspan="2" type="object"/> | 26 | <label string="Proceed with the mappings before adding products!" colspan="2"/> |
2912 | 27 | <separator string="Active Products" colspan="4"/> | 27 | <field name="date_download_from" required="1"/> |
2913 | 28 | <field name="product_ids" colspan="4" widget="one2many_list" nolabel="1" readonly="1"/> | 28 | <field name="download_number"/> |
2914 | 29 | </page> | 29 | <field name="override_products_data"/> |
2915 | 30 | <page string="Taxes Mapping"> | 30 | <button name="product_import_create" string="Import all products from OSCommerce" colspan="2" type="object"/> |
2916 | 31 | <button type="object" string="Import Taxes" name="tax_import"/> | 31 | <separator string="Active Products" colspan="4"/> |
2917 | 32 | <field colspan="4" name="tax_ids" widget="one2many_list" nolabel="1"/> | 32 | <field name="product_ids" colspan="4" widget="one2many_list" nolabel="1" readonly="1"/> |
2918 | 33 | </page> | 33 | </page> |
2919 | 34 | <page string="Languages Mapping"> | 34 | <page string="Taxes Mapping"> |
2920 | 35 | <button type="object" string="Import Languages" name="lang_import"/> | 35 | <button type="object" string="Import Taxes" name="tax_import"/> |
2921 | 36 | <field colspan="4" name="language_ids" widget="one2many_list" nolabel="1"/> | 36 | <field colspan="4" name="tax_ids" widget="one2many_list" nolabel="1"/> |
2922 | 37 | </page> | 37 | </page> |
2923 | 38 | <page string="Categories Mapping"> | 38 | <page string="Languages Mapping"> |
2924 | 39 | <button type="object" string="Import Categories" name="category_import"/> | 39 | <button type="object" string="Import Languages" name="lang_import"/> |
2925 | 40 | <button type="object" string="Import and create/update Categories" name="category_import_create"/> | 40 | <field colspan="4" name="language_ids" widget="one2many_list" nolabel="1"/> |
2926 | 41 | <field colspan="4" name="category_ids" widget="one2many_list" nolabel="1"/> | 41 | </page> |
2927 | 42 | </page> | 42 | <page string="Categories Mapping"> |
2928 | 43 | <page string="Payment types Mapping"> | 43 | <button type="object" string="Import Categories" name="category_import"/> |
2929 | 44 | <button type="object" string="Import Payment Methods" name="get_payment_methods"/> | 44 | <button type="object" string="Import and create/update Categories" name="category_import_create"/> |
2930 | 45 | <field colspan="4" name="pay_typ_ids" widget="one2many_list" nolabel="1"/> | 45 | <field colspan="4" name="category_ids" widget="one2many_list" nolabel="1"/> |
2931 | 46 | </page> | 46 | </page> |
2932 | 47 | <page string="Oscommerce Status Mapping"> | 47 | <page string="Payment types Mapping"> |
2933 | 48 | <button type="object" string="Import Oscommerce Status" name="status_import" colspan="4"/> | 48 | <button type="object" string="Import Payment Methods" name="get_payment_methods"/> |
2934 | 49 | <separator string="Status" colspan="4"/> | 49 | <field colspan="4" name="pay_typ_ids" widget="one2many_list" nolabel="1"/> |
2935 | 50 | <field name="intermediate"/> | 50 | </page> |
2936 | 51 | <field colspan="4" name="status_ids" widget="one2many_list" nolabel="1"/> | 51 | <page string="Oscommerce Status Mapping"> |
2937 | 52 | </page> | 52 | <button type="object" string="Import Oscommerce Status" name="status_import" colspan="4"/> |
2938 | 53 | </notebook> | 53 | <separator string="Status" colspan="4"/> |
2939 | 54 | </form> | 54 | <field name="intermediate"/> |
2940 | 55 | </field> | 55 | <field colspan="4" name="status_ids" widget="one2many_list" nolabel="1"/> |
2941 | 56 | </record> | 56 | </page> |
2942 | 57 | <record model="ir.ui.view" id="view_esale_oscom_tree"> | 57 | </notebook> |
2943 | 58 | <field name="name">esale.oscom.web.form</field> | 58 | </form> |
2944 | 59 | <field name="model">esale.oscom.web</field> | 59 | </field> |
2945 | 60 | <field name="type">tree</field> | 60 | </record> |
2946 | 61 | <field name="arch" type="xml"> | 61 | <record model="ir.ui.view" id="view_esale_oscom_tree"> |
2947 | 62 | <tree string="OScommerce Web Shop"> | 62 | <field name="name">esale.oscom.web.form</field> |
2948 | 63 | <field name="name"/> | 63 | <field name="model">esale.oscom.web</field> |
2949 | 64 | <field name="url"/> | 64 | <field name="type">tree</field> |
2950 | 65 | <field name="active"/> | 65 | <field name="arch" type="xml"> |
2951 | 66 | <field name="shop_id"/> | 66 | <tree string="OScommerce Web Shop"> |
2952 | 67 | <field name="price_type"/> | 67 | <field name="name"/> |
2953 | 68 | <field name="esale_account_id"/> | 68 | <field name="url"/> |
2954 | 69 | </tree> | 69 | <field name="active"/> |
2955 | 70 | </field> | 70 | <field name="shop_id"/> |
2956 | 71 | </record> | 71 | <field name="price_type"/> |
2957 | 72 | <record model="ir.actions.act_window" id="action_esale_oscom_form"> | 72 | <field name="esale_account_id"/> |
2958 | 73 | <field name="type">ir.actions.act_window</field> | 73 | </tree> |
2959 | 74 | <field name="res_model">esale.oscom.web</field> | 74 | </field> |
2960 | 75 | <field name="view_type">form</field> | 75 | </record> |
2961 | 76 | <field name="view_id" ref="view_esale_oscom_tree"/> | 76 | <record model="ir.actions.act_window" id="action_esale_oscom_form"> |
2962 | 77 | </record> | 77 | <field name="type">ir.actions.act_window</field> |
2963 | 78 | 78 | <field name="res_model">esale.oscom.web</field> | |
2964 | 79 | <menuitem name="Sales Management/Internet Sales/Websites" id="menu_action_esale_oscom_web" action="action_esale_oscom_form" groups="group_esale_oscom_user"/> | 79 | <field name="view_type">form</field> |
2965 | 80 | 80 | <field name="view_id" ref="view_esale_oscom_tree"/> | |
2966 | 81 | <record model="ir.ui.view" id="esale_oscom_language_web_form"> | 81 | </record> |
2967 | 82 | <field name="name">esale.oscom.language.web.form</field> | 82 | |
2968 | 83 | <field name="model">esale.oscom.lang</field> | 83 | <menuitem name="Sales Management/Internet Sales/Websites" id="menu_action_esale_oscom_web" action="action_esale_oscom_form" groups="group_esale_oscom_user"/> |
2969 | 84 | <field name="type">form</field> | 84 | |
2970 | 85 | <field name="arch" type="xml"> | 85 | <record model="ir.ui.view" id="esale_oscom_language_web_form"> |
2971 | 86 | <form string="Language"> | 86 | <field name="name">esale.oscom.language.web.form</field> |
2972 | 87 | <separator colspan="4" string="Language mapping"/> | 87 | <field name="model">esale.oscom.lang</field> |
2973 | 88 | <field colspan="4" name="name" select="1" required="1"/> | 88 | <field name="type">form</field> |
2974 | 89 | <field name="language_id" select="1"/> | 89 | <field name="arch" type="xml"> |
2975 | 90 | <field name="esale_oscom_id" readonly="1" select="1"/> | 90 | <form string="Language"> |
2976 | 91 | </form> | 91 | <separator colspan="4" string="Language mapping"/> |
2977 | 92 | </field> | 92 | <field colspan="4" name="name" select="1" required="1"/> |
2978 | 93 | </record> | 93 | <field name="language_id" select="1"/> |
2979 | 94 | <record model="ir.ui.view" id="esale_oscom_language_web_tree"> | 94 | <field name="esale_oscom_id" readonly="1" select="1"/> |
2980 | 95 | <field name="name">esale.oscom.language.web.tree</field> | 95 | </form> |
2981 | 96 | <field name="model">esale.oscom.lang</field> | 96 | </field> |
2982 | 97 | <field name="type">tree</field> | 97 | </record> |
2983 | 98 | <field name="arch" type="xml"> | 98 | <record model="ir.ui.view" id="esale_oscom_language_web_tree"> |
2984 | 99 | <tree string="Language"> | 99 | <field name="name">esale.oscom.language.web.tree</field> |
2985 | 100 | <field name="name" /> | 100 | <field name="model">esale.oscom.lang</field> |
2986 | 101 | <field name="language_id" /> | 101 | <field name="type">tree</field> |
2987 | 102 | </tree> | 102 | <field name="arch" type="xml"> |
2988 | 103 | </field> | 103 | <tree string="Language"> |
2989 | 104 | </record> | 104 | <field name="name" /> |
2990 | 105 | <record model="ir.ui.view" id="esale_oscom_tax_web_form"> | 105 | <field name="language_id" /> |
2991 | 106 | <field name="name">esale.oscom.tax.web.form</field> | 106 | </tree> |
2992 | 107 | <field name="model">esale.oscom.tax</field> | 107 | </field> |
2993 | 108 | <field name="type">form</field> | 108 | </record> |
2994 | 109 | <field name="arch" type="xml"> | 109 | <record model="ir.ui.view" id="esale_oscom_tax_web_form"> |
2995 | 110 | <form string="Taxes"> | 110 | <field name="name">esale.oscom.tax.web.form</field> |
2996 | 111 | <separator colspan="4" string="Taxes mapping"/> | 111 | <field name="model">esale.oscom.tax</field> |
2997 | 112 | <field colspan="4" name="name" select="1" required="1"/> | 112 | <field name="type">form</field> |
2998 | 113 | <field name="tax_id" select="1"/> | 113 | <field name="arch" type="xml"> |
2999 | 114 | <field name="esale_oscom_id" readonly="1" select="1"/> | 114 | <form string="Taxes"> |
3000 | 115 | </form> | 115 | <separator colspan="4" string="Taxes mapping"/> |
3001 | 116 | </field> | 116 | <field colspan="4" name="name" select="1" required="1"/> |
3002 | 117 | </record> | 117 | <field name="tax_id" select="1"/> |
3003 | 118 | <record model="ir.ui.view" id="esale_oscom_tax_web_tree"> | 118 | <field name="esale_oscom_id" readonly="1" select="1"/> |
3004 | 119 | <field name="name">esale.oscom.tax.web.tree</field> | 119 | </form> |
3005 | 120 | <field name="model">esale.oscom.tax</field> | 120 | </field> |
3006 | 121 | <field name="type">tree</field> | 121 | </record> |
3007 | 122 | <field name="arch" type="xml"> | 122 | <record model="ir.ui.view" id="esale_oscom_tax_web_tree"> |
3008 | 123 | <tree string="Taxes"> | 123 | <field name="name">esale.oscom.tax.web.tree</field> |
3009 | 124 | <field name="name" /> | 124 | <field name="model">esale.oscom.tax</field> |
3010 | 125 | <field name="tax_id" /> | 125 | <field name="type">tree</field> |
3011 | 126 | </tree> | 126 | <field name="arch" type="xml"> |
3012 | 127 | </field> | 127 | <tree string="Taxes"> |
3013 | 128 | </record> | 128 | <field name="name" /> |
3014 | 129 | 129 | <field name="tax_id" /> | |
3015 | 130 | <!-- ####################################################################################### --> | 130 | </tree> |
3016 | 131 | <record model="ir.ui.view" id="esale_oscom_pay_typ_form"> | 131 | </field> |
3017 | 132 | <field name="name">esale.oscom.pay.typ.form</field> | 132 | </record> |
3018 | 133 | <field name="model">esale.oscom.paytype</field> | 133 | |
3019 | 134 | <field name="type">form</field> | 134 | <!-- ####################################################################################### --> |
3020 | 135 | <field name="arch" type="xml"> | 135 | <record model="ir.ui.view" id="esale_oscom_pay_typ_form"> |
3021 | 136 | <form string="Payment types"> | 136 | <field name="name">esale.oscom.pay.typ.form</field> |
3022 | 137 | <separator colspan="4" string="Payment types mapping"/> | 137 | <field name="model">esale.oscom.paytype</field> |
3023 | 138 | <field colspan="4" name="name" select="1" required="1"/> | 138 | <field name="type">form</field> |
3024 | 139 | <field name="payment_id" select="1"/> | 139 | <field name="arch" type="xml"> |
3025 | 140 | <field name="esale_oscom_id" readonly="1" select="1"/> | 140 | <form string="Payment types"> |
3026 | 141 | <field name="paytyp" select="1"/> | 141 | <separator colspan="4" string="Payment types mapping"/> |
3027 | 142 | <field name="journal_id" select="2" attrs="{'required':[('paytyp','=','type5')]}"/> | 142 | <field colspan="4" name="name" select="1" required="1"/> |
3028 | 143 | </form> | 143 | <field name="payment_id" select="1"/> |
3029 | 144 | </field> | 144 | <field name="esale_oscom_id" readonly="1" select="1"/> |
3030 | 145 | </record> | 145 | <field name="paytyp" select="1"/> |
3031 | 146 | <record model="ir.ui.view" id="esale_oscom_pay_typ_tree"> | 146 | <field name="journal_id" select="2" attrs="{'required':[('paytyp','=','type5')]}"/> |
3032 | 147 | <field name="name">esale.oscom.pay.typ.tree</field> | 147 | </form> |
3033 | 148 | <field name="model">esale.oscom.paytype</field> | 148 | </field> |
3034 | 149 | <field name="type">tree</field> | 149 | </record> |
3035 | 150 | <field name="arch" type="xml"> | 150 | <record model="ir.ui.view" id="esale_oscom_pay_typ_tree"> |
3036 | 151 | <tree string="Payment types"> | 151 | <field name="name">esale.oscom.pay.typ.tree</field> |
3037 | 152 | <field name="name" /> | 152 | <field name="model">esale.oscom.paytype</field> |
3038 | 153 | <field name="payment_id" /> | 153 | <field name="type">tree</field> |
3039 | 154 | <field name="paytyp" /> | 154 | <field name="arch" type="xml"> |
3040 | 155 | <field name="journal_id" /> | 155 | <tree string="Payment types"> |
3041 | 156 | </tree> | 156 | <field name="name" /> |
3042 | 157 | </field> | 157 | <field name="payment_id" /> |
3043 | 158 | </record> | 158 | <field name="paytyp" /> |
3044 | 159 | <!-- ####################################################################################### --> | 159 | <field name="journal_id" /> |
3045 | 160 | <record model="ir.ui.view" id="esale_oscom_status_form"> | 160 | </tree> |
3046 | 161 | <field name="name">esale.oscom.status.form</field> | 161 | </field> |
3047 | 162 | <field name="model">esale.oscom.status</field> | 162 | </record> |
3048 | 163 | <field name="type">form</field> | 163 | <!-- ####################################################################################### --> |
3049 | 164 | <field name="arch" type="xml"> | 164 | <record model="ir.ui.view" id="esale_oscom_status_form"> |
3050 | 165 | <form string="Osc status"> | 165 | <field name="name">esale.oscom.status.form</field> |
3051 | 166 | <separator colspan="4" string="Oscommerce Status mapping"/> | 166 | <field name="model">esale.oscom.status</field> |
3052 | 167 | <field colspan="4" name="name" select="1" required="1"/> | 167 | <field name="type">form</field> |
3053 | 168 | <field name="language_id" select="1"/> | 168 | <field name="arch" type="xml"> |
3054 | 169 | <field name="esale_oscom_id" readonly="1" select="1"/> | 169 | <form string="Osc status"> |
3055 | 170 | <field name="download" select="1"/> | 170 | <separator colspan="4" string="Oscommerce Status mapping"/> |
3056 | 171 | </form> | 171 | <field colspan="4" name="name" select="1" required="1"/> |
3057 | 172 | </field> | 172 | <field name="language_id" select="1"/> |
3058 | 173 | </record> | 173 | <field name="esale_oscom_id" readonly="1" select="1"/> |
3059 | 174 | <record model="ir.ui.view" id="esale_oscom_status_tree"> | 174 | <field name="download" select="1"/> |
3060 | 175 | <field name="name">esale.oscom.status.tree</field> | 175 | </form> |
3061 | 176 | <field name="model">esale.oscom.status</field> | 176 | </field> |
3062 | 177 | <field name="type">tree</field> | 177 | </record> |
3063 | 178 | <field name="arch" type="xml"> | 178 | <record model="ir.ui.view" id="esale_oscom_status_tree"> |
3064 | 179 | <tree string="Payment types"> | 179 | <field name="name">esale.oscom.status.tree</field> |
3065 | 180 | <field name="name" /> | 180 | <field name="model">esale.oscom.status</field> |
3066 | 181 | <field name="language_id" /> | 181 | <field name="type">tree</field> |
3067 | 182 | <field name="esale_oscom_id" /> | 182 | <field name="arch" type="xml"> |
3068 | 183 | <field name="download" /> | 183 | <tree string="Payment types"> |
3069 | 184 | </tree> | 184 | <field name="name" /> |
3070 | 185 | </field> | 185 | <field name="language_id" /> |
3071 | 186 | </record> | 186 | <field name="esale_oscom_id" /> |
3072 | 187 | 187 | <field name="download" /> | |
3073 | 188 | 188 | </tree> | |
3074 | 189 | <!-- ####################################################################################### --> | 189 | </field> |
3075 | 190 | <record model="ir.ui.view" id="esale_oscom_category_web_form"> | 190 | </record> |
3076 | 191 | <field name="name">esale.oscom.category.web.form</field> | 191 | |
3077 | 192 | <field name="model">esale.oscom.category</field> | 192 | |
3078 | 193 | <field name="type">form</field> | 193 | <!-- ####################################################################################### --> |
3079 | 194 | <field name="arch" type="xml"> | 194 | <record model="ir.ui.view" id="esale_oscom_category_web_form"> |
3080 | 195 | <form string="Categories"> | 195 | <field name="name">esale.oscom.category.web.form</field> |
3081 | 196 | <separator colspan="4" string="taxes"/> | 196 | <field name="model">esale.oscom.category</field> |
3082 | 197 | <field name="name" select="1" colspan="4" required="1"/> | 197 | <field name="type">form</field> |
3083 | 198 | <field name="category_id" select="1"/> | 198 | <field name="arch" type="xml"> |
3084 | 199 | <field name="esale_oscom_id" select="1" readonly="1"/> | 199 | <form string="Categories"> |
3085 | 200 | </form> | 200 | <separator colspan="4" string="taxes"/> |
3086 | 201 | </field> | 201 | <field name="name" select="1" colspan="4" required="1"/> |
3087 | 202 | </record> | 202 | <field name="category_id" select="1"/> |
3088 | 203 | <record model="ir.ui.view" id="esale_oscom_category_web_tree"> | 203 | <field name="esale_oscom_id" select="1" readonly="1"/> |
3089 | 204 | <field name="name">esale.oscom.category.web.v</field> | 204 | </form> |
3090 | 205 | <field name="model">esale.oscom.category</field> | 205 | </field> |
3091 | 206 | <field name="type">tree</field> | 206 | </record> |
3092 | 207 | <field name="arch" type="xml"> | 207 | <record model="ir.ui.view" id="esale_oscom_category_web_tree"> |
3093 | 208 | <tree string="Categories"> | 208 | <field name="name">esale.oscom.category.web.v</field> |
3094 | 209 | <field name="name" /> | 209 | <field name="model">esale.oscom.category</field> |
3095 | 210 | <field name="category_id" /> | 210 | <field name="type">tree</field> |
3096 | 211 | </tree> | 211 | <field name="arch" type="xml"> |
3097 | 212 | </field> | 212 | <tree string="Categories"> |
3098 | 213 | </record> | 213 | <field name="name" /> |
3099 | 214 | 214 | <field name="category_id" /> | |
3100 | 215 | <record model="ir.ui.view" id="esale_oscom_product_web_form"> | 215 | </tree> |
3101 | 216 | <field name="name">esale.oscom.product.web.form</field> | 216 | </field> |
3102 | 217 | <field name="model">esale.oscom.product</field> | 217 | </record> |
3103 | 218 | <field name="type">form</field> | 218 | |
3104 | 219 | <field name="arch" type="xml"> | 219 | <record model="ir.ui.view" id="esale_oscom_product_web_form"> |
3105 | 220 | <form string="Product"> | 220 | <field name="name">esale.oscom.product.web.form</field> |
3106 | 221 | <separator colspan="4" string="Product Information"/> | 221 | <field name="model">esale.oscom.product</field> |
3107 | 222 | <field name="name" colspan="4" select="1" required="1"/> | 222 | <field name="type">form</field> |
3108 | 223 | <field name="product_id" on_change="onchange_product_id(product_id, web_id)" select="1" required="1"/> | 223 | <field name="arch" type="xml"> |
3109 | 224 | <field name="esale_oscom_id" readonly="1" select="1"/> | 224 | <form string="Product"> |
3110 | 225 | </form> | 225 | <separator colspan="4" string="Product Information"/> |
3111 | 226 | </field> | 226 | <field name="name" colspan="4" select="1" required="1"/> |
3112 | 227 | </record> | 227 | <field name="product_id" on_change="onchange_product_id(product_id, web_id)" select="1" required="1"/> |
3113 | 228 | <field name="esale_oscom_id" readonly="1" select="1"/> | ||
3114 | 229 | </form> | ||
3115 | 230 | </field> | ||
3116 | 231 | </record> | ||
3117 | 228 | 232 | ||
3118 | 229 | 233 | ||
3119 | 230 | <!-- Web sale orders --> | 234 | <!-- Web sale orders --> |
3126 | 231 | <record model="ir.ui.view" id="esale_oscom_saleorder_tree"> | 235 | <record model="ir.ui.view" id="esale_oscom_saleorder_tree"> |
3127 | 232 | <field name="name">esale.oscom.saleorder.tree</field> | 236 | <field name="name">esale.oscom.saleorder.tree</field> |
3128 | 233 | <field name="model">sale.order</field> | 237 | <field name="model">sale.order</field> |
3129 | 234 | <field name="type">tree</field> | 238 | <field name="type">tree</field> |
3130 | 235 | <field name="arch" type="xml"> | 239 | <field name="arch" type="xml"> |
3131 | 236 | <tree string="Sales Orders"> | 240 | <tree string="Sales Orders"> |
3132 | 237 | <field name="date_order"/> | 241 | <field name="date_order"/> |
3133 | 238 | <field name="name" string="Reference"/> | 242 | <field name="name" string="Reference"/> |
3235 | 239 | <field name="state"/> | 243 | <field name="state"/> |
3236 | 240 | <field name="partner_id"/> | 244 | <field name="partner_id"/> |
3237 | 241 | <field name="partner_shipping_id"/> | 245 | <field name="partner_shipping_id"/> |
3238 | 242 | <field name="esale_oscom_web"/> | 246 | <field name="esale_oscom_web"/> |
3239 | 243 | <field name="esale_oscom_id"/> | 247 | <field name="esale_oscom_id"/> |
3240 | 244 | <field name="shipped"/> | 248 | <field name="shipped"/> |
3241 | 245 | <field name="invoiced"/> | 249 | <field name="invoiced"/> |
3242 | 246 | <field name="orders_status"/> | 250 | <field name="orders_status"/> |
3243 | 247 | <field name="amount_untaxed"/> | 251 | <field name="amount_untaxed"/> |
3244 | 248 | <field name="shipping_title"/> | 252 | <field name="shipping_title"/> |
3245 | 249 | <field name="pay_met_title"/> | 253 | <field name="pay_met_title"/> |
3246 | 250 | </tree> | 254 | </tree> |
3247 | 251 | </field> | 255 | </field> |
3248 | 252 | </record> | 256 | </record> |
3249 | 253 | <record model="ir.ui.view" id="esale_oscom_saleorder_form"> | 257 | <record model="ir.ui.view" id="esale_oscom_saleorder_form"> |
3250 | 254 | <field name="name">esale.oscom.saleorder.form</field> | 258 | <field name="name">esale.oscom.saleorder.form</field> |
3251 | 255 | <field name="model">sale.order</field> | 259 | <field name="model">sale.order</field> |
3252 | 256 | <field name="type">form</field> | 260 | <field name="type">form</field> |
3253 | 257 | <field name="inherit_id" ref="sale.view_order_form" /> | 261 | <field name="inherit_id" ref="sale.view_order_form" /> |
3254 | 258 | <field name="arch" type="xml"> | 262 | <field name="arch" type="xml"> |
3255 | 259 | <notebook> | 263 | <notebook> |
3256 | 260 | <page string="Os Commerce Information" position="inside"> | 264 | <page string="Os Commerce Information" position="inside"> |
3257 | 261 | <separator string="OsCommerce" colspan="4"/> | 265 | <separator string="OsCommerce" colspan="4"/> |
3258 | 262 | <group col="2" colspan="2"> | 266 | <group col="2" colspan="2"> |
3259 | 263 | <field name="esale_oscom_id" readonly="1" select="1"/> | 267 | <field name="esale_oscom_id" readonly="1" select="1"/> |
3260 | 264 | <field name="esale_oscom_web" on_change="onchange_esale_oscom_web(esale_oscom_web)" select="1"/> | 268 | <field name="esale_oscom_web" on_change="onchange_esale_oscom_web(esale_oscom_web)" select="1"/> |
3261 | 265 | </group> | 269 | </group> |
3262 | 266 | <group col="2" colspan="2"> | 270 | <group col="2" colspan="2"> |
3263 | 267 | <field name="pay_met_title" readonly="1"/> | 271 | <field name="pay_met_title" readonly="1"/> |
3264 | 268 | <field name="shipping_title" readonly="1"/> | 272 | <field name="shipping_title" readonly="1"/> |
3265 | 269 | </group> | 273 | </group> |
3266 | 270 | <field name="orders_status" readonly="1"/> | 274 | <field name="orders_status" readonly="1"/> |
3267 | 271 | <field name="shipping_agency"/> | 275 | <field name="shipping_agency"/> |
3268 | 272 | <field name="tracking_number"/> | 276 | <field name="tracking_number"/> |
3269 | 273 | <field name="number_of_packages"/> | 277 | <field name="number_of_packages"/> |
3270 | 274 | <field name="volume"/> | 278 | <field name="volume"/> |
3271 | 275 | <separator string="Options selected will be applied on changing osc order status" colspan="4"/> | 279 | <separator string="Options selected will be applied on changing osc order status" colspan="4"/> |
3272 | 276 | <group col="2" colspan="2"> | 280 | <group col="2" colspan="2"> |
3273 | 277 | <field name="update_comment"/> | 281 | <field name="update_comment"/> |
3274 | 278 | <field name="send_web_email"/> | 282 | <field name="send_web_email"/> |
3275 | 279 | </group> | 283 | </group> |
3276 | 280 | <field colspan="4" name="status_comment"/> | 284 | <field colspan="4" name="status_comment"/> |
3277 | 281 | <field name="orders_status_id" on_change="onchange_esale_oscom_status(esale_oscom_web, esale_oscom_id, orders_status_id, status_comment, update_comment, send_web_email,tracking_number )" select="1"/> | 285 | <field name="orders_status_id" on_change="onchange_esale_oscom_status(esale_oscom_web, esale_oscom_id, orders_status_id, status_comment, update_comment, send_web_email,tracking_number )" select="1"/> |
3278 | 282 | <field colspan="4" name="additional_info"/> | 286 | <field colspan="4" name="additional_info"/> |
3279 | 283 | </page> | 287 | </page> |
3280 | 284 | </notebook> | 288 | </notebook> |
3281 | 285 | </field> | 289 | </field> |
3282 | 286 | </record> | 290 | </record> |
3283 | 287 | <record model="ir.actions.act_window" id="action_saleorder_tree"> | 291 | <record model="ir.actions.act_window" id="action_saleorder_tree"> |
3284 | 288 | <field name="type">ir.actions.act_window</field> | 292 | <field name="type">ir.actions.act_window</field> |
3285 | 289 | <field name="res_model">sale.order</field> | 293 | <field name="res_model">sale.order</field> |
3286 | 290 | <field name="view_type">form</field> | 294 | <field name="view_type">form</field> |
3287 | 291 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> | 295 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> |
3288 | 292 | <field name="view_mode">tree,form</field> | 296 | <field name="view_mode">tree,form</field> |
3289 | 293 | <field name="domain">[('esale_oscom_id','!=', 0)]</field> | 297 | <field name="domain">[('esale_oscom_id','!=', 0)]</field> |
3290 | 294 | </record> | 298 | </record> |
3291 | 295 | 299 | ||
3292 | 296 | <menuitem name="Sales Management/Internet Sales/Web sale orders" id="menu_action_esale_oscom_saleorder" action="action_saleorder_tree" groups="group_esale_oscom_user"/> | 300 | <menuitem name="Sales Management/Internet Sales/Web sale orders" id="menu_action_esale_oscom_saleorder" action="action_saleorder_tree" groups="group_esale_oscom_user"/> |
3293 | 297 | 301 | ||
3294 | 298 | <record model="ir.actions.act_window" id="action_saleorder_form"> | 302 | <record model="ir.actions.act_window" id="action_saleorder_form"> |
3295 | 299 | <field name="type">ir.actions.act_window</field> | 303 | <field name="type">ir.actions.act_window</field> |
3296 | 300 | <field name="res_model">sale.order</field> | 304 | <field name="res_model">sale.order</field> |
3297 | 301 | <field name="view_type">form</field> | 305 | <field name="view_type">form</field> |
3298 | 302 | <field name="view_id" ref="esale_oscom_saleorder_form"/> | 306 | <field name="view_id" ref="esale_oscom_saleorder_form"/> |
3299 | 303 | <field name="domain">[('esale_oscom_id','!=', 0)]</field> | 307 | <field name="domain">[('esale_oscom_id','!=', 0)]</field> |
3300 | 304 | </record> | 308 | </record> |
3301 | 305 | 309 | ||
3302 | 306 | <menuitem name="Sales Management/Internet Sales/Web sale orders/New order" id="menu_action_esale_oscom_saleorder_new" action="action_saleorder_form"/> | 310 | <menuitem name="Sales Management/Internet Sales/Web sale orders/New order" id="menu_action_esale_oscom_saleorder_new" action="action_saleorder_form"/> |
3303 | 307 | 311 | ||
3304 | 308 | <record model="ir.actions.act_window" id="action_saleorder_tree_draft"> | 312 | <record model="ir.actions.act_window" id="action_saleorder_tree_draft"> |
3305 | 309 | <field name="type">ir.actions.act_window</field> | 313 | <field name="type">ir.actions.act_window</field> |
3306 | 310 | <field name="res_model">sale.order</field> | 314 | <field name="res_model">sale.order</field> |
3307 | 311 | <field name="view_type">form</field> | 315 | <field name="view_type">form</field> |
3308 | 312 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> | 316 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> |
3309 | 313 | <field name="view_mode">tree,form</field> | 317 | <field name="view_mode">tree,form</field> |
3310 | 314 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','draft'),('user_id','=',uid)]</field> | 318 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','draft'),('user_id','=',uid)]</field> |
3311 | 315 | </record> | 319 | </record> |
3312 | 316 | 320 | ||
3313 | 317 | <menuitem name="Sales Management/Internet Sales/Web sale orders/Request for quotation" id="menu_action_saleorder_tree_draft" action="action_saleorder_tree_draft"/> | 321 | <menuitem name="Sales Management/Internet Sales/Web sale orders/Request for quotation" id="menu_action_saleorder_tree_draft" action="action_saleorder_tree_draft"/> |
3314 | 318 | 322 | ||
3315 | 319 | <record model="ir.actions.act_window" id="action_saleorder_tree_manual"> | 323 | <record model="ir.actions.act_window" id="action_saleorder_tree_manual"> |
3316 | 320 | <field name="type">ir.actions.act_window</field> | 324 | <field name="type">ir.actions.act_window</field> |
3317 | 321 | <field name="res_model">sale.order</field> | 325 | <field name="res_model">sale.order</field> |
3318 | 322 | <field name="view_type">form</field> | 326 | <field name="view_type">form</field> |
3319 | 323 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> | 327 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> |
3320 | 324 | <field name="view_mode">tree,form</field> | 328 | <field name="view_mode">tree,form</field> |
3321 | 325 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','manual'),('user_id','=',uid)]</field> | 329 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','manual'),('user_id','=',uid)]</field> |
3322 | 326 | </record> | 330 | </record> |
3323 | 327 | 331 | ||
3324 | 328 | <menuitem name="Sales Management/Internet Sales/Web sale orders/Waiting invoice" id="menu_action_saleorder_tree_manual" action="action_saleorder_tree_manual"/> | 332 | <menuitem name="Sales Management/Internet Sales/Web sale orders/Waiting invoice" id="menu_action_saleorder_tree_manual" action="action_saleorder_tree_manual"/> |
3325 | 329 | 333 | ||
3326 | 330 | <record model="ir.actions.act_window" id="action_saleorder_tree_progress"> | 334 | <record model="ir.actions.act_window" id="action_saleorder_tree_progress"> |
3327 | 331 | <field name="type">ir.actions.act_window</field> | 335 | <field name="type">ir.actions.act_window</field> |
3328 | 332 | <field name="res_model">sale.order</field> | 336 | <field name="res_model">sale.order</field> |
3329 | 333 | <field name="view_type">form</field> | 337 | <field name="view_type">form</field> |
3330 | 334 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> | 338 | <field name="view_id" ref="esale_oscom_saleorder_tree"/> |
3331 | 335 | <field name="view_mode">tree,form</field> | 339 | <field name="view_mode">tree,form</field> |
3332 | 336 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','progress'),('user_id','=',uid)]</field> | 340 | <field name="domain">[('esale_oscom_web','!=', ''),('state','=','progress'),('user_id','=',uid)]</field> |
3333 | 337 | </record> | 341 | </record> |
3334 | 338 | 342 | ||
3335 | 339 | <menuitem name="Sales Management/Internet Sales/Web sale orders/In progress" id="menu_action_saleorder_tree_progress" action="action_saleorder_tree_progress"/> | 343 | <menuitem name="Sales Management/Internet Sales/Web sale orders/In progress" id="menu_action_saleorder_tree_progress" action="action_saleorder_tree_progress"/> |
3336 | 340 | 344 | ||
3337 | 341 | 345 | ||
3338 | 342 | <!-- Web sale invoices --> | 346 | <!-- Web sale invoices --> |
3378 | 343 | <record model="ir.actions.act_window" id="action_oscom_invoice_tree"> | 347 | <record model="ir.actions.act_window" id="action_oscom_invoice_tree"> |
3379 | 344 | <field name="type">ir.actions.act_window</field> | 348 | <field name="type">ir.actions.act_window</field> |
3380 | 345 | <field name="res_model">account.invoice</field> | 349 | <field name="res_model">account.invoice</field> |
3381 | 346 | <field name="view_type">form</field> | 350 | <field name="view_type">form</field> |
3382 | 347 | <field name="view_mode">tree,form</field> | 351 | <field name="view_mode">tree,form</field> |
3383 | 348 | <field name="domain">[('esale_oscom_web','!=', False)]</field> | 352 | <field name="domain">[('esale_oscom_web','!=', False)]</field> |
3384 | 349 | </record> | 353 | </record> |
3385 | 350 | 354 | ||
3386 | 351 | <menuitem name="Sales Management/Internet Sales/Invoices" id="menu_action_esale_oscom_invoices" action="action_oscom_invoice_tree" groups="group_esale_oscom_user"/> | 355 | <menuitem name="Sales Management/Internet Sales/Invoices" id="menu_action_esale_oscom_invoices" action="action_oscom_invoice_tree" groups="group_esale_oscom_user"/> |
3387 | 352 | 356 | ||
3388 | 353 | <record model="ir.actions.act_window" id="action_oscom_invoice_draft_tree"> | 357 | <record model="ir.actions.act_window" id="action_oscom_invoice_draft_tree"> |
3389 | 354 | <field name="type">ir.actions.act_window</field> | 358 | <field name="type">ir.actions.act_window</field> |
3390 | 355 | <field name="res_model">account.invoice</field> | 359 | <field name="res_model">account.invoice</field> |
3391 | 356 | <field name="view_type">form</field> | 360 | <field name="view_type">form</field> |
3392 | 357 | <field name="view_mode">tree,form</field> | 361 | <field name="view_mode">tree,form</field> |
3393 | 358 | <field name="domain">[('esale_oscom_web','!=', False),('state','=','draft')]</field> | 362 | <field name="domain">[('esale_oscom_web','!=', False),('state','=','draft')]</field> |
3394 | 359 | </record> | 363 | </record> |
3395 | 360 | 364 | ||
3396 | 361 | <menuitem name="Sales Management/Internet Sales/Invoices/Draft" id="menu_action_oscom_invoice_draft_tree" action="action_oscom_invoice_draft_tree"/> | 365 | <menuitem name="Sales Management/Internet Sales/Invoices/Draft" id="menu_action_oscom_invoice_draft_tree" action="action_oscom_invoice_draft_tree"/> |
3397 | 362 | 366 | ||
3398 | 363 | <record model="ir.actions.act_window" id="action_oscom_invoice_proforma"> | 367 | <record model="ir.actions.act_window" id="action_oscom_invoice_proforma"> |
3399 | 364 | <field name="type">ir.actions.act_window</field> | 368 | <field name="type">ir.actions.act_window</field> |
3400 | 365 | <field name="res_model">account.invoice</field> | 369 | <field name="res_model">account.invoice</field> |
3401 | 366 | <field name="view_type">form</field> | 370 | <field name="view_type">form</field> |
3402 | 367 | <field name="view_mode">tree,form</field> | 371 | <field name="view_mode">tree,form</field> |
3403 | 368 | <field name="domain">[('esale_oscom_web','!=',False),('state','=','proforma')]</field> | 372 | <field name="domain">[('esale_oscom_web','!=',False),('state','=','proforma')]</field> |
3404 | 369 | </record> | 373 | </record> |
3405 | 370 | 374 | ||
3406 | 371 | <menuitem name="Sales Management/Internet Sales/Invoices/PRO-FORMA" id="menu_action_oscom_invoice_proforma_tree" action="action_oscom_invoice_proforma"/> | 375 | <menuitem name="Sales Management/Internet Sales/Invoices/PRO-FORMA" id="menu_action_oscom_invoice_proforma_tree" action="action_oscom_invoice_proforma"/> |
3407 | 372 | 376 | ||
3408 | 373 | <record model="ir.actions.act_window" id="action_oscom_invoice_open"> | 377 | <record model="ir.actions.act_window" id="action_oscom_invoice_open"> |
3409 | 374 | <field name="type">ir.actions.act_window</field> | 378 | <field name="type">ir.actions.act_window</field> |
3410 | 375 | <field name="res_model">account.invoice</field> | 379 | <field name="res_model">account.invoice</field> |
3411 | 376 | <field name="view_type">form</field> | 380 | <field name="view_type">form</field> |
3412 | 377 | <field name="view_mode">tree,form</field> | 381 | <field name="view_mode">tree,form</field> |
3413 | 378 | <field name="domain">[('esale_oscom_web','!=', False),('state','=','open')]</field> | 382 | <field name="domain">[('esale_oscom_web','!=', False),('state','=','open')]</field> |
3414 | 379 | </record> | 383 | </record> |
3415 | 380 | 384 | ||
3416 | 381 | <menuitem name="Sales Management/Internet Sales/Invoices/Opened" id="menu_action_oscom_invoice_open_tree" action="action_oscom_invoice_open"/> | 385 | <menuitem name="Sales Management/Internet Sales/Invoices/Opened" id="menu_action_oscom_invoice_open_tree" action="action_oscom_invoice_open"/> |
3417 | 382 | 386 | ||
3418 | 383 | </data> | 387 | </data> |
3421 | 384 | </openerp> | 388 | </openerp> |
3420 | 385 | |||
3422 | 386 | \ No newline at end of file | 389 | \ No newline at end of file |
3423 | 387 | 390 | ||
3424 | === removed file 'esale_osc/esale_oscom_workflow.xml' | |||
3425 | --- esale_osc/esale_oscom_workflow.xml 2009-03-23 14:47:31 +0000 | |||
3426 | +++ esale_osc/esale_oscom_workflow.xml 1970-01-01 00:00:00 +0000 | |||
3427 | @@ -1,230 +0,0 @@ | |||
3428 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
3429 | 2 | <openerp> | ||
3430 | 3 | <data> | ||
3431 | 4 | <record model="workflow" id="wkf_oscom_sale"> | ||
3432 | 5 | <field name="name">esale_oscom.saleorder.basic</field> | ||
3433 | 6 | <field name="osv">esale_oscom.saleorder</field> | ||
3434 | 7 | <field name="on_create">True</field> | ||
3435 | 8 | </record> | ||
3436 | 9 | |||
3437 | 10 | #---------------------------------------------- | ||
3438 | 11 | # Activity | ||
3439 | 12 | #---------------------------------------------- | ||
3440 | 13 | <record model="workflow.activity" id="act_draft"> | ||
3441 | 14 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3442 | 15 | <field name="flow_start">True</field> | ||
3443 | 16 | <field name="name">draft</field> | ||
3444 | 17 | </record> | ||
3445 | 18 | <record model="workflow.activity" id="act_router"> | ||
3446 | 19 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3447 | 20 | <field name="name">router</field> | ||
3448 | 21 | <field name="kind">function</field> | ||
3449 | 22 | <field name="action">action_wait()</field> | ||
3450 | 23 | <field name="split_mode">OR</field> | ||
3451 | 24 | </record> | ||
3452 | 25 | <record model="workflow.activity" id="act_wait_invoice"> | ||
3453 | 26 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3454 | 27 | <field name="name">wait_invoice</field> | ||
3455 | 28 | </record> | ||
3456 | 29 | <record model="workflow.activity" id="act_wait_ship"> | ||
3457 | 30 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3458 | 31 | <field name="name">wait_ship</field> | ||
3459 | 32 | </record> | ||
3460 | 33 | |||
3461 | 34 | <record model="workflow.activity" id="act_done"> | ||
3462 | 35 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3463 | 36 | <field name="name">done</field> | ||
3464 | 37 | <field name="flow_stop">True</field> | ||
3465 | 38 | <field name="kind">function</field> | ||
3466 | 39 | <field name="action">write({'state':'done'})</field> | ||
3467 | 40 | <field name="join_mode">AND</field> | ||
3468 | 41 | </record> | ||
3469 | 42 | <record model="workflow.activity" id="act_cancel"> | ||
3470 | 43 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3471 | 44 | <field name="name">cancel</field> | ||
3472 | 45 | <field name="flow_stop">True</field> | ||
3473 | 46 | <field name="kind">stopall</field> | ||
3474 | 47 | <field name="action">action_cancel()</field> | ||
3475 | 48 | </record> | ||
3476 | 49 | <record model="workflow.activity" id="act_cancel2"> | ||
3477 | 50 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3478 | 51 | <field name="name">cancel2</field> | ||
3479 | 52 | <field name="flow_stop">True</field> | ||
3480 | 53 | <field name="kind">stopall</field> | ||
3481 | 54 | <field name="action">action_cancel()</field> | ||
3482 | 55 | </record> | ||
3483 | 56 | <record model="workflow.activity" id="act_cancel3"> | ||
3484 | 57 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3485 | 58 | <field name="name">cancel3</field> | ||
3486 | 59 | <field name="flow_stop">True</field> | ||
3487 | 60 | <field name="kind">stopall</field> | ||
3488 | 61 | <field name="action">action_cancel()</field> | ||
3489 | 62 | </record> | ||
3490 | 63 | |||
3491 | 64 | <record model="workflow.activity" id="act_invoice"> | ||
3492 | 65 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3493 | 66 | <field name="name">invoice</field> | ||
3494 | 67 | <field name="kind">subflow</field> | ||
3495 | 68 | <field name="subflow_id" search="[('name','=','account.invoice.basic')]"/> | ||
3496 | 69 | <field name="action">action_invoice_create()</field> | ||
3497 | 70 | </record> | ||
3498 | 71 | <record model="workflow.activity" id="act_invoice_except"> | ||
3499 | 72 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3500 | 73 | <field name="name">invoice_except</field> | ||
3501 | 74 | <field name="kind">function</field> | ||
3502 | 75 | <field name="action">write({'state':'invoice_except', 'invoice_id':False})</field> | ||
3503 | 76 | </record> | ||
3504 | 77 | <record model="workflow.activity" id="act_invoice_end"> | ||
3505 | 78 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3506 | 79 | <field name="name">invoice_end</field> | ||
3507 | 80 | <field name="kind">function</field> | ||
3508 | 81 | <field name="action">write({'invoiced':1})</field> | ||
3509 | 82 | </record> | ||
3510 | 83 | <record model="workflow.activity" id="act_invoice_cancel"> | ||
3511 | 84 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3512 | 85 | <field name="name">invoice_cancel</field> | ||
3513 | 86 | <field name="flow_stop">True</field> | ||
3514 | 87 | <field name="kind">stopall</field> | ||
3515 | 88 | <field name="action">action_cancel()</field> | ||
3516 | 89 | </record> | ||
3517 | 90 | |||
3518 | 91 | <record model="workflow.activity" id="act_ship"> | ||
3519 | 92 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3520 | 93 | <field name="name">ship</field> | ||
3521 | 94 | <field name="kind">function</field> | ||
3522 | 95 | <!-- | ||
3523 | 96 | <field name="kind">subflow</field> | ||
3524 | 97 | <field name="subflow_id" search="[('osv','=','stock.picking')]"/> | ||
3525 | 98 | --> | ||
3526 | 99 | <field name="action">action_ship_create()</field> | ||
3527 | 100 | </record> | ||
3528 | 101 | <record model="workflow.activity" id="act_ship_except"> | ||
3529 | 102 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3530 | 103 | <field name="name">ship_except</field> | ||
3531 | 104 | <field name="kind">function</field> | ||
3532 | 105 | <field name="action">write({'state':'shipping_except'})</field> | ||
3533 | 106 | </record> | ||
3534 | 107 | <record model="workflow.activity" id="act_ship_end"> | ||
3535 | 108 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3536 | 109 | <field name="name">ship_end</field> | ||
3537 | 110 | <field name="kind">function</field> | ||
3538 | 111 | <field name="action">action_ship_end()</field> | ||
3539 | 112 | </record> | ||
3540 | 113 | <record model="workflow.activity" id="act_ship_cancel"> | ||
3541 | 114 | <field name="wkf_id" ref="wkf_oscom_sale"/> | ||
3542 | 115 | <field name="name">ship_cancel</field> | ||
3543 | 116 | <field name="flow_stop">True</field> | ||
3544 | 117 | <field name="kind">stopall</field> | ||
3545 | 118 | <field name="action">action_cancel()</field> | ||
3546 | 119 | </record> | ||
3547 | 120 | |||
3548 | 121 | #---------------------------------------------- | ||
3549 | 122 | # Transistion | ||
3550 | 123 | #---------------------------------------------- | ||
3551 | 124 | |||
3552 | 125 | <record model="workflow.transition" id="trans_invoice_end_done"> | ||
3553 | 126 | <field name="act_from" ref="act_invoice_end"/> | ||
3554 | 127 | <field name="act_to" ref="act_done"/> | ||
3555 | 128 | </record> | ||
3556 | 129 | <record model="workflow.transition" id="trans_draft_router"> | ||
3557 | 130 | <field name="act_from" ref="act_draft"/> | ||
3558 | 131 | <field name="act_to" ref="act_router"/> | ||
3559 | 132 | <field name="signal">order_confirm</field> | ||
3560 | 133 | </record> | ||
3561 | 134 | <record model="workflow.transition" id="trans_draft_cancel"> | ||
3562 | 135 | <field name="act_from" ref="act_draft"/> | ||
3563 | 136 | <field name="act_to" ref="act_cancel"/> | ||
3564 | 137 | <field name="signal">cancel</field> | ||
3565 | 138 | </record> | ||
3566 | 139 | <record model="workflow.transition" id="trans_router_wait_invoice"> | ||
3567 | 140 | <field name="act_from" ref="act_router"/> | ||
3568 | 141 | <field name="act_to" ref="act_wait_invoice"/> | ||
3569 | 142 | </record> | ||
3570 | 143 | <record model="workflow.transition" id="trans_router_wait_ship"> | ||
3571 | 144 | <field name="act_from" ref="act_router"/> | ||
3572 | 145 | <field name="act_to" ref="act_wait_ship"/> | ||
3573 | 146 | </record> | ||
3574 | 147 | <record model="workflow.transition" id="trans_wait_invoice_cancel2"> | ||
3575 | 148 | <field name="act_from" ref="act_wait_invoice"/> | ||
3576 | 149 | <field name="act_to" ref="act_cancel2"/> | ||
3577 | 150 | <field name="signal">cancel</field> | ||
3578 | 151 | </record> | ||
3579 | 152 | <record model="workflow.transition" id="trans_wait_ship_cancel3"> | ||
3580 | 153 | <field name="act_from" ref="act_wait_ship"/> | ||
3581 | 154 | <field name="act_to" ref="act_cancel3"/> | ||
3582 | 155 | <field name="signal">cancel</field> | ||
3583 | 156 | </record> | ||
3584 | 157 | <record model="workflow.transition" id="trans_wait_ship_ship"> | ||
3585 | 158 | <field name="act_from" ref="act_wait_ship"/> | ||
3586 | 159 | <field name="act_to" ref="act_ship"/> | ||
3587 | 160 | <field name="condition">(order_policy!='prepaid') or invoiced</field> | ||
3588 | 161 | </record> | ||
3589 | 162 | <record model="workflow.transition" id="trans_wait_invoice_invoice"> | ||
3590 | 163 | <field name="act_from" ref="act_wait_invoice"/> | ||
3591 | 164 | <field name="act_to" ref="act_invoice"/> | ||
3592 | 165 | <field name="condition">(order_policy=='prepaid') or ((order_policy=='postpaid') and shipped)</field> | ||
3593 | 166 | </record> | ||
3594 | 167 | <record model="workflow.transition" id="trans_wait_invoice_invoice_manual"> | ||
3595 | 168 | <field name="act_from" ref="act_wait_invoice"/> | ||
3596 | 169 | <field name="act_to" ref="act_invoice"/> | ||
3597 | 170 | <field name="signal">manual_invoice</field> | ||
3598 | 171 | </record> | ||
3599 | 172 | <record model="workflow.transition" id="trans_invoice_invoice_end"> | ||
3600 | 173 | <field name="act_from" ref="act_invoice"/> | ||
3601 | 174 | <field name="act_to" ref="act_invoice_end"/> | ||
3602 | 175 | <field name="signal">subflow.paid</field> | ||
3603 | 176 | </record> | ||
3604 | 177 | <record model="workflow.transition" id="trans_invoice_invoice_except"> | ||
3605 | 178 | <field name="act_from" ref="act_invoice"/> | ||
3606 | 179 | <field name="act_to" ref="act_invoice_except"/> | ||
3607 | 180 | <field name="signal">subflow.cancel</field> | ||
3608 | 181 | </record> | ||
3609 | 182 | <record model="workflow.transition" id="trans_invoice_except_invoice"> | ||
3610 | 183 | <field name="act_from" ref="act_invoice_except"/> | ||
3611 | 184 | <field name="act_to" ref="act_invoice"/> | ||
3612 | 185 | <field name="signal">invoice_recreate</field> | ||
3613 | 186 | </record> | ||
3614 | 187 | <record model="workflow.transition" id="trans_invoice_except_invoice_end"> | ||
3615 | 188 | <field name="act_from" ref="act_invoice_except"/> | ||
3616 | 189 | <field name="act_to" ref="act_invoice_end"/> | ||
3617 | 190 | <field name="signal">invoice_corrected</field> | ||
3618 | 191 | </record> | ||
3619 | 192 | <record model="workflow.transition" id="trans_invoice_except_invoice_cancel"> | ||
3620 | 193 | <field name="act_from" ref="act_invoice_except"/> | ||
3621 | 194 | <field name="act_to" ref="act_invoice_cancel"/> | ||
3622 | 195 | <field name="signal">invoice_cancel</field> | ||
3623 | 196 | </record> | ||
3624 | 197 | <record model="workflow.transition" id="trans_ship_end_done"> | ||
3625 | 198 | <field name="act_from" ref="act_ship_end"/> | ||
3626 | 199 | <field name="act_to" ref="act_done"/> | ||
3627 | 200 | </record> | ||
3628 | 201 | <record model="workflow.transition" id="trans_ship_ship_end"> | ||
3629 | 202 | <field name="act_from" ref="act_ship"/> | ||
3630 | 203 | <field name="act_to" ref="act_ship_end"/> | ||
3631 | 204 | <field name="trigger_model">mrp.procurement</field> | ||
3632 | 205 | <field name="trigger_expr_id">procurement_lines_get()</field> | ||
3633 | 206 | <field name="condition">test_procurement_finnished()</field> | ||
3634 | 207 | </record> | ||
3635 | 208 | <record model="workflow.transition" id="trans_ship_ship_except"> | ||
3636 | 209 | <field name="act_from" ref="act_ship"/> | ||
3637 | 210 | <field name="act_to" ref="act_ship_except"/> | ||
3638 | 211 | <field name="condition">test_procurement_finnished('cancel')</field> | ||
3639 | 212 | </record> | ||
3640 | 213 | <record model="workflow.transition" id="trans_ship_except_ship"> | ||
3641 | 214 | <field name="act_from" ref="act_ship_except"/> | ||
3642 | 215 | <field name="act_to" ref="act_ship"/> | ||
3643 | 216 | <field name="signal">ship_recreate</field> | ||
3644 | 217 | </record> | ||
3645 | 218 | <record model="workflow.transition" id="trans_"> | ||
3646 | 219 | <field name="act_from" ref="act_ship_except"/> | ||
3647 | 220 | <field name="act_to" ref="act_ship_end"/> | ||
3648 | 221 | <field name="signal">ship_corrected</field> | ||
3649 | 222 | </record> | ||
3650 | 223 | <record model="workflow.transition" id="trans_ship_except_ship_cancel"> | ||
3651 | 224 | <field name="act_from" ref="act_ship_except"/> | ||
3652 | 225 | <field name="act_to" ref="act_ship_cancel"/> | ||
3653 | 226 | <field name="signal">ship_cancel</field> | ||
3654 | 227 | </record> | ||
3655 | 228 | |||
3656 | 229 | </data> | ||
3657 | 230 | </openerp> | ||
3658 | 231 | 0 | ||
3659 | === renamed file 'esale_osc/i18n/es.po' => 'esale_osc/i18n/es.po.THIS' | |||
3660 | === modified file 'esale_osc/i18n/es_ES.po' (properties changed: -x to +x) | |||
3661 | --- esale_osc/i18n/es_ES.po 2010-02-02 20:22:20 +0000 | |||
3662 | +++ esale_osc/i18n/es_ES.po 2010-07-21 10:31:39 +0000 | |||
3663 | @@ -6,14 +6,15 @@ | |||
3664 | 6 | msgstr "" | 6 | msgstr "" |
3665 | 7 | "Project-Id-Version: OpenERP Server 5.0.6\n" | 7 | "Project-Id-Version: OpenERP Server 5.0.6\n" |
3666 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" |
3670 | 9 | "POT-Creation-Date: 2009-12-30 02:38:48+0000\n" | 9 | "POT-Creation-Date: 2009-12-30 02:49+0000\n" |
3671 | 10 | "PO-Revision-Date: 2009-12-30 03:47+0100\n" | 10 | "PO-Revision-Date: 2010-04-21 14:57+0100\n" |
3672 | 11 | "Last-Translator: Ana Juaristi <ajuaristio@gmail.com>\n" | 11 | "Last-Translator: ZhenIT Software <info@ZhenIT.com>\n" |
3673 | 12 | "Language-Team: \n" | 12 | "Language-Team: \n" |
3674 | 13 | "MIME-Version: 1.0\n" | 13 | "MIME-Version: 1.0\n" |
3675 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
3676 | 15 | "Content-Transfer-Encoding: 8bit\n" | 15 | "Content-Transfer-Encoding: 8bit\n" |
3678 | 16 | "Plural-Forms: \n" | 16 | "X-Launchpad-Export-Date: 2010-02-15 15:01+0000\n" |
3679 | 17 | "X-Generator: Launchpad (build Unknown)\n" | ||
3680 | 17 | 18 | ||
3681 | 18 | #. module: esale_osc | 19 | #. module: esale_osc |
3682 | 19 | #: view:esale.oscom.web:0 | 20 | #: view:esale.oscom.web:0 |
3683 | @@ -58,7 +59,7 @@ | |||
3684 | 58 | #. module: esale_osc | 59 | #. module: esale_osc |
3685 | 59 | #: field:product.product,manufacturer_id:0 | 60 | #: field:product.product,manufacturer_id:0 |
3686 | 60 | msgid " Manufacturer" | 61 | msgid " Manufacturer" |
3688 | 61 | msgstr "Fabricante" | 62 | msgstr " Fabricante" |
3689 | 62 | 63 | ||
3690 | 63 | #. module: esale_osc | 64 | #. module: esale_osc |
3691 | 64 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_products | 65 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_products |
3692 | @@ -520,7 +521,7 @@ | |||
3693 | 520 | #. module: esale_osc | 521 | #. module: esale_osc |
3694 | 521 | #: help:sale.order,shipping_agency:0 | 522 | #: help:sale.order,shipping_agency:0 |
3695 | 522 | msgid " Include Carrier to delivery order with" | 523 | msgid " Include Carrier to delivery order with" |
3697 | 523 | msgstr "Incluya al transportista con el que enviará el pedido" | 524 | msgstr " Incluya al transportista con el que enviará el pedido" |
3698 | 524 | 525 | ||
3699 | 525 | #. module: esale_osc | 526 | #. module: esale_osc |
3700 | 526 | #: help:sale.order,orders_status_id:0 | 527 | #: help:sale.order,orders_status_id:0 |
3701 | @@ -862,3 +863,32 @@ | |||
3702 | 862 | msgid "In/Out Stock" | 863 | msgid "In/Out Stock" |
3703 | 863 | msgstr "Disponible/Agotado" | 864 | msgstr "Disponible/Agotado" |
3704 | 864 | 865 | ||
3705 | 866 | #. module: esale_osc | ||
3706 | 867 | #: field:esale.oscom.web,admin_user:0 | ||
3707 | 868 | msgid "Admin User" | ||
3708 | 869 | msgstr "Usuario admin" | ||
3709 | 870 | |||
3710 | 871 | #. module: esale_osc | ||
3711 | 872 | #: field:esale.oscom.web,admin_pass:0 | ||
3712 | 873 | msgid "Admin Pass" | ||
3713 | 874 | msgstr "Clave admin" | ||
3714 | 875 | |||
3715 | 876 | #. module: esale_osc | ||
3716 | 877 | #: field:esale.oscom.web,default_partner_category:0 | ||
3717 | 878 | msgid "Customers partner category" | ||
3718 | 879 | msgstr "Categoría clientes" | ||
3719 | 880 | |||
3720 | 881 | #. module: esale_osc | ||
3721 | 882 | #: field:esale.oscom.web,download_number:30 | ||
3722 | 883 | msgid "Download number" | ||
3723 | 884 | msgstr "Descarga en bloques de" | ||
3724 | 885 | |||
3725 | 886 | #. module: esale_osc | ||
3726 | 887 | #: field:esale.oscom.web,override_products_data:0 | ||
3727 | 888 | msgid "Override Products Data" | ||
3728 | 889 | msgstr "Sobreescribir datos de productos" | ||
3729 | 890 | |||
3730 | 891 | #. module: esale_osc | ||
3731 | 892 | #: help:esale.oscom.web,override_products_data:0 | ||
3732 | 893 | msgid "Click if you want to Update products data on the shop with changes made in openerp." | ||
3733 | 894 | msgstr "Marca para actualizar los datos de los productos de la tienda cuando se modifiquen en openERP" | ||
3734 | 865 | \ No newline at end of file | 895 | \ No newline at end of file |
3735 | 866 | 896 | ||
3736 | === modified file 'esale_osc/i18n/esale_osc.pot' (properties changed: -x to +x) | |||
3737 | --- esale_osc/i18n/esale_osc.pot 2010-02-02 20:22:20 +0000 | |||
3738 | +++ esale_osc/i18n/esale_osc.pot 2010-07-21 10:31:39 +0000 | |||
3739 | @@ -1,252 +1,247 @@ | |||
3740 | 1 | # Translation of OpenERP Server. | ||
3741 | 2 | # This file contains the translation of the following modules: | ||
3742 | 3 | # * esale_osc | ||
3743 | 4 | # | ||
3744 | 5 | msgid "" | 1 | msgid "" |
3745 | 6 | msgstr "" | 2 | msgstr "" |
3751 | 7 | "Project-Id-Version: OpenERP Server 5.0.6\n" | 3 | "Project-Id-Version: \n" |
3752 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | 4 | "POT-Creation-Date: \n" |
3753 | 9 | "POT-Creation-Date: 2009-12-30 02:49:33+0000\n" | 5 | "PO-Revision-Date: \n" |
3754 | 10 | "PO-Revision-Date: 2009-12-30 02:49:33+0000\n" | 6 | "Last-Translator: ZhenIT Software <info@ZhenIT.com>\n" |
3750 | 11 | "Last-Translator: <>\n" | ||
3755 | 12 | "Language-Team: \n" | 7 | "Language-Team: \n" |
3756 | 13 | "MIME-Version: 1.0\n" | 8 | "MIME-Version: 1.0\n" |
3760 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | 9 | "Content-Type: text/plain; charset=iso-8859-1\n" |
3761 | 15 | "Content-Transfer-Encoding: \n" | 10 | "Content-Transfer-Encoding: 8bit\n" |
3759 | 16 | "Plural-Forms: \n" | ||
3762 | 17 | 11 | ||
3763 | 12 | #: view:esale.oscom.web:0 | ||
3764 | 18 | #. module: esale_osc | 13 | #. module: esale_osc |
3765 | 19 | #: view:esale.oscom.web:0 | ||
3766 | 20 | msgid "Taxes Mapping" | 14 | msgid "Taxes Mapping" |
3767 | 21 | msgstr "" | 15 | msgstr "" |
3768 | 22 | 16 | ||
3769 | 23 | #. module: esale_osc | ||
3770 | 24 | #: model:ir.model,name:esale_osc.model_esale_oscom_paytype | 17 | #: model:ir.model,name:esale_osc.model_esale_oscom_paytype |
3771 | 18 | #. module: esale_osc | ||
3772 | 25 | msgid "esale_oscom PayType" | 19 | msgid "esale_oscom PayType" |
3773 | 26 | msgstr "" | 20 | msgstr "" |
3774 | 27 | 21 | ||
3775 | 28 | #. module: esale_osc | ||
3776 | 29 | #: field:esale.oscom.tax,name:0 | 22 | #: field:esale.oscom.tax,name:0 |
3777 | 23 | #. module: esale_osc | ||
3778 | 30 | msgid "Tax name" | 24 | msgid "Tax name" |
3779 | 31 | msgstr "" | 25 | msgstr "" |
3780 | 32 | 26 | ||
3781 | 33 | #. module: esale_osc | ||
3782 | 34 | #: field:esale.oscom.status,download:0 | 27 | #: field:esale.oscom.status,download:0 |
3783 | 28 | #. module: esale_osc | ||
3784 | 35 | msgid "Download Orders on Status" | 29 | msgid "Download Orders on Status" |
3785 | 36 | msgstr "" | 30 | msgstr "" |
3786 | 37 | 31 | ||
3787 | 38 | #. module: esale_osc | ||
3788 | 39 | #: model:ir.model,name:esale_osc.model_esale_oscom_web | 32 | #: model:ir.model,name:esale_osc.model_esale_oscom_web |
3789 | 33 | #. module: esale_osc | ||
3790 | 40 | msgid "esale.oscom.web" | 34 | msgid "esale.oscom.web" |
3791 | 41 | msgstr "" | 35 | msgstr "" |
3792 | 42 | 36 | ||
3793 | 43 | #. module: esale_osc | ||
3794 | 44 | #: constraint:ir.actions.act_window:0 | 37 | #: constraint:ir.actions.act_window:0 |
3795 | 38 | #. module: esale_osc | ||
3796 | 45 | msgid "Invalid model name in the action definition." | 39 | msgid "Invalid model name in the action definition." |
3797 | 46 | msgstr "" | 40 | msgstr "" |
3798 | 47 | 41 | ||
3799 | 42 | #: view:esale.oscom.status:0 | ||
3800 | 48 | #. module: esale_osc | 43 | #. module: esale_osc |
3801 | 49 | #: view:esale.oscom.status:0 | ||
3802 | 50 | msgid "Oscommerce Status mapping" | 44 | msgid "Oscommerce Status mapping" |
3803 | 51 | msgstr "" | 45 | msgstr "" |
3804 | 52 | 46 | ||
3805 | 47 | #: view:esale.oscom.web:0 | ||
3806 | 53 | #. module: esale_osc | 48 | #. module: esale_osc |
3807 | 54 | #: view:esale.oscom.web:0 | ||
3808 | 55 | msgid "Import Languages" | 49 | msgid "Import Languages" |
3809 | 56 | msgstr "" | 50 | msgstr "" |
3810 | 57 | 51 | ||
3811 | 58 | #. module: esale_osc | ||
3812 | 59 | #: field:product.product,manufacturer_id:0 | 52 | #: field:product.product,manufacturer_id:0 |
3813 | 53 | #. module: esale_osc | ||
3814 | 60 | msgid " Manufacturer" | 54 | msgid " Manufacturer" |
3815 | 61 | msgstr "" | 55 | msgstr "" |
3816 | 62 | 56 | ||
3817 | 63 | #. module: esale_osc | ||
3818 | 64 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_products | 57 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_products |
3819 | 58 | #. module: esale_osc | ||
3820 | 65 | msgid "Synchronize products and stocks to all OScommerce web shops" | 59 | msgid "Synchronize products and stocks to all OScommerce web shops" |
3821 | 66 | msgstr "" | 60 | msgstr "" |
3822 | 67 | 61 | ||
3823 | 68 | #. module: esale_osc | ||
3824 | 69 | #: field:sale.order,orders_status_id:0 | 62 | #: field:sale.order,orders_status_id:0 |
3825 | 63 | #. module: esale_osc | ||
3826 | 70 | msgid "Osc Status Actual" | 64 | msgid "Osc Status Actual" |
3827 | 71 | msgstr "" | 65 | msgstr "" |
3828 | 72 | 66 | ||
3829 | 73 | #. module: esale_osc | ||
3830 | 74 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_select_stocks | 67 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_select_stocks |
3831 | 75 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_stocks | 68 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_stocks |
3832 | 69 | #. module: esale_osc | ||
3833 | 76 | msgid "Update stocks" | 70 | msgid "Update stocks" |
3834 | 77 | msgstr "" | 71 | msgstr "" |
3835 | 78 | 72 | ||
3836 | 73 | #: view:product.product:0 | ||
3837 | 79 | #. module: esale_osc | 74 | #. module: esale_osc |
3838 | 80 | #: view:product.product:0 | ||
3839 | 81 | msgid "E-Sale Information" | 75 | msgid "E-Sale Information" |
3840 | 82 | msgstr "" | 76 | msgstr "" |
3841 | 83 | 77 | ||
3842 | 78 | #: view:esale.oscom.web:0 | ||
3843 | 84 | #. module: esale_osc | 79 | #. module: esale_osc |
3844 | 85 | #: view:esale.oscom.web:0 | ||
3845 | 86 | msgid "Oscommerce Status Mapping" | 80 | msgid "Oscommerce Status Mapping" |
3846 | 87 | msgstr "" | 81 | msgstr "" |
3847 | 88 | 82 | ||
3848 | 83 | #: constraint:product.product:0 | ||
3849 | 89 | #. module: esale_osc | 84 | #. module: esale_osc |
3850 | 90 | #: constraint:product.product:0 | ||
3851 | 91 | msgid "You can not give other value in Special Price! Please enter number with % or decimal value" | 85 | msgid "You can not give other value in Special Price! Please enter number with % or decimal value" |
3852 | 92 | msgstr "" | 86 | msgstr "" |
3853 | 93 | 87 | ||
3854 | 94 | #. module: esale_osc | ||
3855 | 95 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_product_manufacturer | 88 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_product_manufacturer |
3856 | 89 | #. module: esale_osc | ||
3857 | 96 | msgid "Manufacturers" | 90 | msgid "Manufacturers" |
3858 | 97 | msgstr "" | 91 | msgstr "" |
3859 | 98 | 92 | ||
3860 | 99 | #. module: esale_osc | ||
3861 | 100 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_products | 93 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_products |
3862 | 101 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_select_products | 94 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_select_products |
3863 | 95 | #. module: esale_osc | ||
3864 | 102 | msgid "Sync. products and stocks" | 96 | msgid "Sync. products and stocks" |
3865 | 103 | msgstr "" | 97 | msgstr "" |
3866 | 104 | 98 | ||
3867 | 105 | #. module: esale_osc | ||
3868 | 106 | #: model:ir.model,name:esale_osc.model_esale_oscom_product | 99 | #: model:ir.model,name:esale_osc.model_esale_oscom_product |
3869 | 100 | #. module: esale_osc | ||
3870 | 107 | msgid "esale_oscom Product" | 101 | msgid "esale_oscom Product" |
3871 | 108 | msgstr "" | 102 | msgstr "" |
3872 | 109 | 103 | ||
3873 | 110 | #. module: esale_osc | ||
3874 | 111 | #: field:product.product,oscom_url:0 | 104 | #: field:product.product,oscom_url:0 |
3875 | 105 | #. module: esale_osc | ||
3876 | 112 | msgid "URL to OScommerce" | 106 | msgid "URL to OScommerce" |
3877 | 113 | msgstr "" | 107 | msgstr "" |
3878 | 114 | 108 | ||
3879 | 109 | #: selection:product.product,spe_price_status:0 | ||
3880 | 115 | #. module: esale_osc | 110 | #. module: esale_osc |
3881 | 116 | #: selection:product.product,spe_price_status:0 | ||
3882 | 117 | msgid "On" | 111 | msgid "On" |
3883 | 118 | msgstr "" | 112 | msgstr "" |
3884 | 119 | 113 | ||
3885 | 120 | #. module: esale_osc | ||
3886 | 121 | #: field:esale.oscom.web,url:0 | 114 | #: field:esale.oscom.web,url:0 |
3887 | 122 | #: field:product.manufacturer,manufacturer_url:0 | 115 | #: field:product.manufacturer,manufacturer_url:0 |
3888 | 123 | #: field:product.product,product_url:0 | 116 | #: field:product.product,product_url:0 |
3889 | 117 | #. module: esale_osc | ||
3890 | 124 | msgid "URL" | 118 | msgid "URL" |
3891 | 125 | msgstr "" | 119 | msgstr "" |
3892 | 126 | 120 | ||
3893 | 127 | #. module: esale_osc | ||
3894 | 128 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_stocks | 121 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_stocks |
3895 | 122 | #. module: esale_osc | ||
3896 | 129 | msgid "Update stocks to all OScommerce web shops" | 123 | msgid "Update stocks to all OScommerce web shops" |
3897 | 130 | msgstr "" | 124 | msgstr "" |
3898 | 131 | 125 | ||
3899 | 126 | #: selection:product.product,in_out_stock:0 | ||
3900 | 132 | #. module: esale_osc | 127 | #. module: esale_osc |
3901 | 133 | #: selection:product.product,in_out_stock:0 | ||
3902 | 134 | msgid "In Stock" | 128 | msgid "In Stock" |
3903 | 135 | msgstr "" | 129 | msgstr "" |
3904 | 136 | 130 | ||
3905 | 137 | #. module: esale_osc | ||
3906 | 138 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_saleorders | 131 | #: model:ir.actions.wizard,name:esale_osc.wizard_esale_oscom_saleorders |
3907 | 132 | #. module: esale_osc | ||
3908 | 139 | msgid "Import sale orders" | 133 | msgid "Import sale orders" |
3909 | 140 | msgstr "" | 134 | msgstr "" |
3910 | 141 | 135 | ||
3911 | 142 | #. module: esale_osc | ||
3912 | 143 | #: field:sale.order,shipping_title:0 | 136 | #: field:sale.order,shipping_title:0 |
3913 | 137 | #. module: esale_osc | ||
3914 | 144 | msgid "Shipping" | 138 | msgid "Shipping" |
3915 | 145 | msgstr "" | 139 | msgstr "" |
3916 | 146 | 140 | ||
3917 | 141 | #: view:esale.oscom.web:0 | ||
3918 | 147 | #. module: esale_osc | 142 | #. module: esale_osc |
3919 | 148 | #: view:esale.oscom.web:0 | ||
3920 | 149 | msgid "Import Oscommerce Status" | 143 | msgid "Import Oscommerce Status" |
3921 | 150 | msgstr "" | 144 | msgstr "" |
3922 | 151 | 145 | ||
3923 | 152 | #. module: esale_osc | ||
3924 | 153 | #: help:sale.order,send_web_email:0 | 146 | #: help:sale.order,send_web_email:0 |
3925 | 147 | #. module: esale_osc | ||
3926 | 154 | msgid "Click if you want Sending comments to customer from web. Requires modifying .php procedure" | 148 | msgid "Click if you want Sending comments to customer from web. Requires modifying .php procedure" |
3927 | 155 | msgstr "" | 149 | msgstr "" |
3928 | 156 | 150 | ||
3929 | 157 | #. module: esale_osc | ||
3930 | 158 | #: help:esale.oscom.web,intermediate:0 | 151 | #: help:esale.oscom.web,intermediate:0 |
3931 | 152 | #. module: esale_osc | ||
3932 | 159 | msgid "Select intermediate status for Osc downloaded Orders" | 153 | msgid "Select intermediate status for Osc downloaded Orders" |
3933 | 160 | msgstr "" | 154 | msgstr "" |
3934 | 161 | 155 | ||
3935 | 156 | #: view:sale.order:0 | ||
3936 | 162 | #. module: esale_osc | 157 | #. module: esale_osc |
3937 | 163 | #: view:sale.order:0 | ||
3938 | 164 | msgid "Reference" | 158 | msgid "Reference" |
3939 | 165 | msgstr "" | 159 | msgstr "" |
3940 | 166 | 160 | ||
3941 | 167 | #. module: esale_osc | ||
3942 | 168 | #: help:sale.order,additional_info:0 | 161 | #: help:sale.order,additional_info:0 |
3943 | 162 | #. module: esale_osc | ||
3944 | 169 | msgid "Include any additional info you need internaly include on order" | 163 | msgid "Include any additional info you need internaly include on order" |
3945 | 170 | msgstr "" | 164 | msgstr "" |
3946 | 171 | 165 | ||
3947 | 172 | #. module: esale_osc | ||
3948 | 173 | #: constraint:product.category:0 | 166 | #: constraint:product.category:0 |
3949 | 167 | #. module: esale_osc | ||
3950 | 174 | msgid "Error ! You can not create recursive categories." | 168 | msgid "Error ! You can not create recursive categories." |
3951 | 175 | msgstr "" | 169 | msgstr "" |
3952 | 176 | 170 | ||
3953 | 171 | #: view:esale.oscom.category:0 | ||
3954 | 177 | #. module: esale_osc | 172 | #. module: esale_osc |
3955 | 178 | #: view:esale.oscom.category:0 | ||
3956 | 179 | msgid "taxes" | 173 | msgid "taxes" |
3957 | 180 | msgstr "" | 174 | msgstr "" |
3958 | 181 | 175 | ||
3959 | 176 | #: view:esale.oscom.paytype:0 | ||
3960 | 182 | #. module: esale_osc | 177 | #. module: esale_osc |
3961 | 183 | #: view:esale.oscom.paytype:0 | ||
3962 | 184 | msgid "Payment types mapping" | 178 | msgid "Payment types mapping" |
3963 | 185 | msgstr "" | 179 | msgstr "" |
3964 | 186 | 180 | ||
3965 | 187 | #. module: esale_osc | ||
3966 | 188 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_root | 181 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_root |
3967 | 182 | #. module: esale_osc | ||
3968 | 189 | msgid "Internet Sales" | 183 | msgid "Internet Sales" |
3969 | 190 | msgstr "" | 184 | msgstr "" |
3970 | 191 | 185 | ||
3971 | 192 | #. module: esale_osc | ||
3972 | 193 | #: model:ir.model,name:esale_osc.model_product_manufacturer | 186 | #: model:ir.model,name:esale_osc.model_product_manufacturer |
3973 | 187 | #. module: esale_osc | ||
3974 | 194 | msgid "Product Manufacturer that produces the product" | 188 | msgid "Product Manufacturer that produces the product" |
3975 | 195 | msgstr "" | 189 | msgstr "" |
3976 | 196 | 190 | ||
3977 | 191 | #: view:sale.order:0 | ||
3978 | 197 | #. module: esale_osc | 192 | #. module: esale_osc |
3979 | 198 | #: view:sale.order:0 | ||
3980 | 199 | msgid "OsCommerce" | 193 | msgid "OsCommerce" |
3981 | 200 | msgstr "" | 194 | msgstr "" |
3982 | 201 | 195 | ||
3983 | 202 | #. module: esale_osc | ||
3984 | 203 | #: field:esale.oscom.status,language_id:0 | 196 | #: field:esale.oscom.status,language_id:0 |
3985 | 197 | #. module: esale_osc | ||
3986 | 204 | msgid "Language Id" | 198 | msgid "Language Id" |
3987 | 205 | msgstr "" | 199 | msgstr "" |
3988 | 206 | 200 | ||
3989 | 207 | #. module: esale_osc | ||
3990 | 208 | #: wizard_button:esale.oscom.products,init,end:0 | 201 | #: wizard_button:esale.oscom.products,init,end:0 |
3991 | 209 | #: wizard_button:esale.oscom.saleorders,init,end:0 | 202 | #: wizard_button:esale.oscom.saleorders,init,end:0 |
3992 | 210 | #: wizard_button:esale.oscom.select.products,init,end:0 | 203 | #: wizard_button:esale.oscom.select.products,init,end:0 |
3993 | 211 | #: wizard_button:esale.oscom.select.stocks,init,end:0 | 204 | #: wizard_button:esale.oscom.select.stocks,init,end:0 |
3994 | 212 | #: wizard_button:esale.oscom.stocks,init,end:0 | 205 | #: wizard_button:esale.oscom.stocks,init,end:0 |
3995 | 206 | #. module: esale_osc | ||
3996 | 213 | msgid "End" | 207 | msgid "End" |
3997 | 214 | msgstr "" | 208 | msgstr "" |
3998 | 215 | 209 | ||
3999 | 216 | #. module: esale_osc | ||
4000 | 217 | #: model:ir.module.module,shortdesc:esale_osc.module_meta_information | 210 | #: model:ir.module.module,shortdesc:esale_osc.module_meta_information |
4001 | 211 | #. module: esale_osc | ||
4002 | 218 | msgid "OScommerce Interface / ZenCart" | 212 | msgid "OScommerce Interface / ZenCart" |
4003 | 219 | msgstr "" | 213 | msgstr "" |
4004 | 220 | 214 | ||
4005 | 221 | #. module: esale_osc | ||
4006 | 222 | #: wizard_view:esale.oscom.products,init:0 | 215 | #: wizard_view:esale.oscom.products,init:0 |
4007 | 223 | #: wizard_view:esale.oscom.select.products,init:0 | 216 | #: wizard_view:esale.oscom.select.products,init:0 |
4008 | 217 | #. module: esale_osc | ||
4009 | 224 | msgid "Products exported" | 218 | msgid "Products exported" |
4010 | 225 | msgstr "" | 219 | msgstr "" |
4011 | 226 | 220 | ||
4012 | 227 | #. module: esale_osc | ||
4013 | 228 | #: field:esale.oscom.lang,language_id:0 | 221 | #: field:esale.oscom.lang,language_id:0 |
4014 | 222 | #. module: esale_osc | ||
4015 | 229 | msgid "OpenERP language" | 223 | msgid "OpenERP language" |
4016 | 230 | msgstr "" | 224 | msgstr "" |
4017 | 231 | 225 | ||
4018 | 226 | #: view:product.product:0 | ||
4019 | 232 | #. module: esale_osc | 227 | #. module: esale_osc |
4020 | 233 | #: view:product.product:0 | ||
4021 | 234 | msgid "Special price information" | 228 | msgid "Special price information" |
4022 | 235 | msgstr "" | 229 | msgstr "" |
4023 | 236 | 230 | ||
4024 | 237 | #. module: esale_osc | ||
4025 | 238 | #: field:sale.order,tracking_number:0 | 231 | #: field:sale.order,tracking_number:0 |
4026 | 232 | #. module: esale_osc | ||
4027 | 239 | msgid "Num tracking" | 233 | msgid "Num tracking" |
4028 | 240 | msgstr "" | 234 | msgstr "" |
4029 | 241 | 235 | ||
4030 | 236 | #: selection:product.product,spe_price_status:0 | ||
4031 | 242 | #. module: esale_osc | 237 | #. module: esale_osc |
4032 | 243 | #: selection:product.product,spe_price_status:0 | ||
4033 | 244 | msgid "Off" | 238 | msgid "Off" |
4034 | 245 | msgstr "" | 239 | msgstr "" |
4035 | 246 | 240 | ||
4036 | 247 | #. module: esale_osc | ||
4037 | 248 | #: model:ir.module.module,description:esale_osc.module_meta_information | 241 | #: model:ir.module.module,description:esale_osc.module_meta_information |
4039 | 249 | msgid "OSCommerce (Zencart) eCommerce interface synchronisation.\n" | 242 | #. module: esale_osc |
4040 | 243 | msgid "" | ||
4041 | 244 | "OSCommerce (Zencart) eCommerce interface synchronisation.\n" | ||
4042 | 250 | "\n" | 245 | "\n" |
4043 | 251 | "Syncro Oscommerce to Openerp\n" | 246 | "Syncro Oscommerce to Openerp\n" |
4044 | 252 | " 1. Import/upgrade categories.\n" | 247 | " 1. Import/upgrade categories.\n" |
4045 | @@ -261,462 +256,461 @@ | |||
4046 | 261 | "Developed by Tiny, Axelor, Zikzakmedia and Ana Juaristi" | 256 | "Developed by Tiny, Axelor, Zikzakmedia and Ana Juaristi" |
4047 | 262 | msgstr "" | 257 | msgstr "" |
4048 | 263 | 258 | ||
4049 | 264 | #. module: esale_osc | ||
4050 | 265 | #: wizard_view:esale.oscom.saleorders,init:0 | 259 | #: wizard_view:esale.oscom.saleorders,init:0 |
4051 | 260 | #. module: esale_osc | ||
4052 | 266 | msgid "Sale orders succesfully imported" | 261 | msgid "Sale orders succesfully imported" |
4053 | 267 | msgstr "" | 262 | msgstr "" |
4054 | 268 | 263 | ||
4055 | 269 | #. module: esale_osc | ||
4056 | 270 | #: wizard_field:esale.oscom.products,init,prod_update:0 | 264 | #: wizard_field:esale.oscom.products,init,prod_update:0 |
4057 | 271 | #: wizard_field:esale.oscom.select.products,init,prod_update:0 | 265 | #: wizard_field:esale.oscom.select.products,init,prod_update:0 |
4058 | 266 | #. module: esale_osc | ||
4059 | 272 | msgid "Updated products" | 267 | msgid "Updated products" |
4060 | 273 | msgstr "" | 268 | msgstr "" |
4061 | 274 | 269 | ||
4062 | 275 | #. module: esale_osc | ||
4063 | 276 | #: help:sale.order,volume:0 | 270 | #: help:sale.order,volume:0 |
4064 | 271 | #. module: esale_osc | ||
4065 | 277 | msgid "Include volume of packages to send" | 272 | msgid "Include volume of packages to send" |
4066 | 278 | msgstr "" | 273 | msgstr "" |
4067 | 279 | 274 | ||
4068 | 280 | #. module: esale_osc | ||
4069 | 281 | #: wizard_field:esale.oscom.products,init,prod_new:0 | 275 | #: wizard_field:esale.oscom.products,init,prod_new:0 |
4070 | 282 | #: wizard_field:esale.oscom.select.products,init,prod_new:0 | 276 | #: wizard_field:esale.oscom.select.products,init,prod_new:0 |
4071 | 277 | #. module: esale_osc | ||
4072 | 283 | msgid "New products" | 278 | msgid "New products" |
4073 | 284 | msgstr "" | 279 | msgstr "" |
4074 | 285 | 280 | ||
4075 | 281 | #: view:esale.oscom.web:0 | ||
4076 | 286 | #. module: esale_osc | 282 | #. module: esale_osc |
4077 | 287 | #: view:esale.oscom.web:0 | ||
4078 | 288 | msgid "Active Products" | 283 | msgid "Active Products" |
4079 | 289 | msgstr "" | 284 | msgstr "" |
4080 | 290 | 285 | ||
4081 | 286 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4082 | 291 | #. module: esale_osc | 287 | #. module: esale_osc |
4083 | 292 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4084 | 293 | msgid "SO in State Draft" | 288 | msgid "SO in State Draft" |
4085 | 294 | msgstr "" | 289 | msgstr "" |
4086 | 295 | 290 | ||
4087 | 296 | #. module: esale_osc | ||
4088 | 297 | #: field:esale.oscom.web,date_download_from:0 | 291 | #: field:esale.oscom.web,date_download_from:0 |
4089 | 292 | #. module: esale_osc | ||
4090 | 298 | msgid "Date Download From" | 293 | msgid "Date Download From" |
4091 | 299 | msgstr "" | 294 | msgstr "" |
4092 | 300 | 295 | ||
4093 | 301 | #. module: esale_osc | ||
4094 | 302 | #: help:sale.order,status_comment:0 | 296 | #: help:sale.order,status_comment:0 |
4095 | 297 | #. module: esale_osc | ||
4096 | 303 | msgid "Write a comment to include on Osc order. It will be uploaded to Osc Web on changing actual osc status" | 298 | msgid "Write a comment to include on Osc order. It will be uploaded to Osc Web on changing actual osc status" |
4097 | 304 | msgstr "" | 299 | msgstr "" |
4098 | 305 | 300 | ||
4099 | 301 | #: view:esale.oscom.web:0 | ||
4100 | 306 | #. module: esale_osc | 302 | #. module: esale_osc |
4101 | 307 | #: view:esale.oscom.web:0 | ||
4102 | 308 | msgid "General Informations" | 303 | msgid "General Informations" |
4103 | 309 | msgstr "" | 304 | msgstr "" |
4104 | 310 | 305 | ||
4105 | 311 | #. module: esale_osc | ||
4106 | 312 | #: constraint:ir.ui.view:0 | 306 | #: constraint:ir.ui.view:0 |
4107 | 307 | #. module: esale_osc | ||
4108 | 313 | msgid "Invalid XML for View Architecture!" | 308 | msgid "Invalid XML for View Architecture!" |
4109 | 314 | msgstr "" | 309 | msgstr "" |
4110 | 315 | 310 | ||
4111 | 311 | #: constraint:product.template:0 | ||
4112 | 316 | #. module: esale_osc | 312 | #. module: esale_osc |
4113 | 317 | #: constraint:product.template:0 | ||
4114 | 318 | msgid "Error: UOS must be in a different category than the UOM" | 313 | msgid "Error: UOS must be in a different category than the UOM" |
4115 | 319 | msgstr "" | 314 | msgstr "" |
4116 | 320 | 315 | ||
4117 | 316 | #: view:esale.oscom.web:0 | ||
4118 | 321 | #. module: esale_osc | 317 | #. module: esale_osc |
4119 | 322 | #: view:esale.oscom.web:0 | ||
4120 | 323 | msgid "Proceed with the mappings before adding products!" | 318 | msgid "Proceed with the mappings before adding products!" |
4121 | 324 | msgstr "" | 319 | msgstr "" |
4122 | 325 | 320 | ||
4123 | 326 | #. module: esale_osc | ||
4124 | 327 | #: model:ir.model,name:esale_osc.model_esale_oscom_tax | 321 | #: model:ir.model,name:esale_osc.model_esale_oscom_tax |
4125 | 322 | #. module: esale_osc | ||
4126 | 328 | msgid "esale_oscom Tax" | 323 | msgid "esale_oscom Tax" |
4127 | 329 | msgstr "" | 324 | msgstr "" |
4128 | 330 | 325 | ||
4129 | 331 | #. module: esale_osc | ||
4130 | 332 | #: field:sale.order,esale_oscom_id:0 | 326 | #: field:sale.order,esale_oscom_id:0 |
4131 | 327 | #. module: esale_osc | ||
4132 | 333 | msgid "esale_oscom Id" | 328 | msgid "esale_oscom Id" |
4133 | 334 | msgstr "" | 329 | msgstr "" |
4134 | 335 | 330 | ||
4135 | 336 | #. module: esale_osc | ||
4136 | 337 | #: help:sale.order,tracking_number:0 | 331 | #: help:sale.order,tracking_number:0 |
4137 | 332 | #. module: esale_osc | ||
4138 | 338 | msgid "Include order trucking number given by carrier" | 333 | msgid "Include order trucking number given by carrier" |
4139 | 339 | msgstr "" | 334 | msgstr "" |
4140 | 340 | 335 | ||
4141 | 341 | #. module: esale_osc | ||
4142 | 342 | #: field:sale.order,update_comment:0 | 336 | #: field:sale.order,update_comment:0 |
4143 | 337 | #. module: esale_osc | ||
4144 | 343 | msgid "Update Comment" | 338 | msgid "Update Comment" |
4145 | 344 | msgstr "" | 339 | msgstr "" |
4146 | 345 | 340 | ||
4147 | 346 | #. module: esale_osc | ||
4148 | 347 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_saleorder_new | 341 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_saleorder_new |
4149 | 342 | #. module: esale_osc | ||
4150 | 348 | msgid "New order" | 343 | msgid "New order" |
4151 | 349 | msgstr "" | 344 | msgstr "" |
4152 | 350 | 345 | ||
4153 | 346 | #: view:esale.oscom.web:0 | ||
4154 | 351 | #. module: esale_osc | 347 | #. module: esale_osc |
4155 | 352 | #: view:esale.oscom.web:0 | ||
4156 | 353 | msgid "Payment types Mapping" | 348 | msgid "Payment types Mapping" |
4157 | 354 | msgstr "" | 349 | msgstr "" |
4158 | 355 | 350 | ||
4159 | 351 | #: view:esale.oscom.web:0 | ||
4160 | 356 | #. module: esale_osc | 352 | #. module: esale_osc |
4161 | 357 | #: view:esale.oscom.web:0 | ||
4162 | 358 | msgid "OScommerce Web Shop" | 353 | msgid "OScommerce Web Shop" |
4163 | 359 | msgstr "" | 354 | msgstr "" |
4164 | 360 | 355 | ||
4165 | 361 | #. module: esale_osc | ||
4166 | 362 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_progress | 356 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_progress |
4167 | 357 | #. module: esale_osc | ||
4168 | 363 | msgid "In progress" | 358 | msgid "In progress" |
4169 | 364 | msgstr "" | 359 | msgstr "" |
4170 | 365 | 360 | ||
4171 | 366 | #. module: esale_osc | ||
4172 | 367 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_saleorders | 361 | #: model:ir.ui.menu,name:esale_osc.menu_esale_oscom_saleorders |
4173 | 362 | #. module: esale_osc | ||
4174 | 368 | msgid "Import sale orders from all OScommerce web shops" | 363 | msgid "Import sale orders from all OScommerce web shops" |
4175 | 369 | msgstr "" | 364 | msgstr "" |
4176 | 370 | 365 | ||
4177 | 371 | #. module: esale_osc | ||
4178 | 372 | #: help:esale.oscom.web,esale_account_id:0 | 366 | #: help:esale.oscom.web,esale_account_id:0 |
4179 | 367 | #. module: esale_osc | ||
4180 | 373 | msgid "Payment account for web invoices." | 368 | msgid "Payment account for web invoices." |
4181 | 374 | msgstr "" | 369 | msgstr "" |
4182 | 375 | 370 | ||
4183 | 376 | #. module: esale_osc | ||
4184 | 377 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_invoices | 371 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_invoices |
4185 | 372 | #. module: esale_osc | ||
4186 | 378 | msgid "Invoices" | 373 | msgid "Invoices" |
4187 | 379 | msgstr "" | 374 | msgstr "" |
4188 | 380 | 375 | ||
4189 | 381 | #. module: esale_osc | ||
4190 | 382 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_saleorder | 376 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_saleorder |
4191 | 377 | #. module: esale_osc | ||
4192 | 383 | msgid "Web sale orders" | 378 | msgid "Web sale orders" |
4193 | 384 | msgstr "" | 379 | msgstr "" |
4194 | 385 | 380 | ||
4195 | 386 | #. module: esale_osc | ||
4196 | 387 | #: field:esale.oscom.web,product_ids:0 | 381 | #: field:esale.oscom.web,product_ids:0 |
4197 | 382 | #. module: esale_osc | ||
4198 | 388 | msgid "Web products" | 383 | msgid "Web products" |
4199 | 389 | msgstr "" | 384 | msgstr "" |
4200 | 390 | 385 | ||
4201 | 391 | #. module: esale_osc | ||
4202 | 392 | #: help:sale.order,update_comment:0 | 386 | #: help:sale.order,update_comment:0 |
4203 | 387 | #. module: esale_osc | ||
4204 | 393 | msgid "Click if you want to Update comments on order" | 388 | msgid "Click if you want to Update comments on order" |
4205 | 394 | msgstr "" | 389 | msgstr "" |
4206 | 395 | 390 | ||
4207 | 391 | #: selection:esale.oscom.web,price_type:0 | ||
4208 | 396 | #. module: esale_osc | 392 | #. module: esale_osc |
4209 | 397 | #: selection:esale.oscom.web,price_type:0 | ||
4210 | 398 | msgid "Taxed price" | 393 | msgid "Taxed price" |
4211 | 399 | msgstr "" | 394 | msgstr "" |
4212 | 400 | 395 | ||
4213 | 401 | #. module: esale_osc | ||
4214 | 402 | #: model:ir.model,name:esale_osc.model_esale_oscom_category | 396 | #: model:ir.model,name:esale_osc.model_esale_oscom_category |
4215 | 397 | #. module: esale_osc | ||
4216 | 403 | msgid "esale_oscom Category" | 398 | msgid "esale_oscom Category" |
4217 | 404 | msgstr "" | 399 | msgstr "" |
4218 | 405 | 400 | ||
4219 | 406 | #. module: esale_osc | ||
4220 | 407 | #: model:ir.model,name:esale_osc.model_esale_oscom_status | 401 | #: model:ir.model,name:esale_osc.model_esale_oscom_status |
4221 | 402 | #. module: esale_osc | ||
4222 | 408 | msgid "esale_oscom Status" | 403 | msgid "esale_oscom Status" |
4223 | 409 | msgstr "" | 404 | msgstr "" |
4224 | 410 | 405 | ||
4225 | 406 | #: view:esale.oscom.web:0 | ||
4226 | 411 | #. module: esale_osc | 407 | #. module: esale_osc |
4227 | 412 | #: view:esale.oscom.web:0 | ||
4228 | 413 | msgid "Languages Mapping" | 408 | msgid "Languages Mapping" |
4229 | 414 | msgstr "" | 409 | msgstr "" |
4230 | 415 | 410 | ||
4231 | 416 | #. module: esale_osc | ||
4232 | 417 | #: field:sale.order,volume:0 | 411 | #: field:sale.order,volume:0 |
4233 | 412 | #. module: esale_osc | ||
4234 | 418 | msgid "Volum" | 413 | msgid "Volum" |
4235 | 419 | msgstr "" | 414 | msgstr "" |
4236 | 420 | 415 | ||
4237 | 421 | #. module: esale_osc | ||
4238 | 422 | #: field:sale.order,number_of_packages:0 | 416 | #: field:sale.order,number_of_packages:0 |
4239 | 417 | #. module: esale_osc | ||
4240 | 423 | msgid "Num pack" | 418 | msgid "Num pack" |
4241 | 424 | msgstr "" | 419 | msgstr "" |
4242 | 425 | 420 | ||
4243 | 421 | #: view:esale.oscom.web:0 | ||
4244 | 426 | #. module: esale_osc | 422 | #. module: esale_osc |
4245 | 427 | #: view:esale.oscom.web:0 | ||
4246 | 428 | msgid "Categories Mapping" | 423 | msgid "Categories Mapping" |
4247 | 429 | msgstr "" | 424 | msgstr "" |
4248 | 430 | 425 | ||
4249 | 431 | #. module: esale_osc | ||
4250 | 432 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_open_tree | 426 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_open_tree |
4251 | 427 | #. module: esale_osc | ||
4252 | 433 | msgid "Opened" | 428 | msgid "Opened" |
4253 | 434 | msgstr "" | 429 | msgstr "" |
4254 | 435 | 430 | ||
4255 | 431 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4256 | 436 | #. module: esale_osc | 432 | #. module: esale_osc |
4257 | 437 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4258 | 438 | msgid "Invoice Payed" | 433 | msgid "Invoice Payed" |
4259 | 439 | msgstr "" | 434 | msgstr "" |
4260 | 440 | 435 | ||
4261 | 436 | #: constraint:product.template:0 | ||
4262 | 441 | #. module: esale_osc | 437 | #. module: esale_osc |
4263 | 442 | #: constraint:product.template:0 | ||
4264 | 443 | msgid "Error: The default UOM and the purchase UOM must be in the same category." | 438 | msgid "Error: The default UOM and the purchase UOM must be in the same category." |
4265 | 444 | msgstr "" | 439 | msgstr "" |
4266 | 445 | 440 | ||
4267 | 446 | #. module: esale_osc | ||
4268 | 447 | #: field:esale.oscom.web,language_ids:0 | 441 | #: field:esale.oscom.web,language_ids:0 |
4269 | 442 | #. module: esale_osc | ||
4270 | 448 | msgid "Languages" | 443 | msgid "Languages" |
4271 | 449 | msgstr "" | 444 | msgstr "" |
4272 | 450 | 445 | ||
4273 | 451 | #. module: esale_osc | ||
4274 | 452 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_draft_tree | 446 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_draft_tree |
4275 | 447 | #. module: esale_osc | ||
4276 | 453 | msgid "Draft" | 448 | msgid "Draft" |
4277 | 454 | msgstr "" | 449 | msgstr "" |
4278 | 455 | 450 | ||
4279 | 456 | #. module: esale_osc | ||
4280 | 457 | #: wizard_view:esale.oscom.products,init:0 | 451 | #: wizard_view:esale.oscom.products,init:0 |
4281 | 458 | #: wizard_view:esale.oscom.select.products,init:0 | 452 | #: wizard_view:esale.oscom.select.products,init:0 |
4282 | 453 | #. module: esale_osc | ||
4283 | 459 | msgid "Product Export" | 454 | msgid "Product Export" |
4284 | 460 | msgstr "" | 455 | msgstr "" |
4285 | 461 | 456 | ||
4286 | 462 | #. module: esale_osc | ||
4287 | 463 | #: field:esale.oscom.web,esale_account_id:0 | 457 | #: field:esale.oscom.web,esale_account_id:0 |
4288 | 458 | #. module: esale_osc | ||
4289 | 464 | msgid "Dest. account" | 459 | msgid "Dest. account" |
4290 | 465 | msgstr "" | 460 | msgstr "" |
4291 | 466 | 461 | ||
4292 | 467 | #. module: esale_osc | ||
4293 | 468 | #: field:esale.oscom.tax,tax_id:0 | 462 | #: field:esale.oscom.tax,tax_id:0 |
4294 | 463 | #. module: esale_osc | ||
4295 | 469 | msgid "OpenERP tax" | 464 | msgid "OpenERP tax" |
4296 | 470 | msgstr "" | 465 | msgstr "" |
4297 | 471 | 466 | ||
4298 | 472 | #. module: esale_osc | ||
4299 | 473 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_proforma_tree | 467 | #: model:ir.ui.menu,name:esale_osc.menu_action_oscom_invoice_proforma_tree |
4300 | 468 | #. module: esale_osc | ||
4301 | 474 | msgid "PRO-FORMA" | 469 | msgid "PRO-FORMA" |
4302 | 475 | msgstr "" | 470 | msgstr "" |
4303 | 476 | 471 | ||
4304 | 472 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4305 | 477 | #. module: esale_osc | 473 | #. module: esale_osc |
4306 | 478 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4307 | 479 | msgid "Invoice Draft" | 474 | msgid "Invoice Draft" |
4308 | 480 | msgstr "" | 475 | msgstr "" |
4309 | 481 | 476 | ||
4310 | 482 | #. module: esale_osc | ||
4311 | 483 | #: view:esale.oscom.web:0 | 477 | #: view:esale.oscom.web:0 |
4312 | 484 | #: field:product.product,spe_price_status:0 | 478 | #: field:product.product,spe_price_status:0 |
4313 | 479 | #. module: esale_osc | ||
4314 | 485 | msgid "Status" | 480 | msgid "Status" |
4315 | 486 | msgstr "" | 481 | msgstr "" |
4316 | 487 | 482 | ||
4317 | 488 | #. module: esale_osc | ||
4318 | 489 | #: field:product.product,date_available:0 | 483 | #: field:product.product,date_available:0 |
4319 | 484 | #. module: esale_osc | ||
4320 | 490 | msgid "Available Date" | 485 | msgid "Available Date" |
4321 | 491 | msgstr "" | 486 | msgstr "" |
4322 | 492 | 487 | ||
4323 | 488 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4324 | 493 | #. module: esale_osc | 489 | #. module: esale_osc |
4325 | 494 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4326 | 495 | msgid "SO Confirmed" | 490 | msgid "SO Confirmed" |
4327 | 496 | msgstr "" | 491 | msgstr "" |
4328 | 497 | 492 | ||
4329 | 498 | #. module: esale_osc | ||
4330 | 499 | #: field:esale.oscom.paytype,journal_id:0 | 493 | #: field:esale.oscom.paytype,journal_id:0 |
4331 | 494 | #. module: esale_osc | ||
4332 | 500 | msgid "OpenERP payment journal" | 495 | msgid "OpenERP payment journal" |
4333 | 501 | msgstr "" | 496 | msgstr "" |
4334 | 502 | 497 | ||
4335 | 503 | #. module: esale_osc | ||
4336 | 504 | #: wizard_field:esale.oscom.products,init,prod_delete:0 | 498 | #: wizard_field:esale.oscom.products,init,prod_delete:0 |
4337 | 505 | #: wizard_field:esale.oscom.select.products,init,prod_delete:0 | 499 | #: wizard_field:esale.oscom.select.products,init,prod_delete:0 |
4338 | 500 | #. module: esale_osc | ||
4339 | 506 | msgid "Deleted products" | 501 | msgid "Deleted products" |
4340 | 507 | msgstr "" | 502 | msgstr "" |
4341 | 508 | 503 | ||
4342 | 509 | #. module: esale_osc | ||
4343 | 510 | #: help:sale.order,shipping_agency:0 | 504 | #: help:sale.order,shipping_agency:0 |
4344 | 505 | #. module: esale_osc | ||
4345 | 511 | msgid " Include Carrier to delivery order with" | 506 | msgid " Include Carrier to delivery order with" |
4346 | 512 | msgstr "" | 507 | msgstr "" |
4347 | 513 | 508 | ||
4348 | 514 | #. module: esale_osc | ||
4349 | 515 | #: help:sale.order,orders_status_id:0 | 509 | #: help:sale.order,orders_status_id:0 |
4350 | 510 | #. module: esale_osc | ||
4351 | 516 | msgid "Indicates the actual status of order on Osc Web" | 511 | msgid "Indicates the actual status of order on Osc Web" |
4352 | 517 | msgstr "" | 512 | msgstr "" |
4353 | 518 | 513 | ||
4354 | 514 | #: view:esale.oscom.lang:0 | ||
4355 | 519 | #. module: esale_osc | 515 | #. module: esale_osc |
4356 | 520 | #: view:esale.oscom.lang:0 | ||
4357 | 521 | msgid "Language mapping" | 516 | msgid "Language mapping" |
4358 | 522 | msgstr "" | 517 | msgstr "" |
4359 | 523 | 518 | ||
4360 | 519 | #: view:esale.oscom.web:0 | ||
4361 | 524 | #. module: esale_osc | 520 | #. module: esale_osc |
4362 | 525 | #: view:esale.oscom.web:0 | ||
4363 | 526 | msgid "Import Taxes" | 521 | msgid "Import Taxes" |
4364 | 527 | msgstr "" | 522 | msgstr "" |
4365 | 528 | 523 | ||
4366 | 529 | #. module: esale_osc | ||
4367 | 530 | #: view:esale.oscom.paytype:0 | 524 | #: view:esale.oscom.paytype:0 |
4368 | 531 | #: view:esale.oscom.status:0 | 525 | #: view:esale.oscom.status:0 |
4369 | 532 | #: field:esale.oscom.web,pay_typ_ids:0 | 526 | #: field:esale.oscom.web,pay_typ_ids:0 |
4370 | 527 | #. module: esale_osc | ||
4371 | 533 | msgid "Payment types" | 528 | msgid "Payment types" |
4372 | 534 | msgstr "" | 529 | msgstr "" |
4373 | 535 | 530 | ||
4374 | 536 | #. module: esale_osc | ||
4375 | 537 | #: field:esale.oscom.web,active:0 | 531 | #: field:esale.oscom.web,active:0 |
4376 | 532 | #. module: esale_osc | ||
4377 | 538 | msgid "Active" | 533 | msgid "Active" |
4378 | 539 | msgstr "" | 534 | msgstr "" |
4379 | 540 | 535 | ||
4380 | 541 | #. module: esale_osc | ||
4381 | 542 | #: field:product.product,product_picture:0 | 536 | #: field:product.product,product_picture:0 |
4382 | 537 | #. module: esale_osc | ||
4383 | 543 | msgid "Product Picture" | 538 | msgid "Product Picture" |
4384 | 544 | msgstr "" | 539 | msgstr "" |
4385 | 545 | 540 | ||
4386 | 546 | #. module: esale_osc | ||
4387 | 547 | #: field:esale.oscom.web,status_ids:0 | 541 | #: field:esale.oscom.web,status_ids:0 |
4388 | 542 | #. module: esale_osc | ||
4389 | 548 | msgid "Osc Status" | 543 | msgid "Osc Status" |
4390 | 549 | msgstr "" | 544 | msgstr "" |
4391 | 550 | 545 | ||
4392 | 551 | #. module: esale_osc | ||
4393 | 552 | #: view:product.manufacturer:0 | 546 | #: view:product.manufacturer:0 |
4394 | 547 | #. module: esale_osc | ||
4395 | 553 | msgid "Manufacturer" | 548 | msgid "Manufacturer" |
4396 | 554 | msgstr "" | 549 | msgstr "" |
4397 | 555 | 550 | ||
4398 | 556 | #. module: esale_osc | ||
4399 | 557 | #: field:product.product,exp_date:0 | 551 | #: field:product.product,exp_date:0 |
4400 | 552 | #. module: esale_osc | ||
4401 | 558 | msgid "Expiry date" | 553 | msgid "Expiry date" |
4402 | 559 | msgstr "" | 554 | msgstr "" |
4403 | 560 | 555 | ||
4404 | 556 | #: view:esale.oscom.web:0 | ||
4405 | 561 | #. module: esale_osc | 557 | #. module: esale_osc |
4406 | 562 | #: view:esale.oscom.web:0 | ||
4407 | 563 | msgid "esale_oscom Shop Info" | 558 | msgid "esale_oscom Shop Info" |
4408 | 564 | msgstr "" | 559 | msgstr "" |
4409 | 565 | 560 | ||
4410 | 561 | #: view:esale.oscom.lang:0 | ||
4411 | 566 | #. module: esale_osc | 562 | #. module: esale_osc |
4412 | 567 | #: view:esale.oscom.lang:0 | ||
4413 | 568 | msgid "Language" | 563 | msgid "Language" |
4414 | 569 | msgstr "" | 564 | msgstr "" |
4415 | 570 | 565 | ||
4416 | 566 | #: view:esale.oscom.web:0 | ||
4417 | 571 | #. module: esale_osc | 567 | #. module: esale_osc |
4418 | 572 | #: view:esale.oscom.web:0 | ||
4419 | 573 | msgid "Import Payment Methods" | 568 | msgid "Import Payment Methods" |
4420 | 574 | msgstr "" | 569 | msgstr "" |
4421 | 575 | 570 | ||
4422 | 576 | #. module: esale_osc | ||
4423 | 577 | #: field:esale.oscom.product,product_id:0 | 571 | #: field:esale.oscom.product,product_id:0 |
4424 | 572 | #. module: esale_osc | ||
4425 | 578 | msgid "OpenERP product" | 573 | msgid "OpenERP product" |
4426 | 579 | msgstr "" | 574 | msgstr "" |
4427 | 580 | 575 | ||
4428 | 581 | #. module: esale_osc | ||
4429 | 582 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_web | 576 | #: model:ir.ui.menu,name:esale_osc.menu_action_esale_oscom_web |
4430 | 577 | #. module: esale_osc | ||
4431 | 583 | msgid "Websites" | 578 | msgid "Websites" |
4432 | 584 | msgstr "" | 579 | msgstr "" |
4433 | 585 | 580 | ||
4434 | 586 | #. module: esale_osc | ||
4435 | 587 | #: field:esale.oscom.product,esale_oscom_id:0 | 581 | #: field:esale.oscom.product,esale_oscom_id:0 |
4436 | 582 | #. module: esale_osc | ||
4437 | 588 | msgid "OScommerce product Id" | 583 | msgid "OScommerce product Id" |
4438 | 589 | msgstr "" | 584 | msgstr "" |
4439 | 590 | 585 | ||
4440 | 591 | #. module: esale_osc | ||
4441 | 592 | #: help:esale.oscom.web,date_download_from:0 | 586 | #: help:esale.oscom.web,date_download_from:0 |
4442 | 587 | #. module: esale_osc | ||
4443 | 593 | msgid "Specify date since you want to download modified or new products" | 588 | msgid "Specify date since you want to download modified or new products" |
4444 | 594 | msgstr "" | 589 | msgstr "" |
4445 | 595 | 590 | ||
4446 | 591 | #: view:esale.oscom.web:0 | ||
4447 | 596 | #. module: esale_osc | 592 | #. module: esale_osc |
4448 | 597 | #: view:esale.oscom.web:0 | ||
4449 | 598 | msgid "Import Categories" | 593 | msgid "Import Categories" |
4450 | 599 | msgstr "" | 594 | msgstr "" |
4451 | 600 | 595 | ||
4452 | 601 | #. module: esale_osc | ||
4453 | 602 | #: field:esale.oscom.category,category_id:0 | 596 | #: field:esale.oscom.category,category_id:0 |
4454 | 597 | #. module: esale_osc | ||
4455 | 603 | msgid "OpenERP category" | 598 | msgid "OpenERP category" |
4456 | 604 | msgstr "" | 599 | msgstr "" |
4457 | 605 | 600 | ||
4458 | 601 | #: view:product.product:0 | ||
4459 | 606 | #. module: esale_osc | 602 | #. module: esale_osc |
4460 | 607 | #: view:product.product:0 | ||
4461 | 608 | msgid "Link to Oscommerce" | 603 | msgid "Link to Oscommerce" |
4462 | 609 | msgstr "" | 604 | msgstr "" |
4463 | 610 | 605 | ||
4464 | 611 | #. module: esale_osc | ||
4465 | 612 | #: field:esale.oscom.paytype,payment_id:0 | 606 | #: field:esale.oscom.paytype,payment_id:0 |
4466 | 607 | #. module: esale_osc | ||
4467 | 613 | msgid "OpenERP payment" | 608 | msgid "OpenERP payment" |
4468 | 614 | msgstr "" | 609 | msgstr "" |
4469 | 615 | 610 | ||
4470 | 616 | #. module: esale_osc | ||
4471 | 617 | #: model:product.template,name:esale_osc.product_product_discount_coupon_product_template | 611 | #: model:product.template,name:esale_osc.product_product_discount_coupon_product_template |
4472 | 612 | #. module: esale_osc | ||
4473 | 618 | msgid "Discount Coupon" | 613 | msgid "Discount Coupon" |
4474 | 619 | msgstr "" | 614 | msgstr "" |
4475 | 620 | 615 | ||
4476 | 621 | #. module: esale_osc | ||
4477 | 622 | #: field:esale.oscom.web,intermediate:0 | 616 | #: field:esale.oscom.web,intermediate:0 |
4478 | 617 | #. module: esale_osc | ||
4479 | 623 | msgid "Intermediate Status" | 618 | msgid "Intermediate Status" |
4480 | 624 | msgstr "" | 619 | msgstr "" |
4481 | 625 | 620 | ||
4482 | 626 | #. module: esale_osc | ||
4483 | 627 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_draft | 621 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_draft |
4484 | 622 | #. module: esale_osc | ||
4485 | 628 | msgid "Request for quotation" | 623 | msgid "Request for quotation" |
4486 | 629 | msgstr "" | 624 | msgstr "" |
4487 | 630 | 625 | ||
4488 | 631 | #. module: esale_osc | ||
4489 | 632 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_manual | 626 | #: model:ir.ui.menu,name:esale_osc.menu_action_saleorder_tree_manual |
4490 | 627 | #. module: esale_osc | ||
4491 | 633 | msgid "Waiting invoice" | 628 | msgid "Waiting invoice" |
4492 | 634 | msgstr "" | 629 | msgstr "" |
4493 | 635 | 630 | ||
4494 | 636 | #. module: esale_osc | ||
4495 | 637 | #: model:product.template,name:esale_osc.product_product_cash_delivery_product_template | 631 | #: model:product.template,name:esale_osc.product_product_cash_delivery_product_template |
4496 | 632 | #. module: esale_osc | ||
4497 | 638 | msgid "Cash On Delivery" | 633 | msgid "Cash On Delivery" |
4498 | 639 | msgstr "" | 634 | msgstr "" |
4499 | 640 | 635 | ||
4500 | 636 | #: selection:product.product,in_out_stock:0 | ||
4501 | 641 | #. module: esale_osc | 637 | #. module: esale_osc |
4502 | 642 | #: selection:product.product,in_out_stock:0 | ||
4503 | 643 | msgid "Out Stock" | 638 | msgid "Out Stock" |
4504 | 644 | msgstr "" | 639 | msgstr "" |
4505 | 645 | 640 | ||
4506 | 646 | #. module: esale_osc | ||
4507 | 647 | #: model:product.category,name:esale_osc.cat_shipping_cost | 641 | #: model:product.category,name:esale_osc.cat_shipping_cost |
4508 | 648 | #: model:product.template,name:esale_osc.product_product_shipping_Cost_product_template | 642 | #: model:product.template,name:esale_osc.product_product_shipping_Cost_product_template |
4509 | 643 | #. module: esale_osc | ||
4510 | 649 | msgid "Shipping Cost" | 644 | msgid "Shipping Cost" |
4511 | 650 | msgstr "" | 645 | msgstr "" |
4512 | 651 | 646 | ||
4513 | 652 | #. module: esale_osc | ||
4514 | 653 | #: model:ir.model,name:esale_osc.model_esale_oscom_lang | 647 | #: model:ir.model,name:esale_osc.model_esale_oscom_lang |
4515 | 648 | #. module: esale_osc | ||
4516 | 654 | msgid "esale_oscom Language" | 649 | msgid "esale_oscom Language" |
4517 | 655 | msgstr "" | 650 | msgstr "" |
4518 | 656 | 651 | ||
4519 | 657 | #. module: esale_osc | ||
4520 | 658 | #: field:product.product,spe_price:0 | 652 | #: field:product.product,spe_price:0 |
4521 | 653 | #. module: esale_osc | ||
4522 | 659 | msgid "Special price" | 654 | msgid "Special price" |
4523 | 660 | msgstr "" | 655 | msgstr "" |
4524 | 661 | 656 | ||
4525 | 657 | #: view:sale.order:0 | ||
4526 | 662 | #. module: esale_osc | 658 | #. module: esale_osc |
4527 | 663 | #: view:sale.order:0 | ||
4528 | 664 | msgid "Sales Orders" | 659 | msgid "Sales Orders" |
4529 | 665 | msgstr "" | 660 | msgstr "" |
4530 | 666 | 661 | ||
4531 | 667 | #. module: esale_osc | ||
4532 | 668 | #: constraint:ir.model:0 | 662 | #: constraint:ir.model:0 |
4533 | 663 | #. module: esale_osc | ||
4534 | 669 | msgid "The Object name must start with x_ and not contain any special character !" | 664 | msgid "The Object name must start with x_ and not contain any special character !" |
4535 | 670 | msgstr "" | 665 | msgstr "" |
4536 | 671 | 666 | ||
4537 | 672 | #. module: esale_osc | ||
4538 | 673 | #: field:sale.order,shipping_agency:0 | 667 | #: field:sale.order,shipping_agency:0 |
4539 | 668 | #. module: esale_osc | ||
4540 | 674 | msgid "Carrier Partner" | 669 | msgid "Carrier Partner" |
4541 | 675 | msgstr "" | 670 | msgstr "" |
4542 | 676 | 671 | ||
4543 | 672 | #: view:esale.oscom.product:0 | ||
4544 | 677 | #. module: esale_osc | 673 | #. module: esale_osc |
4545 | 678 | #: view:esale.oscom.product:0 | ||
4546 | 679 | msgid "Product Information" | 674 | msgid "Product Information" |
4547 | 680 | msgstr "" | 675 | msgstr "" |
4548 | 681 | 676 | ||
4549 | 682 | #. module: esale_osc | ||
4550 | 683 | #: view:esale.oscom.category:0 | 677 | #: view:esale.oscom.category:0 |
4551 | 684 | #: field:esale.oscom.web,category_ids:0 | 678 | #: field:esale.oscom.web,category_ids:0 |
4552 | 679 | #. module: esale_osc | ||
4553 | 685 | msgid "Categories" | 680 | msgid "Categories" |
4554 | 686 | msgstr "" | 681 | msgstr "" |
4555 | 687 | 682 | ||
4556 | 683 | #: view:product.product:0 | ||
4557 | 688 | #. module: esale_osc | 684 | #. module: esale_osc |
4558 | 689 | #: view:product.product:0 | ||
4559 | 690 | msgid "Other information" | 685 | msgid "Other information" |
4560 | 691 | msgstr "" | 686 | msgstr "" |
4561 | 692 | 687 | ||
4562 | 688 | #: view:esale.oscom.status:0 | ||
4563 | 693 | #. module: esale_osc | 689 | #. module: esale_osc |
4564 | 694 | #: view:esale.oscom.status:0 | ||
4565 | 695 | msgid "Osc status" | 690 | msgid "Osc status" |
4566 | 696 | msgstr "" | 691 | msgstr "" |
4567 | 697 | 692 | ||
4568 | 698 | #. module: esale_osc | ||
4569 | 699 | #: field:esale.oscom.web,price_type:0 | 693 | #: field:esale.oscom.web,price_type:0 |
4570 | 694 | #. module: esale_osc | ||
4571 | 700 | msgid "Price type" | 695 | msgid "Price type" |
4572 | 701 | msgstr "" | 696 | msgstr "" |
4573 | 702 | 697 | ||
4574 | 698 | #: view:esale.oscom.product:0 | ||
4575 | 703 | #. module: esale_osc | 699 | #. module: esale_osc |
4576 | 704 | #: view:esale.oscom.product:0 | ||
4577 | 705 | msgid "Product" | 700 | msgid "Product" |
4578 | 706 | msgstr "" | 701 | msgstr "" |
4579 | 707 | 702 | ||
4580 | 708 | #. module: esale_osc | ||
4581 | 709 | #: field:sale.order,pay_met_title:0 | 703 | #: field:sale.order,pay_met_title:0 |
4582 | 704 | #. module: esale_osc | ||
4583 | 710 | msgid "Payment Method" | 705 | msgid "Payment Method" |
4584 | 711 | msgstr "" | 706 | msgstr "" |
4585 | 712 | 707 | ||
4586 | 713 | #. module: esale_osc | ||
4587 | 714 | #: wizard_view:esale.oscom.select.stocks,init:0 | 708 | #: wizard_view:esale.oscom.select.stocks,init:0 |
4588 | 715 | #: wizard_view:esale.oscom.stocks,init:0 | 709 | #: wizard_view:esale.oscom.stocks,init:0 |
4589 | 710 | #. module: esale_osc | ||
4590 | 716 | msgid "Stock Update" | 711 | msgid "Stock Update" |
4591 | 717 | msgstr "" | 712 | msgstr "" |
4592 | 718 | 713 | ||
4593 | 719 | #. module: esale_osc | ||
4594 | 720 | #: field:esale.oscom.category,esale_oscom_id:0 | 714 | #: field:esale.oscom.category,esale_oscom_id:0 |
4595 | 721 | #: field:esale.oscom.lang,esale_oscom_id:0 | 715 | #: field:esale.oscom.lang,esale_oscom_id:0 |
4596 | 722 | #: field:esale.oscom.paytype,esale_oscom_id:0 | 716 | #: field:esale.oscom.paytype,esale_oscom_id:0 |
4597 | @@ -724,76 +718,76 @@ | |||
4598 | 724 | #: field:esale.oscom.tax,esale_oscom_id:0 | 718 | #: field:esale.oscom.tax,esale_oscom_id:0 |
4599 | 725 | #: field:res.partner,esale_oscom_id:0 | 719 | #: field:res.partner,esale_oscom_id:0 |
4600 | 726 | #: field:res.partner.address,esale_oscom_id:0 | 720 | #: field:res.partner.address,esale_oscom_id:0 |
4601 | 721 | #. module: esale_osc | ||
4602 | 727 | msgid "OScommerce Id" | 722 | msgid "OScommerce Id" |
4603 | 728 | msgstr "" | 723 | msgstr "" |
4604 | 729 | 724 | ||
4605 | 730 | #. module: esale_osc | ||
4606 | 731 | #: field:sale.order,orders_status:0 | 725 | #: field:sale.order,orders_status:0 |
4607 | 726 | #. module: esale_osc | ||
4608 | 732 | msgid "Osc Status Inic" | 727 | msgid "Osc Status Inic" |
4609 | 733 | msgstr "" | 728 | msgstr "" |
4610 | 734 | 729 | ||
4611 | 730 | #: view:esale.oscom.web:0 | ||
4612 | 735 | #. module: esale_osc | 731 | #. module: esale_osc |
4613 | 736 | #: view:esale.oscom.web:0 | ||
4614 | 737 | msgid "Import and create/update Categories" | 732 | msgid "Import and create/update Categories" |
4615 | 738 | msgstr "" | 733 | msgstr "" |
4616 | 739 | 734 | ||
4617 | 735 | #: view:esale.oscom.web:0 | ||
4618 | 740 | #. module: esale_osc | 736 | #. module: esale_osc |
4619 | 741 | #: view:esale.oscom.web:0 | ||
4620 | 742 | msgid "Import all products from OSCommerce" | 737 | msgid "Import all products from OSCommerce" |
4621 | 743 | msgstr "" | 738 | msgstr "" |
4622 | 744 | 739 | ||
4623 | 745 | #. module: esale_osc | ||
4624 | 746 | #: field:sale.order,send_web_email:0 | 740 | #: field:sale.order,send_web_email:0 |
4625 | 741 | #. module: esale_osc | ||
4626 | 747 | msgid "Send web E-mail" | 742 | msgid "Send web E-mail" |
4627 | 748 | msgstr "" | 743 | msgstr "" |
4628 | 749 | 744 | ||
4629 | 750 | #. module: esale_osc | ||
4630 | 751 | #: field:sale.order,additional_info:0 | 745 | #: field:sale.order,additional_info:0 |
4631 | 746 | #. module: esale_osc | ||
4632 | 752 | msgid "Aditional Info" | 747 | msgid "Aditional Info" |
4633 | 753 | msgstr "" | 748 | msgstr "" |
4634 | 754 | 749 | ||
4635 | 750 | #: view:sale.order:0 | ||
4636 | 755 | #. module: esale_osc | 751 | #. module: esale_osc |
4637 | 756 | #: view:sale.order:0 | ||
4638 | 757 | msgid "Options selected will be applied on changing osc order status" | 752 | msgid "Options selected will be applied on changing osc order status" |
4639 | 758 | msgstr "" | 753 | msgstr "" |
4640 | 759 | 754 | ||
4641 | 760 | #. module: esale_osc | ||
4642 | 761 | #: help:sale.order,number_of_packages:0 | 755 | #: help:sale.order,number_of_packages:0 |
4643 | 756 | #. module: esale_osc | ||
4644 | 762 | msgid "Include number of packages to send" | 757 | msgid "Include number of packages to send" |
4645 | 763 | msgstr "" | 758 | msgstr "" |
4646 | 764 | 759 | ||
4647 | 765 | #. module: esale_osc | ||
4648 | 766 | #: field:esale.oscom.category,name:0 | 760 | #: field:esale.oscom.category,name:0 |
4649 | 767 | #: field:esale.oscom.lang,name:0 | 761 | #: field:esale.oscom.lang,name:0 |
4650 | 768 | #: field:esale.oscom.paytype,name:0 | 762 | #: field:esale.oscom.paytype,name:0 |
4651 | 769 | #: field:esale.oscom.product,name:0 | 763 | #: field:esale.oscom.product,name:0 |
4652 | 770 | #: field:esale.oscom.web,name:0 | 764 | #: field:esale.oscom.web,name:0 |
4653 | 771 | #: field:product.manufacturer,name:0 | 765 | #: field:product.manufacturer,name:0 |
4654 | 766 | #. module: esale_osc | ||
4655 | 772 | msgid "Name" | 767 | msgid "Name" |
4656 | 773 | msgstr "" | 768 | msgstr "" |
4657 | 774 | 769 | ||
4658 | 770 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4659 | 775 | #. module: esale_osc | 771 | #. module: esale_osc |
4660 | 776 | #: selection:esale.oscom.paytype,paytyp:0 | ||
4661 | 777 | msgid "Invoice Confirmed" | 772 | msgid "Invoice Confirmed" |
4662 | 778 | msgstr "" | 773 | msgstr "" |
4663 | 779 | 774 | ||
4664 | 780 | #. module: esale_osc | ||
4665 | 781 | #: field:esale.oscom.paytype,paytyp:0 | 775 | #: field:esale.oscom.paytype,paytyp:0 |
4666 | 776 | #. module: esale_osc | ||
4667 | 782 | msgid "Payment type" | 777 | msgid "Payment type" |
4668 | 783 | msgstr "" | 778 | msgstr "" |
4669 | 784 | 779 | ||
4670 | 785 | #. module: esale_osc | ||
4671 | 786 | #: view:esale.oscom.tax:0 | 780 | #: view:esale.oscom.tax:0 |
4672 | 787 | #: field:esale.oscom.web,tax_ids:0 | 781 | #: field:esale.oscom.web,tax_ids:0 |
4673 | 782 | #. module: esale_osc | ||
4674 | 788 | msgid "Taxes" | 783 | msgid "Taxes" |
4675 | 789 | msgstr "" | 784 | msgstr "" |
4676 | 790 | 785 | ||
4677 | 791 | #. module: esale_osc | ||
4678 | 792 | #: field:esale.oscom.web,shop_id:0 | 786 | #: field:esale.oscom.web,shop_id:0 |
4679 | 787 | #. module: esale_osc | ||
4680 | 793 | msgid "Sale shop" | 788 | msgid "Sale shop" |
4681 | 794 | msgstr "" | 789 | msgstr "" |
4682 | 795 | 790 | ||
4683 | 796 | #. module: esale_osc | ||
4684 | 797 | #: field:account.invoice,esale_oscom_web:0 | 791 | #: field:account.invoice,esale_oscom_web:0 |
4685 | 798 | #: field:esale.oscom.category,web_id:0 | 792 | #: field:esale.oscom.category,web_id:0 |
4686 | 799 | #: field:esale.oscom.lang,web_id:0 | 793 | #: field:esale.oscom.lang,web_id:0 |
4687 | @@ -802,52 +796,88 @@ | |||
4688 | 802 | #: field:esale.oscom.status,web_id:0 | 796 | #: field:esale.oscom.status,web_id:0 |
4689 | 803 | #: field:esale.oscom.tax,web_id:0 | 797 | #: field:esale.oscom.tax,web_id:0 |
4690 | 804 | #: field:sale.order,esale_oscom_web:0 | 798 | #: field:sale.order,esale_oscom_web:0 |
4691 | 799 | #. module: esale_osc | ||
4692 | 805 | msgid "Website" | 800 | msgid "Website" |
4693 | 806 | msgstr "" | 801 | msgstr "" |
4694 | 807 | 802 | ||
4695 | 803 | #: view:sale.order:0 | ||
4696 | 808 | #. module: esale_osc | 804 | #. module: esale_osc |
4697 | 809 | #: view:sale.order:0 | ||
4698 | 810 | msgid "Os Commerce Information" | 805 | msgid "Os Commerce Information" |
4699 | 811 | msgstr "" | 806 | msgstr "" |
4700 | 812 | 807 | ||
4701 | 813 | #. module: esale_osc | ||
4702 | 814 | #: wizard_view:esale.oscom.select.stocks,init:0 | 808 | #: wizard_view:esale.oscom.select.stocks,init:0 |
4703 | 815 | #: wizard_view:esale.oscom.stocks,init:0 | 809 | #: wizard_view:esale.oscom.stocks,init:0 |
4704 | 810 | #. module: esale_osc | ||
4705 | 816 | msgid "Stock succesfully updated" | 811 | msgid "Stock succesfully updated" |
4706 | 817 | msgstr "" | 812 | msgstr "" |
4707 | 818 | 813 | ||
4708 | 814 | #: view:esale.oscom.tax:0 | ||
4709 | 819 | #. module: esale_osc | 815 | #. module: esale_osc |
4710 | 820 | #: view:esale.oscom.tax:0 | ||
4711 | 821 | msgid "Taxes mapping" | 816 | msgid "Taxes mapping" |
4712 | 822 | msgstr "" | 817 | msgstr "" |
4713 | 823 | 818 | ||
4714 | 824 | #. module: esale_osc | ||
4715 | 825 | #: field:esale.oscom.status,name:0 | 819 | #: field:esale.oscom.status,name:0 |
4716 | 820 | #. module: esale_osc | ||
4717 | 826 | msgid "Status name" | 821 | msgid "Status name" |
4718 | 827 | msgstr "" | 822 | msgstr "" |
4719 | 828 | 823 | ||
4720 | 824 | #: selection:esale.oscom.web,price_type:0 | ||
4721 | 829 | #. module: esale_osc | 825 | #. module: esale_osc |
4722 | 830 | #: selection:esale.oscom.web,price_type:0 | ||
4723 | 831 | msgid "Untaxed price" | 826 | msgid "Untaxed price" |
4724 | 832 | msgstr "" | 827 | msgstr "" |
4725 | 833 | 828 | ||
4726 | 834 | #. module: esale_osc | ||
4727 | 835 | #: help:sale.order,orders_status:0 | 829 | #: help:sale.order,orders_status:0 |
4728 | 830 | #. module: esale_osc | ||
4729 | 836 | msgid "Indicates the initial status of order on Osc Web" | 831 | msgid "Indicates the initial status of order on Osc Web" |
4730 | 837 | msgstr "" | 832 | msgstr "" |
4731 | 838 | 833 | ||
4732 | 834 | #: constraint:product.product:0 | ||
4733 | 839 | #. module: esale_osc | 835 | #. module: esale_osc |
4734 | 840 | #: constraint:product.product:0 | ||
4735 | 841 | msgid "Error: Invalid ean code" | 836 | msgid "Error: Invalid ean code" |
4736 | 842 | msgstr "" | 837 | msgstr "" |
4737 | 843 | 838 | ||
4738 | 844 | #. module: esale_osc | ||
4739 | 845 | #: field:sale.order,status_comment:0 | 839 | #: field:sale.order,status_comment:0 |
4740 | 840 | #. module: esale_osc | ||
4741 | 846 | msgid "Status Comment" | 841 | msgid "Status Comment" |
4742 | 847 | msgstr "" | 842 | msgstr "" |
4743 | 848 | 843 | ||
4744 | 849 | #. module: esale_osc | ||
4745 | 850 | #: field:product.product,in_out_stock:0 | 844 | #: field:product.product,in_out_stock:0 |
4746 | 845 | #. module: esale_osc | ||
4747 | 851 | msgid "In/Out Stock" | 846 | msgid "In/Out Stock" |
4748 | 852 | msgstr "" | 847 | msgstr "" |
4749 | 853 | 848 | ||
4750 | 849 | #. module: esale_osc | ||
4751 | 850 | msgid "" | ||
4752 | 851 | "Default product named \'Shipping Cost\' will be used.\n" | ||
4753 | 852 | "In case it doesn\'t exist, please create it" | ||
4754 | 853 | msgstr "" | ||
4755 | 854 | |||
4756 | 855 | #. module: esale_osc | ||
4757 | 856 | #: field:esale.oscom.web,admin_user:0 | ||
4758 | 857 | msgid "Admin User" | ||
4759 | 858 | msgstr "" | ||
4760 | 859 | |||
4761 | 860 | #. module: esale_osc | ||
4762 | 861 | #: field:esale.oscom.web,admin_pass:0 | ||
4763 | 862 | msgid "Admin Pass" | ||
4764 | 863 | msgstr "" | ||
4765 | 864 | |||
4766 | 865 | #. module: esale_osc | ||
4767 | 866 | #: field:esale.oscom.web,default_partner_category:0 | ||
4768 | 867 | msgid "Customers partner category" | ||
4769 | 868 | msgstr "" | ||
4770 | 869 | |||
4771 | 870 | #. module: esale_osc | ||
4772 | 871 | #: field:esale.oscom.web,download_number:30 | ||
4773 | 872 | msgid "Download number" | ||
4774 | 873 | msgstr "" | ||
4775 | 874 | |||
4776 | 875 | #. module: esale_osc | ||
4777 | 876 | #: field:esale.oscom.web,override_products_data:0 | ||
4778 | 877 | msgid "Override Products Data" | ||
4779 | 878 | msgstr "" | ||
4780 | 879 | |||
4781 | 880 | #. module: esale_osc | ||
4782 | 881 | #: help:esale.oscom.web,override_products_data:0 | ||
4783 | 882 | msgid "Click if you want to Update products data on the shop with changes made in openerp." | ||
4784 | 883 | msgstr "" | ||
4785 | 854 | \ No newline at end of file | 884 | \ No newline at end of file |
4786 | 855 | 885 | ||
4787 | === modified file 'esale_osc/wizard/wizard_esale_oscom_update_select_stocks.py' | |||
4788 | --- esale_osc/wizard/wizard_esale_oscom_update_select_stocks.py 2010-01-21 09:33:17 +0000 | |||
4789 | +++ esale_osc/wizard/wizard_esale_oscom_update_select_stocks.py 2010-07-21 10:31:39 +0000 | |||
4790 | @@ -1,3 +1,4 @@ | |||
4791 | 1 | # -*- coding: utf-8 -*- | ||
4792 | 1 | # -*- encoding: utf-8 -*- | 2 | # -*- encoding: utf-8 -*- |
4793 | 2 | ############################################################################## | 3 | ############################################################################## |
4794 | 3 | # | 4 | # |