On 08 Apr 17:40, Iasmini - Gmail wrote:
> Hi,
> 
> I created a new class and a wizard, like in account.open_balance_sheet:
> 
> 
> class WOBillingStart(ModelView):
>     'WO Billing Start'
>     __name__ = 'work_order.wo_billing.start'
> 
> ...
> 
> 
> class WOBilling(Wizard):
>     'WO Billing'
>     __name__ = 'work_order.wo_billing'
> 
> ...
> 
> 
> I put in
> 
> __all__ = ['WorkOrder', 'State', 'Type', 'GuaranteeType',
> 'PrintFormat', 'Items', 'Contact', 'Defect', 'Cause',
>            'Solution', 'DefectCauseSolution', 'WOBillingStart',
> 'WOBilling']
> 
> 
> I put in __init__.py
> 
> def register():
>     Pool.register(
>         State,
>         Type,
>         GuaranteeType,
>         PrintFormat,
>         Group,
>         Configuration,
>         Defect,
>         Cause,
>         Solution,
>         WorkOrder,
>         Items,
>         Contact,
>         DefectCauseSolution,
> *WOBillingStart*,
>         module='work_order', type_='model')
>     Pool.register(
> *WOBilling*,
>         module='work_order', type_='wizard')
> 
> 
> In work_order.xml I have:
> 
> <field name="*model*">*work_order.wo_billing.start*</field>
> 
> and
> 
> <field name="*wiz_name*">*work_order.wo_billing*</field>
> 
> 
> And, finally, on the database I have:
> table: ir_model
> model field: work_order.wo_billing.start
> module: work_order
> 
> and
> table: ir_action_wizard
> wiz_name field: work_order.wo_billing
> module: empty
> 
> Now, when I try to click on OK button from the wizard, it says:
> *'work_order**.wo_billing' is not in list*. Why? I've searched
> '*account.open_balance_sheet'* and it appears in the same places
> where I've put mine. What I'm missing? I tried to install a new
> database and the error continues.
> 
>   File "/opt/tryton/tryton/common/common.py", line 1341, in process
>     self.callback(return_)
> 
>   File "/opt/tryton/tryton/gui/window/wizard.py", line 360, in end_callback
>     callback()
> 
>   File "/opt/tryton/tryton/gui/window/wizard.py", line 110, in
> execute_actions
>     Action._exec_action(*action, context=ctx)
> 
>   File "/opt/tryton/tryton/action/main.py", line 137, in _exec_action
>     tab_domain=tab_domain)
> 
>   File "/opt/tryton/tryton/gui/window/window.py", line 33, in create
>     limit=limit, search_value=search_value, tab_domain=tab_domain)
> 
>   File "/opt/tryton/tryton/gui/window/form.py", line 113, in __init__
>     search_value=search_value, tab_domain=tab_domain)
> 
>   File "/opt/tryton/tryton/gui/window/view_form/screen/screen.py",
> line 59, in __init__
>     if not MODELACCESS[model_name]['write']:
> 
>   File "/opt/tryton/tryton/common/common.py", line 157, in __getitem__
>     idx = self._models.index(model)

I'm wondering if in the StateView of the wizard you not using the Wizard
name instead of the ModelView name.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgp6rpwepAUVc.pgp
Description: PGP signature

Reply via email to