I'm customizing Odoo 8.0 to support sale of Real Estate properties by each property's Gross internal Area (GIA) in square metres. I have created a custom model extending the product.template model with the following field
'qty_gia': fields.integer('Floor Space', help="Gross internal area of property")
How do I create a function that will set the qty_gia value as the default product_uos_qty and quantity values in the sale_order_line and account.invoice.line models respectively?
I think you can write onchange method on sale_order_line and account_invoice_line. so, while creating sale_order_line or account_invoice_line product_uos_qty will auto-populate form product screen.
for line in self:
This code is for your reference. it may not be directly work.
Hope this help.
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
|Asked: 6/22/16, 3:28 AM|
|Seen: 167 times|
|Last updated: 6/22/16, 8:57 AM|