Community mailing list archives

community@mail.odoo.com

def write Modification

by
Dion Martin
- 07/07/2015 00:58:08
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
then, 
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'          : work.partner_id.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,
Dion