Issue 10945

Title
Incorrect unit_price on purchase_line when using secondary unit on purchase_requisition
Priority
bug
Status
testing
Nosy list
ced, mrichez, reviewbot, tbruyere
Assigned to
ced
Keywords
review

Created on 2021-11-10.16:18:40 by mrichez, last changed 7 days ago by reviewbot.

Messages

Author: [hidden] (mrichez)
Date: 2021-11-10.16:18:40

Since https://bugs.tryton.org/issue10127, when using a secondary unit on a requisition, the unit_price defined on the purchase_line is not converted into the stock_unit. Probably, when using purchase_secondary_unit, we should add the requisition_line.unit in _group_purchase_line_key and defining the secondary unit et the secondary price unit on the purchase_line.

How to reproduce error:

  • Define a purchasable product with a secondary unit
  • Create a requisition with this product and a quantity in secondary unit and define a unit_price
  • Process the requistion into purchase_request (quantity is then converted in stock_unit)
  • Create Purchase from purchase_request: purchase_line has the quantity from the purchase_request (in stock_unit) but unit_price is the unit_price from the requisition (and then it's a unit_price for the secondary_unit).
History
Date User Action Args
2021-12-01 15:59:11reviewbotsetmessages: + msg71967
nosy: + reviewbot
2021-12-01 15:37:52cedsetkeyword: + review
reviews: 374361002
status: in-progress -> testing
2021-12-01 13:41:24cedsetcomponent: + purchase_requisition, purchase_secondary_unit, - purchase_request
2021-12-01 13:41:11cedsetassignedto: ced
nosy: + ced
status: unread -> in-progress
2021-11-10 16:18:40mrichezcreate

Showing 10 items. Show all history (warning: this could be VERY long)