Community mailing list archives

RE: def write Modification

- 07/07/2015 01:24:01

There’s nothing wrong on the code.

Just need to be user is it Service (with capital S) or service (with not capital).


The real value we set is on the first one that we define on the selection.


Thank You.


Best Regards,

Hans Yonathan

Odoo Support


Expert in Finance, Information System & Business Intelligence

Odoo Silver Partner


Tel. 13670137019 (China - Shenzhen)


From: Dion Martin []
Sent: Tuesday, July 07, 2015 1:13 PM
To: Community
Subject: def write Modification


Dear Community,

Please give me some advice if you have done same case below:



-  in Quotation we're added


'quotation_type'    : fields.selection([('forklift','Forklift'),('truck','Truck'),('cm','Construction Machinery'),('service','Service'),('sparepart','Sparepart')],'Quotation Type'),


and then, now we have 4 quotation and sales order type based on quotation_type fields. 


Inline images 1


in Project Module we're added new button called "Convert To Quotation" , for trigger to make a quotation with quotation_type fields is 'Service'


for work in self.browse(cr, uid, ids):

            vals = {

                'partner_id'          :,

                'quotation_type'      : 'service',


- and the problem is : 

  1. when users input product in sale_order_line and save it, this quotation directly goes to sparepart quotation, in other word this quotation is owned by sparepart.


FYI : there is no product in sale_order_line in service quotation, there is only fields.text to describe what they want to charge. 


Please share your valuable experiences..


Best regards,


Post to: