Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Why is product_id not a required field @ Invoice line?

By
Atchuthan - Technical Consultant, Sodexis Inc
on 2/6/15, 2:09 AM 780 views

Is there any functional reason why product_id is not a required field @ Account Invoice Line?

In case of Sales order and delivery order, product_id is needed to produce procurement and other workflow dependent processes.  

Refer field definition @ github (https://github.com/odoo/odoo/blob/8.0/addons/account/account_invoice.py#L1263)

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 2/6/15, 3:14 AM

Product_id is used only if you are choosing a product already in database, 
in fact it has on_change method wich copies values from related product (name, price, taxes, accounts etc) 
 to invocie line, but before confirming invocie you are also allowed to manualy update or modify description of invocie line
The description itsef is what you print , and that field is required.

All this is usefull and speeds up the process of invoicing, but, you are not required to have any products in database..
Some cases have realy specific product descriptions - mostly services, where provider (seller) wants to put larger description in one invoice line, and it is case specific, so he decides to write each invoice manualy... in that case, required product_id would be unpractical... 

And finaly... if you want it to be required field.. simply add required="1" in view definition, and there you go.. 

 

As for sales and procurement workflows... you can use it even if it is not required, and when the workflow reaches invoiceing point,
all product_ids will be applied ( and descriptions created) but you can still add extra line wich for any given reason has no link to any product, only description and price ( example of usage is correction of price, or additional costs wich was not planned in documents before.. etc) 

Hope this explanation makes sense to you:) 


 

okay.. it makes sense.

Atchuthan - Technical Consultant, Sodexis Inc
on 2/12/15, 7:01 AM

and there is a similar case with Purchase order line. So, how can a purchase order line that do not specify a product purchases something from the supplier. This logic seems absurd or is there any functional requirement for not having required field at Purchase order also.

Atchuthan - Technical Consultant, Sodexis Inc
on 2/12/15, 7:04 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/6/15, 2:09 AM
Seen: 780 times
Last updated: 7/10/15, 3:59 AM