Merge lp:~magentoerpconnect-community/magentoerpconnect/955234 into lp:magentoerpconnect/oerp6.1-oldstable

Status: Merged
Merge reported by: Guewen Baconnier @ Camptocamp
Merged at revision: not available
Proposed branch: lp:~magentoerpconnect-community/magentoerpconnect/955234
Merge into: lp:magentoerpconnect/oerp6.1-oldstable
Diff against target: 27 lines (+4/-2)
2 files modified
magentoerpconnect/product.py (+2/-0)
magentoerpconnect/sale.py (+2/-2)
To merge this branch: bzr merge lp:~magentoerpconnect-community/magentoerpconnect/955234
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Disapprove
Review via email: mp+97478@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hi,

thanks for your patch proposition.

In fact, this is not a problem in product.product.export_inventory.
This method is responsible to export the stock of the input ids.

The cron and the button trigger the method export_inventory on the sale.shop and this one has the responsibility to call product.product.export_inventory with the set of ids exportable products of the shop.

So if a fix has to be done, that's on sale.shop.export_inventory, but this one is abstracted in base_sale_multichannels. So which branch do you use for base_sale_multichannels?

review: Disapprove
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

Thanks for the explanation.

I use lp:on-change-suuport-extra-addons for the moment, but I will get back to lp:extra-addons once it's merged.

Will this module stay in this branch or moved to some other project?

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Btw the rest has to be merged, thanks

558. By Maxime Chambreuil (http://www.savoirfairelinux.com)

Remove previous commit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'magentoerpconnect/product.py'
--- magentoerpconnect/product.py 2012-03-14 14:05:05 +0000
+++ magentoerpconnect/product.py 2012-03-14 18:46:20 +0000
@@ -1178,6 +1178,8 @@
1178 quantities.update({sku: x[1]})1178 quantities.update({sku: x[1]})
1179 if child_ids: #it is an assembly and it contains the products child_ids: 1179 if child_ids: #it is an assembly and it contains the products child_ids:
1180 self.ext_export(cr, uid, child_ids, external_referential_ids, defaults, context) #so we export them1180 self.ext_export(cr, uid, child_ids, external_referential_ids, defaults, context) #so we export them
1181 else:
1182 return False
1181 else:1183 else:
1182 logger.notifyChannel('ext synchro', netsvc.LOG_ERROR, "OpenERP 'grouped' products will export to Magento as 'grouped products' only if they have a BOM and if the 'mrp' BOM module is installed")1184 logger.notifyChannel('ext synchro', netsvc.LOG_ERROR, "OpenERP 'grouped' products will export to Magento as 'grouped products' only if they have a BOM and if the 'mrp' BOM module is installed")
1183 return quantities, child_ids1185 return quantities, child_ids
11841186
=== modified file 'magentoerpconnect/sale.py'
--- magentoerpconnect/sale.py 2012-03-12 10:02:51 +0000
+++ magentoerpconnect/sale.py 2012-03-14 18:46:20 +0000
@@ -279,8 +279,8 @@
279 if ids:279 if ids:
280 callback(cr, uid, ids, context=context)280 callback(cr, uid, ids, context=context)
281281
282 tools.debug(callback)282 # tools.debug(callback)
283 tools.debug(ids)283 # tools.debug(ids)
284 return True284 return True
285285
286 # Schedules functions ============ #286 # Schedules functions ============ #