#1078 1.3 - Project number on purchase order - cannot left empty line

1.3
closed-fixed
None
5
2014-05-12
2014-02-26
Pongracz Istvan
No

I have a purchase order, where I have two items on it. They are the same product, but different quantity to be able to track a project (first line with some pieces), and a normal stock item (same product, some other pieces).

I saved it and when I open the order again, I found that, all items (po lines) got the same project number.
First I thought, it is a displaying issue, but the DB also has the project number.

My expectation: I can setup different or no project for individual items on one order/invoice to be able to track projects.

How to reproduce:
- create a project
- create a purchase order with two items with the same product but different quantities
-- for example productA - 10 units and productA - 1 unit
- for the first item, select the previously entered project
- save it
- list purchase orders
- select the new PO and open it
- all (both) items has project id

Discussion

  • The same happened with other PO, where there were different products and quantities, all items got the project id. I checked it.

     
  • It seems it happens between Save and refresh the form.

     
  • How this bug is working:
    If an empty project number exists (unselected), it will pick up the previous project id.
    For example, let's see three items and its projects:
    empty proj1 proj2 -> after saving -> empty proj1 proj2
    empty proj1 empty -> after saving -> empty proj1 proj1
    proj1 empty empty -> after saving -> proj1 proj1 proj1

    In OE.pm there is the save function, where the project_id handled. I have no results yet.

     
    • status: open --> pending-fixed
    • assigned_to: Pongracz Istvan
     
  • got it. I commit the fix soon.

     
    • status: pending-fixed --> closed-fixed
     
  • Fixed. At least for offers/orders -> in OE.pm