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.

0

Assign Sequence on Activity, How to?

By
Stefano Gattuso
on 10/6/14, 5:47 AM 765 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

 

0
Stefano Gattuso
On 10/6/14, 12:04 PM

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

 

 

0
Marek Mosiewicz
On 10/6/14, 11:11 AM

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

 

Best Odoo services

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

Stefano Gattuso
on 10/14/14, 10:14 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: 10/6/14, 5:47 AM
Seen: 765 times
Last updated: 3/16/15, 8:10 AM