Purchase module : UoS not set properly when move is created

Asked by Blqt

Hi,

Using latest stable 5.0 release.

When a purchase order is confirmed, the created moves do not take the product UoS into account:
404 'product_qty': order_line.product_qty,
405 'product_uos_qty': order_line.product_qty,
406 'product_uom': order_line.product_uom.id,
407 'product_uos': order_line.product_uom.id,

Benoit

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Numérigraphe (numerigraphe) said :
#1

Would you care to write a XML test file to demonstrate this problem?
Lionel

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#2

Hello Benoit,

Functionally, UoS is a unit of sale, and it is used only for Outgoing moves(products).
Have a look at Products and check that it has Purchase UoM.

UOS is for the meaning for : You buy/purchase in UoM and sale them in UoS.

Thanks.

Revision history for this message
Blqt (benoit-luquet) said :
#3

Hello Jay,

OK. The documentation expressly explain that "For example, in food industries, you will manage a stock of ham but invoice in Kg. Keep empty to use the default UOM"

... But what if I am the customer of this company selling ham. Can't I use OpenERP?
I buy ham by the KGM (I can't know the number of pieces and it is invoiced to me in KGM) and then move them to the production unit in pieces. Then the production unit manages it by KGM

... or should I describe the products I buy differently?

Thanks for your help

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#4

Hello Benoit.

It means, you can buy ham in KGM and sale them in Peices(Gram possibly). For this product set UoM as KGM and UoS as gram.

If you are the customer of of this company selling ham, that company is your SUPPLIER. In the configuration of your company, that seller will stay as customer. Isn't it?

Let me know if its not clear.

Thanks.

Revision history for this message
Blqt (benoit-luquet) said :
#5

Hello again,

I have set UoM as KGM and UoS as PCE

OpenERP does not allow UoM as KGM and UoS as grams since they would be in the same category unit
    _constraints = [
        (_check_uos, 'Error: UOS must be in a different category than the UOM', ['uos_id']),
I dont' understand why, this constraint but it is not a problem for me because I do not do that).

I am a customer of this company selling ham, so that partner is a supplier and not a customer.

Am I clear, myself?

Benoit

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#6

Oh yes, that partner is a Supplier for you.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#7

Sorry for that Typing mistake.

Revision history for this message
Blqt (benoit-luquet) said :
#8

Well,

I don't feel my question is really answered.
It looks like my products/partners are described correctly, but my problem with UoS not being used in purchase module remains.

Revision history for this message
Husen Daudi (husendaudi) said :
#9

Hello,

When you are purchasing ham it will be in kg. and you can set approximate UOS (for example 20 ham in 1 kg).
If you purchase 1kg ham it will increase your stock by 20pcs of ham.

Set your default uom=KG only.
now create sale order for 10 pcs and confirm it. validate the picking too.
check the stock. you will get 0.5 kg ham in stock.

We can not get accurate result in this case when UOM and UOS are from different categories.

Regards,
HDA

Can you help with this problem?

Provide an answer of your own, or ask Blqt for more information if necessary.

To post a message you must log in.