Community mailing list archives


Re: How To Pevent Negataive issued Quantity in Stock

Ferdinand Gassauer
- 03/01/2015 07:10:45
On 2015-02-27 22:07, Houssine BAKKALI wrote:
<blockquote cite="" type="cite">


You could in a first step just make it compatible with the new data model on v8 sticking to the old api to reduce the cost and speed up the release.

I just installed a test v8 purchase,sales,mpr and wms  from OCA to reverse engineer how quants are working
git show
commit 9b9e3f545d5017933933059b8dcd79231ef5b3c6
Merge: bb68d20 e5a94f7
Author: OCA git bot <>
Date:   Sat Feb 28 23:42:20 2015 +0100

    Merge remote-tracking branch 'odoo/8.0' into 8.0

unfortunately error when creating a purchase order

2015-03-01 12:09:22,204 25205 ERROR test8 openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
  File "/home/ferdinand/git/oca/OCB/openerp/", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/service/", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 796, in __call__
    return self.method(*args, **kw)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 396, in response_wrap
    response = f(*args, **kw)
  File "/home/gass/git/oca/OCB/addons/web/controllers/", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/gass/git/oca/OCB/addons/web/controllers/", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(, request.uid, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 363, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/", line 5743, in onchange
    method_res = getattr(self._model, method)(*args, context=self._context)
TypeError: unhashable type: 'list'

nevertheless looking into quants:

<img src="" alt="">

I suppose one has to check for negative quantity on internal locations.

installing a module checking negative quantity will likely break installation of standard modules which create negative quant quantities.

so for now I will not continue investigation.

<blockquote cite="" type="cite">

My two cents

Le 27 févr. 2015 14:52, "Ferdinand Gassauer" <> a écrit :
On 2015-02-27 17:22, Lionel Sausin wrote:
> Le 27/02/2015 12:18, Ferdinand Gassauer a écrit :
> > it think it will need a complete rewrite, as the underlying data model
> > changed (quants)
> > it is necessary to check/prohibit negative quantity for each internal
> > location_id.
> > so not for now.
> Fair enough, and would you consider porting/rewriting it for a fee?
> If enough here are interested, we could share the funding, possibly
> using OCA as an trusted intermediate.
let me see, I am not yet familiar with the new v8 api, so I have 
problems to estiamte time and costs
> _______________________________________________
> Mailing-List:
> Post to:
> Unsubscribe:

Post to:

Post to: