Allow to use Price per UoM
Description
Environment
Attachments
- 16 Feb 2017, 02:10 PM
Activity
I was in doubt to close this as this is so frequently asked by community.
But better to close it and revisit if needed when a fresher patch arrives.
Closing as potential idea after inactivity.
Attaching here some peer review I did for this ticket with file IDEMPIERE-533_CR.patch.
But I definitely didn't like the way it was implemented 😞
I think this needs to be rewritten better in a less disruptive way.
1 - it creates a new UOM field on order and invoice lines - I think is preferably to work with just the same usual UOM field
2 - it forces to create price list per each UOM conversion, so the old conversions are basically broken - not backward compatible
3 - in the middle of the code is implemented some sort of generic conversions - but I think that must be in a different ticket (and probably different way)
My idea of how this must work is:
order line and invoice line must not change - it must be transparent for users
product price receives now records optionally for UOM - this is ok in the implementation - but in case there is a conversion and no price - it must be backward compatible and keep working as usual
the DB functions bompricelimit, bompricestd and bompricelist are changed on this ticket - that means breaking potentially reports, plugins, info windows, and anything based on the old function. I tried to implement a less disruptive way in the patch referenced.
Unfortunately I think is still not integrable.
Regards,
Carlos Ruiz
Dirk,
We are trying to integrate with latest version of iDempiere. Can you please provide access to commit you made?
Commited to branch price_uom
https://bitbucket.org/a42niem/adempiere361/commits/7617d60bf263251c599e2cbed847042b9ed5449a
https://bitbucket.org/a42niem/adempiere361/commits/b2fb937fe6d2a170d6bb81d90bc7d27942de3042
https://bitbucket.org/a42niem/adempiere361/commits/6ac42ea56e87fc2bce13dc272468d673cd9bbf73
https://bitbucket.org/a42niem/adempiere361/commits/5c10ff9949a4e1cb776b5ac7604865ab6316b7a6
https://bitbucket.org/a42niem/adempiere361/commits/32e08489904e3fe5f3f56451b4654be18278eda9
In some business areas it is common to sell a product quantity using for example kg as unit of measure and give a price based on a different unit of measure like per 100 kg.
This is currently not possible with Adempiere.
The contribution is based on code provided by ADAXA as documented in feature request "Add C_UOM_ID to MProductPrice - ID: 1754543" (http://sourceforge.net/tracker/index.php?func=detail&aid=1754543&group_id=176962&atid=879335)