Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
8400 มุมมอง

Hello,

I have a form (wizard) that contains default information.

I would like to execute this form automatically by clicking the Create button..

Need help, thanks for advance.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hello Tansadio,


For this scenario, you override the create method.

Try this :-

@api.model

def create(self, vals):

    result = super(model_name, self).create(vals)

     return {            

            'name': _('Wizard String'),

            'type': 'ir.actions.act_window',

            'res_model': 'custom.wiz',

            'view_type': 'form',

            'view_mode': 'form',

            'target': 'new',

         }


Hope, it works for you.

Thanks,

อวตาร
ละทิ้ง
ผู้เขียน

Thnks Mehta, Your answer is very helpful

คำตอบที่ดีที่สุด

Nice

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

This is the code i used.

<openerp>

<data noupdate="1">

<record id="ir_cron_scheduler_mass_allocation_action" model="ir.cron">

<field name="name">Masse allocation attribution scheduler</field>

<field name="user_id" ref="base.user_root"/>

<field name="interval_number">2</field>

<field name="interval_type">minutes</field>

<field name="numbercall">-1</field>

<field eval="False" name="doall"/>

<field eval="'hr.holidays.mass.allocation'" name="model"/>

<field eval="'create'" name="function"/>

</record>

</data>

</openerp>


So, When i performed this code, i see errors about arguments.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 24
1785
1
พ.ค. 17
8127
3
มิ.ย. 25
2506
0
พ.ค. 24
1661
3
พ.ค. 25
9822