OpenERP fixed stock_move.date_planned typo on OpenERP v6, we are impacted.

Bug #667735 reported by Raphaël Valyi - http://www.akretion.com
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
Undecided
Unassigned

Bug Description

Hello,

Looks like OpenERP SA finally took care of that renaming the stock_move.date_planned field into stock_move.date_expected on OpenERP v6.

the magentoerpconnect module should follow that change on the v6 serie. A trivial sed script will do it.

We should ensure that date_expected is what stands for date_planned though.

Revision history for this message
ag2888 (q-contact-gdaudit-com) wrote :

Exactly !

Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : fr_FR.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/addons/base_sale_multichannels/sale.py", line 170, in export_catalog
    self.export_inventory(cr, uid, ids, ctx)
  File "/opt/openerp/addons/base_sale_multichannels/sale.py", line 181, in export_inventory
    recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date_planned', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')])
  File "/opt/openerp/server/bin/osv/orm.py", line 1804, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/openerp/server/bin/osv/orm.py", line 4035, in _search
    cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
  File "/opt/openerp/server/bin/sql_db.py", line 75, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/bin/sql_db.py", line 122, in execute
    res = self._obj.execute(query, params)
ProgrammingError: ERREUR: la colonne stock_move.date_planned n'existe pas
LIGNE 1 : SELECT "stock_move".id FROM "stock_move" WHERE (stock_move.d...
                                                          ^

Sincerely

Revision history for this message
ag2888 (q-contact-gdaudit-com) wrote :

Update file sale.py line 181 from :

recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date_planned', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')])

to

recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date_expected', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')])

All done :)

Revision history for this message
Hillebrand Dalstra (hillebrand-dalstra) wrote :

I can confirm this issue.

ag2888's fix solved the problem for me.

Revision history for this message
Raimon Esteve (www.zikzakmedia.com) (resteve) wrote :

OpenERP 6 rc2

ProgrammingError: column stock_move.date_planned does not exist
LINE 1: SELECT "stock_move".id FROM "stock_move" WHERE (stock_move.d..

If you see psql, stock_move table don't exist date_planned field. (it's rename date_planned to date in OpenERP 6?)

This code is necessary update in sale.py of base_sale_multichannels. Replace date_planned to date.

            if shop.last_inventory_export_date:
                recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')])

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 667735] Re: OpenERP fixed stock_move.date_planned typo on OpenERP v6, we are impacted.

Hello Raimon, you are absolutely right!

I'll apply your patch

On Wed, Jan 12, 2011 at 1:29 PM, Raimon Esteve (Zikzakmedia) <
<email address hidden>> wrote:

> OpenERP 6 rc2
>
> ProgrammingError: column stock_move.date_planned does not exist
> LINE 1: SELECT "stock_move".id FROM "stock_move" WHERE (stock_move.d..
>
> If you see psql, stock_move table don't exist date_planned field. (it's
> rename date_planned to date in OpenERP 6?)
>
> This code is necessary update in sale.py of base_sale_multichannels.
> Replace date_planned to date.
>
> if shop.last_inventory_export_date:
> recent_move_ids = self.pool.get('stock.move').search(cr,
> uid, [('date', '>', shop.last_inventory_export_date), ('product_id', 'in',
> product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')])
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/667735
>
> Title:
> OpenERP fixed stock_move.date_planned typo on OpenERP v6, we are
> impacted.
>
> Status in Magento Open ERP Connector:
> New
>
> Bug description:
> Hello,
>
> Looks like OpenERP SA finally took care of that renaming the
> stock_move.date_planned field into stock_move.date_expected on OpenERP
> v6.
>
> the magentoerpconnect module should follow that change on the v6
> serie. A trivial sed script will do it.
>
> We should ensure that date_expected is what stands for date_planned
> though.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/magentoerpconnect/+bug/667735/+subscribe
>

Revision history for this message
Kyle Waid (midwest) wrote :

This fix was committed

Changed in magentoerpconnect:
status: New → Fix Committed
Changed in magentoerpconnect:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.