orderpoint

Bug #802322 reported by Graeme Gellatly
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 2

Bug Description

There are a couple of problems with orderpoints and the scheduler.
The first - there seems to be an issue that automatic orderpoints are not processed when run by non admin user, however this may be just my configuration - feel free to test and confirm if this is the case. I notice a client error around access rights, so I think it may be that the scheduler trys to compute all procurements, but because the user does not have rights to all companies it fails.

This next one is really the one I need looked at. When computing scheduler / orderpoints as admin user, all of the automatic orderpoints are assigned to company 1, instead of the company who the order point belongs to. So basically we end up with draft PO's going to the wrong warehouse and company.

To test. Create 2 companies, a parent and a child. Create warehouses and stock locations for each and a user for both. Define a product without an associated company (so it appears in both companies) with a supplier with no associated company, create 2 minimum orderpoints such that it will be triggered on the child company and parent company, and then to test case 1 - Compute Schedulers as child user and in my case nothing happens (although logs show an error relating to stock move access rights). Then to test my more important case 2, compute schedulers as admin user, and check the resulting Draft PO's. They are all to the parent.

Now I did some further tests, adding company_id to the procurement object creation and this partially fixed the issue. Line 265 of schedulers.py in procurement. Now the resulting purchase orders are created against the correct company, however it still references the wrong warehouse, but the right location. There is no warehouse_id column in procurement_order so there may be an issue in the creation of PO's from procurement orders that it picks up the wrong warehouse, based on the uid.

Related branches

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

I am confirming this issue because I have faced the same problem as follows.

1) The company,warehouse did not pass proper in PO.
2) And the another user does not run the "OrderPoint" and I have faced the traceback on this.

For more information I have attached a video So would you please check it.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello Graeme,

Po generated with wrong warehouse and company.It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-794412-ron
revision-id: <email address hidden>
Revision num:4825.

For information ,Traceback Generated after run the ORDERPOINT it is a sequence problem and it has been fixed in lp:787052.

Thanks

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Graeme Gellatly (gdgellatly) wrote : Re: [Bug 802322] Re: orderpoint
Download full text (3.2 KiB)

I think you mean
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-802322-ron

I have looked at that bug regards traceback and it seems totally unrelated.
 My issue is happening at orderpoint processing, even before a procurement
order, let alone a purchase order. The issue is in multicompany, please
read case description again.

On Wed, Jun 29, 2011 at 5:37 PM, Rohan Nayani(Open ERP) <
<email address hidden>> wrote:

> Hello Graeme,
>
> Po generated with wrong warehouse and company.It has been fixed in
> lp:~openerp-dev/openobject-addons/trunk-bug-794412-ron
> revision-id: <email address hidden>
> Revision num:4825.
>
> For information ,Traceback Generated after run the ORDERPOINT it is a
> sequence problem and it has been fixed in lp:787052.
>
> Thanks
>
>
> ** Changed in: openobject-addons
> Status: In Progress => Fix Committed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/802322
>
> Title:
> orderpoint
>
> Status in OpenERP Modules (addons):
> Fix Committed
>
> Bug description:
> There are a couple of problems with orderpoints and the scheduler.
> The first - there seems to be an issue that automatic orderpoints are not
> processed when run by non admin user, however this may be just my
> configuration - feel free to test and confirm if this is the case. I notice
> a client error around access rights, so I think it may be that the scheduler
> trys to compute all procurements, but because the user does not have rights
> to all companies it fails.
>
> This next one is really the one I need looked at. When computing
> scheduler / orderpoints as admin user, all of the automatic
> orderpoints are assigned to company 1, instead of the company who the
> order point belongs to. So basically we end up with draft PO's going
> to the wrong warehouse and company.
>
> To test. Create 2 companies, a parent and a child. Create warehouses
> and stock locations for each and a user for both. Define a product
> without an associated company (so it appears in both companies) with a
> supplier with no associated company, create 2 minimum orderpoints such
> that it will be triggered on the child company and parent company, and
> then to test case 1 - Compute Schedulers as child user and in my case
> nothing happens (although logs show an error relating to stock move
> access rights). Then to test my more important case 2, compute
> schedulers as admin user, and check the resulting Draft PO's. They
> are all to the parent.
>
> Now I did some further tests, adding company_id to the procurement
> object creation and this partially fixed the issue. Line 265 of
> schedulers.py in procurement. Now the resulting purchase orders are
> created against the correct company, however it still references the
> wrong warehouse, but the right location. There is no warehouse_id
> column in procurement_order so there may be an issue in the creation
> of PO's from procurement orders that it picks up the wrong warehouse,
> based on the uid.
>
> To manage notifications about this bug go to:
> https://bugs.laun...

Read more...

Revision history for this message
qdp (OpenERP) (qdp) wrote :

the patch released in revision 5386 should have fixed most of the problems.

Do not hesitate to create new bugs if you still found some.

Thanks,
Quentin

Changed in openobject-addons:
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.