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

how to use sequences with the developer mode?

By
scottwan
on 8/11/14, 1:41 AM 377 views

By 'activate develper mode' of openerp, I created a model, sequece and sequence code, set the Code of sequence code to model name, but it doesn't work.

x_name of model always show 'false'. How to let the x_name have the value set by the sequence ?

0
scottwan
On 8/12/14, 2:07 AM

define a sever action with the type of Python Code, code as: 

object.write({'x_name':self.pool.get('ir.sequence').next_by_code(cr, uid, 'x_my_order', context=context)})

call the action in the workflow start node.

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: 8/11/14, 1:41 AM
Seen: 377 times
Last updated: 3/16/15, 8:10 AM