Hi guys,
I am having problem installing a simple wizard. No matter what I do the server keeps saying that there's no such service. I suppose that the file
wizard/__init__.pyc is being used by openERP and because (for some reason) is not being recompiled, the server cannot locate the new service.
Any help will be appreciated
Here is my code:
wizard/__init__.py
Code:
import wizard_price
import wizardBarcode
barcode_wizard.xmlWizard TAG: id="barcode_wizard_id" string="Barcode" model="product" name="wizardBarcode" Code:
<openerp>
<data>
<wizard>
</data>
</openerp>
wizard/wizard_barcode.pyField NAMES: name="country_id", name="company_name", name="company_id", name="product_id"Code:
import wizard
def _get_default(obj, cr, uid, data, context=None):
return { 'country_id':'539', 'company_name':'TSFY', 'company_id':'12345' }
def make_barcode(obj, cr, uid, data, context=None):
'''Create Barcode'''
return {}
barcode_form = """<xml>
<form>
<field>
<field>
<field>
<field>
</form>"""
barcode_fields = {
'country_id': {'string' : 'Country ID', 'type':'string', 'default': lambda a*:'539'},
'company_name':{'string': 'Company Name', 'type':'string'},
'company_id':{'string': 'Company ID', 'type':'string'},
'product_id':{'string': 'Product ID', 'type':'string'}
}
class wizardBarcode(wizard.interface):
states = {
'init':
{
'actions': [_get_default],
'result': {'type':'form', 'arch':barcode_form, 'fields':barcode_fields, 'state':[('end','Cancel'), ('create', 'Create Barcode')]}
},
'create':
{
'actions': [],
'result': {'type':'action', 'action':make_barcode, 'state': 'done'}
}
}
wizardBarcode('wizardBarcode')