This question has been flagged
2 Replies
3108 Views

First of all sorry me if it look a dummy question but i am pretty new of openerp and i am tring to understand ..

i will like to use openerp to create invoice proforma,,, but what is missing on this proforma invoice by defualt is a number which can help me to track them... so what i did:
created new CHAR field on INVOICE model
created new SEQUENTIAL CODE with code invoice.proforma
created new SEQUENCE called Fattura Proforma linked on the code above 
edited worflof > activity > PROFORMA2 and on python action i did add this value write({'x_invoice_pf_number':self.pool.get(‘ir.sequence’).get(cr, uid, ‘invoice.proforma‘)})

but i got SyntaxError: invalid syntax

ir elaly dont know how to do it..someone can help me please? :(

 

Ok , update.. i did found what was the erro before (wrong char).. but now i have new on

 

write({'x_invoice_pf_number':pool.get(‘ir.sequence’).get(cr, uid, ‘invoice.proforma‘)})

 

NameError: name 'cr' is not defined

 

Avatar
Discard
Best Answer

Do you have self.write ? In Python you always have to use it.

 

Best Odoo services

Avatar
Discard
Author

uhm no but if i use write({'x_invoice_pf_number':'TEST)}) it work

Author Best Answer

Ok , update.. i did found what was the erro before (wrong char).. but now i have new on

 

write({'state':'proforma2'}) write({'x_invoice_pf_number':pool.get(‘ir.sequence’).get(cr, uid, ‘invoice.proforma‘)})

 

NameError: name 'cr' is not defined

 

 

Avatar
Discard