python - retrieve action window from a button openerp -


in module want view form button click.

this button "postponed" other workflow buttons

<header>     <button string="planned" type="workflow" name="action_planned" class="" icon="gtk-undo" states="postponed"/>     <button string="complete" type="workflow" name="action_complete" class="" icon="gtk-apply" states="planned, postponed"/>     <button string="postponed" type="action" name="%(timetable_postponed)d" class="" icon="gtk-jump-to"/>     <button string="cancel" type="workflow" name="action_cancel" class="" icon="gtk-cancel" states="planned, postponed"/>     <field name="state" widget="statusbar" readonly="true" statusbar_visible="planned, completed, postponed, cancelled"/> </header> 

and form view , action

    <record id="timetable_postponed_view" model="ir.ui.view">         <field name="name">op.timetable.postponed</field>         <field name="model">op.timetable</field>         <field name="arch" type="xml">             <form string="time table postponed" version="7.0">                 <field name="classroom_id" />                 <field name="period_id" />                 <field name="date" />             </form>         </field>     </record>      <act_window id="timetable_postponed"             name="postponed timetable"             res_model="op.timetable"             view_mode="form"             view_id="timetable_postponed_view"             target="new"             /> 

and while updating got error

       raise valueerror('external id not found in system: %s' % (xmlid))    parseerror: "external id not found in system: myschool.timetable_postponed" while parsing file:///e:/development/myschool-src/osbt_0374/myschool/op_timetable/op_timetable_view.xml:111, near    <record id="view_op_timetable_form" model="ir.ui.view">         <field name="name">op.timetable.form</field>         <field name="model">op.timetable</field>         <field name="priority" eval="8"/>         <field name="sequence" eval="4"/>         <field name="arch" type="xml">             <form string="time table" version="7.0">                 <header>                     <button string="planned" type="workflow" name="action_planned" class="" icon="gtk-undo" states="postponed"/>                     <button string="complete" type="workflow" name="action_complete" class="" icon="gtk-apply" states="planned, postponed"/>                     <button string="postponed" type="action" name="%(timetable_postponed)d" class="" icon="gtk-jump-to"/>                     <button string="cancel" type="workflow" name="action_cancel" class="" icon="gtk-cancel" states="planned, postponed"/>                     <field name="state" widget="statusbar" readonly="true" statusbar_visible="planned, completed, postponed, cancelled"/>                 </header>                 <sheet>                     <separator colspan="4" string="time table"/>                     <group colspan="4" col="4">                         <field name="lecturer_id"/>                         <field name="standard_id"/>                         <field name="period_id"/>                         <field name="subject_id"/>                         <field name="classroom_id"/>                         <field name="start_datetime"/>                         <field name="end_datetime"/>                         <field name="type"/>                     </group>                 </sheet>             </form>         </field>     </record> 

what should retrieve new window on button click event...?

you have problem calling action through button.

whenever try call action in button need specified module name before action name, actual action id defind.

if don't specified module name take current module name , try find id in it.

here code:

<button string="postponed" type="action" name="%(timetable_postponed)d" class="" icon="gtk-jump-to"/> 

neeed change this

name="%(module_name.timetable_postponed)d" 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -