Latest Trunk: Create sales order.

Bug #1090931 reported by Давид
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Hello,

Steps to produce bug:
------------------------------

    Create sales order. Add 2 products. Then duplicate this sales record.

    Add one more product in duplicated sales order and remove others product and save sales order.

This bug with latest trunk.
------------------------------------
Server Traceback (most recent call last):
  File "/home/livetrunk/static/trunk/server/openerp/addons/web/session.py", line 87, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/livetrunk/static/trunk/server/openerp/netsvc.py", line 281, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/livetrunk/static/trunk/server/openerp/service/web_services.py", line 603, in dispatch
    res = fn(db, uid, *params)
  File "/home/livetrunk/static/trunk/server/openerp/osv/osv.py", line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/livetrunk/static/trunk/server/openerp/osv/osv.py", line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/livetrunk/static/trunk/server/openerp/osv/osv.py", line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/livetrunk/static/trunk/server/openerp/addons/audittrail/audittrail.py", line 514, in execute_cr
    return fct_src(cr, uid, model, method, *args, **kw)
  File "/home/livetrunk/static/trunk/server/openerp/osv/osv.py", line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/livetrunk/static/trunk/server/openerp/addons/sale_stock/sale_stock.py", line 65, in write
    return super(sale_order, self).write(cr, uid, ids, vals, context=context)
  File "/home/livetrunk/static/trunk/server/openerp/addons/sale_crm/sale_crm.py", line 45, in write
    return super(sale_order, self).write(cr, uid, ids, vals, context=context)
  File "/home/livetrunk/static/trunk/server/openerp/osv/orm.py", line 4145, in write
    result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or []
  File "/home/livetrunk/static/trunk/server/openerp/osv/fields.py", line 553, in set
    obj.unlink(cr, user, [act[1]], context=context)
  File "/home/livetrunk/static/trunk/server/openerp/addons/sale/sale.py", line 1010, in unlink
    return super(sale_order_line, self).unlink(cr, uid, ids, context=context)
  File "/home/livetrunk/static/trunk/server/openerp/osv/orm.py", line 3916, in unlink
    result_store = self._store_get_values(cr, uid, ids, self._all_columns.keys(), context)
  File "/home/livetrunk/static/trunk/server/openerp/osv/orm.py", line 4501, in _store_get_values
    target_ids = [id for id in function[id_mapping_fnct_](self, cr, SUPERUSER_ID, ids, context) if id]
  File "/home/livetrunk/static/trunk/server/openerp/addons/sale_margin/sale_margin.py", line 73, in _get_order
    return super(sale_order, self)._get_order(cr, uid, ids, context=context)
TypeError: super(type, obj): obj must be an instance or subtype of type

Thanks,
Kettor

Related branches

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

We confirm the error.

AFAIK, the method used within store, cannot use super().

Thanks.

Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
importance: Undecided → Low
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Attached is the merge,

Thanks.

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Contributed fix landed at revision 8400 rev-id: <email address hidden>

Thanks for reporting and fixing!

Changed in openobject-addons:
milestone: none → 7.0
status: Confirmed → Fix Released
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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