openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #05034
[Merge] lp:~ajite/openobject-addons/elico-7.0-imp-intercompany-000001 into lp:~openerp-community/openobject-addons/elico-7.0
Augustin Cisterne-Kaas - www.elico-corp.com has proposed merging lp:~ajite/openobject-addons/elico-7.0-imp-intercompany-000001 into lp:~openerp-community/openobject-addons/elico-7.0.
Requested reviews:
LIN Yu (lin-yu)
For more details, see:
https://code.launchpad.net/~ajite/openobject-addons/elico-7.0-imp-intercompany-000001/+merge/207813
[FIX] Fixed a bug that was preventing a user to create normal SO/PO
--
https://code.launchpad.net/~ajite/openobject-addons/elico-7.0-imp-intercompany-000001/+merge/207813
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/elico-7.0.
=== modified file 'base_intercompany/unit/export_synchronizer.py'
--- base_intercompany/unit/export_synchronizer.py 2014-02-18 12:28:09 +0000
+++ base_intercompany/unit/export_synchronizer.py 2014-02-23 01:07:25 +0000
@@ -128,19 +128,24 @@
for icops in self._get_icops():
backend = self._get_backend_with_permission(icops)
self._set_icops(icops, backend)
- try:
- map_record = self._map_data(fields=fields)
- except MappingError as e:
- continue
+ map_record = self._map_data(fields=fields)
if self.icops_ids:
- record = self._update_data(map_record, fields=fields)
+ record = None
+ try:
+ record = self._update_data(map_record, fields=fields)
+ except MappingError as e:
+ continue
if not record:
continue
nb_records += 1
self._validate_data(record)
self._routing(record, fields)
else:
- record = self._create_data(map_record, fields=fields)
+ record = None
+ try:
+ record = self._create_data(map_record, fields=fields)
+ except MappingError as e:
+ continue
if not record:
continue
nb_records += 1
Follow ups