Issue for stock_picking_cancel_extended (#1,324)
Status: OPEN
Date: 10/06/2021
ID: 1,324
S/O number: SO2019/669279
Reviewer: Tirth Mehta
Module Name: stock_picking_cancel_extended
Version: 12.0
Tags:

Assigned to
Contact
Hanee Patel
hanee.patel@browseinfo.in

Description
In Odoo version 12, i make set to draft error occur below:



Error:

Odoo Server Error



Traceback (most recent call last):

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 656, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 314, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 698, in dispatch

result = self._call_function(**self.params)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 346, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/service/model.py", line 97, in wrapper

return f(dbname, *args, **kwargs)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 339, in checked_call

result = self.endpoint(*a, **kw)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 941, in __call__

return self.method(*args, **kw)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/http.py", line 519, in response_wrap

response = f(*args, **kw)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/addons/web/controllers/main.py", line 966, in call_button

action = self._call_kw(model, method, args, {})

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/addons/web/controllers/main.py", line 954, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/api.py", line 749, in call_kw

return _call_kw_multi(method, model, args, kwargs)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/odoo/api.py", line 736, in _call_kw_multi

result = method(recs, *args, **kwargs)

File "/home/myat90thu/d/mt_dev/odoo_dev/v12/addons_ktz/custom_addons/stock_picking_cancel_extended/models/stock.py", line 22, in action_cancel_draft

self.message_post(message)

TypeError: message_post() takes 1 positional argument but 2 were given

Another issue is,

1 ) Create the product with tracking "Lot".

2 ) Make purchase order with 500 Qty * 100 USD and received incoming shipments with lot Lot-1.

3 ) Make purchase order again with 500 Qty * 200 USD and received incoming shipments with lot Lot-2.

4 ) Check inventory valuation report ( Compute: Current Inventory ) and Qty is 1,000 and value is 150,000 USD.

5 ) Check inventory report and Qty is 1,000.

6 ) Make sale order with 700 Qty * 500 USD and make delivery order done and Lot-1 500 delivered and Lot-2 200 Delivered.

7 ) Check inventory valuation report ( Compute: Current Inventory ) and Qty is 300 and value is 60,000.

8 ) Check inventory report and qty is 300.

9 ) Make cancel that delivery order.

10 ) check inventory valuation report ( Compute: Current Inventory ) and Qty is 1700 and value is 60,000.


11 ) Check inventory report and qty is 1700.



So, according to #10 and #11, your module calculation is totally wrong for calculation in Qty and Valuation.



Can you please help me to fix as i bought your module today?

Message and communication history