Merge lp:~openerp-dev/openobject-addons/6.1-opw-582922-msh into lp:openobject-addons/6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/6.1-opw-582922-msh |
Merge into: | lp:openobject-addons/6.1 |
Diff against target: |
56 lines (+3/-15) 3 files modified
mail/res_partner.py (+0/-6) product/pricelist.py (+3/-3) project/res_partner.py (+0/-6) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-582922-msh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+139901@code.launchpad.net |
Description of the change
Hello,
Fixed the issue of Product UOM, unit price was calculated wrong due to wrong UOM when unit price is calculated from partner section of the form.
Demo :- Do the following configuration of product.
Product Type: Stockable, Procurement Method: Make to order, Supply method: Buy, Sale Price: 20, Cost Price: 10
Default unit of measure: kg, Purchase unit of measure: kg, Unit of sale: 100g(obviosuly smaller than reference and 10 time smaller),
Define supplier in product say for example 'abc' which has pricelist as 1 Qty = 10, the supplier abc uses Default purchase price list for Purchase pricelist so whenever we will create purchase order for that supplier Default purchase pricelist will be used, Default purchase pricelist has Produce listprices items which has Based on value = Partner section of the product form.
Now with this product configuration create request for quotation, select partner 'abc' and select product which we have created with above configuration, you will see there is unit price difference, for 1 kg if we have set 10 in supplier section then still it gives 100 as a unit price.
Reason :- All calculation goes well for price_get and price_get_multi in pricelist.py but while calculating price(by calling _compute_price method) we have passed product.uos_id.id, there should be uom of context if context contains uom, if there is uom in context that means price_get is called from sale or purchase product_
One more thing here there is problem with product_id and tmpl_id, while calculating partner_where we have fired a query SELECT name FROM product_
I have added a video for reference at https:/
Thanks.
Unmerged revisions
- 7101. By Mohammed Shekha(Open ERP)
-
[FIX]Refixed the issue of UOM, fixed stupid mistake in previous commit