Community mailing list archives

community@mail.odoo.com

Re: How To Pevent Negataive issued Quantity in Stock

by
Ferdinand Gassauer
- 03/01/2015 07:10:45
On 2015-02-27 22:07, Houssine BAKKALI wrote:
<blockquote cite="mid:CANNbhR-qbdhrXkbCKJiU4_4xVEmgSWiMt-FeU5p-rM+4gyz5Gg@mail.gmail.com" type="cite">

Ferdinand,

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 <OCA-git-bot@therp.nl>
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/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/ferdinand/git/oca/OCB/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/home/ferdinand/git/oca/OCB/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/ferdinand/git/oca/OCB/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/home/ferdinand/git/oca/OCB/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/home/gass/git/oca/OCB/addons/web/controllers/main.py", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/gass/git/oca/OCB/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/api.py", line 363, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/ferdinand/git/oca/OCB/openerp/models.py", line 5743, in onchange
    method_res = getattr(self._model, method)(*args, context=self._context)
TypeError: unhashable type: 'list'


nevertheless looking into quants:

<img src="cid:part1.09030005.03050001@camptocamp.com" 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="mid:CANNbhR-qbdhrXkbCKJiU4_4xVEmgSWiMt-FeU5p-rM+4gyz5Gg@mail.gmail.com" type="cite">

My two cents

Le 27 févr. 2015 14:52, "Ferdinand Gassauer" <ferdinand.gassauer@camptocamp.com> 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: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe