i'm new to openERP and I hadn't found an exhaustive and simple guide for wizards. I have to do a wizard that generates a code by using the product_id. This wizard have to generate the code of all the products when i click on it and put it in in the field EAN13. I have no idea how to create the wizard that take the code, generates his own code and put it in the field. Sorry for my bad english :(
2 Answers
0
votes
0
votes
You need to create a new memory model
class ean13_wiz(osv.osv_memory):
_name = 'ean13.wiz'
_description = 'EAN13 wizard'
_columns = {
'ean_template':fields.char('ean_template', size=13, required=True),
}
_defaults = {
'ean_template': '2100000000000',
}
def ean13_logic(self, cr, uid, ids, context=None):
# your duplicate buziness logic
...
I added only 1 field for init the ean13 template
When you click on the submit button you should add the view xml action to your ean13_logic to add a ean to every product. maybe have some feedback how many are changed.
look at the link for more info: wizard example