Cursor jump to last page

Asked by ArtERP.ru

hi all! i nedd help!

in my module cursor all time jump to last page "Linked MMT"

code here

 <record model="ir.ui.view" id="view_mmt_mn_form">
  <field name="name">mmt.mn</field>
  <field name="model">mmt.mn</field>

  <field name="type">form</field>

  <field name="arch" type="xml">
   <form string="MMT">

    <notebook >

     <page string="General" >

       <field name="mmt_ac" invisible="1" />
       <field name="mmt_ac_bt" invisible="1" />
       <field name="mmt_ac_rate" invisible="1" />
       <field name="mmt_ac_po_invc" invisible="1" />
       <field name="mmt_ac_invc" invisible="1" />

       <group colspan="4" >

       <field name="mmt_no" required="1" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0) ]}" />
       <field name="mmt_type" required="1" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0) ]}" />

       <field name="mmt_rev" required="1" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0) ]}" />
       <field name="mmt_date" required="1" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0) ]}" />

       <field name="mmt_client" required="1" readonly="True" />
       <field name="mmt_contractor" attrs="{'readonly':[ ('mmt_ac','!=',1), ('mmt_ac','!=',0) ]}" />

       <field name="revisor" required="1" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0)]}"/>
       <field name="state" required="1" />

       <field name="mmt_contract" />
       <field name="mmt_project" />
       <field name="mmt_title_eng" rowspan="4" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="mmt_title_trnsl" rowspan="4" />
       </group>
       <group colspan="4" >
       <button name="action_state_p" string="Set to Please qoute" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',1) ]}"/>

       <button name="action_state_i" string="Set to Issued" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',1) ]}" />

       <button name="action_state_q" string="Set to Qouted" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',2) ]}" />
       <button name="action_state_r" string="Set to Rejected" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',2) ]}" />

       <button name="action_state_i" string="Set to Issued" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',3) ]}"/>
       <button name="action_state_n" string="Set to Cancelled" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',3) ]}" />

       <button name="action_state_c" string="Set to Confirmed" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',4) ]}" />

       <button name="action_state_e" string="Set to Executed" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',5) ]}" />

       <button name="action_state_a" string="Set to Accepted" type="object" icon="gtk-convert" attrs="{'invisible':[ ('mmt_ac_bt','!=',6) ]}" />
       </group>

       <group colspan="4" >
       <separator string="Collection place:" colspan="2"/>
       <separator string="Место отгрузки:" colspan="2"/>

       <field name="coll_addr_eng" />
       <field name="coll_addr_trnsl" />

       <field name="coll_cont_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="coll_cont_trnsl" />

       <field name="collection_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="collection_trnsl"/>
       <field name="mmt_collection" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0)]}" colspan="4" />

       <separator string="Destination:" colspan="2"/>
       <separator string="Место назначения:" colspan="2"/>

       <field name="dest_addr_eng" />
       <field name="dest_addr_trnsl" />

       <field name="mmt_dest_cont_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="mmt_dest_cont_trnsl" />

       <field name="mmt_dest_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="mmt_dest_trnsl" />
       <field name="mmt_locations" attrs="{'readonly':[ ('mmt_ac','!=',1) , ('mmt_ac','!=',0)]}" colspan="4" />

       <separator string=" " colspan="4"/>
       <field name="mode_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="mode_trnsl"/>

       <field name="means_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="means_trnsl"/>

       <separator string=" " colspan="4"/>

       <field name="todelivery_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="todelivery_trnsl" />

       <separator string="Collection date:" colspan="2"/>
       <separator string="Дата готовности к отгрузке:" colspan="2"/>

       <field name="etc" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}" />
       <field name="atc" />

       <separator string="Delivery date:" colspan="2"/>
       <separator string="Дата доставки:" colspan="2"/>

       <field name="eta" attrs="{'readonly':[ ('mmt_ac','!=',2) ]}" />
       <field name="ata" />

       <separator string=" " colspan="4"/>
       <field name="mmt_note_eng" attrs="{'readonly':[ ('mmt_ac','!=',1) ]}"/>
       <field name="mmt_note_trnsl" />

       <separator string=" " colspan="4"/>
       <field name="mmt_vehicle_no" />
       <field name="mmt_container_no" />

      </group>
     </page>
     <page string="PO Information" >
      <group colspan="4" expand="1" >
       <field name="mmt_pl" colspan="4" widget="one2many_list" nolabel="1" />

       <button name="fill_article_gtd" string="Fill Article GTD" type="object" colspan="1" />

       <field name="mmt_article_gtd_list" colspan="4" widget="one2many_list" nolabel="1" />

      </group>
     </page>

     <page string="Commercial info" groups="MMT.group_mmt_finance" >

      <group colspan="4" expand="1" attrs="{'readonly':[ ('mmt_ac_rate','!=',1) ]}" >
       <field name="mmt_rates_list" colspan="4" widget="one2many_list" nolabel="1" />
      </group>

      <group colspan="4" expand="1" attrs="{'invisible':[ ('mmt_ac','!=',2) ] , 'readonly':[ ('mmt_ac_invc','!=',1)]}" >
       <field name="mmt_invc_list" colspan="4" widget="one2many_list" nolabel="1" />
       <field name="mmt_profit" />
       <field name="mmt_balance" />
      </group>

      <field name="child_invc" colspan="4" widget="one2many_list" nolabel="0" readonly="0" />

      <field name="mmt_rates" />

     </page>

     <page string="Linked MMT" attrs="{'invisible':[ ('mmt_ac','!=',2) ]}" >

       <field name="child_ids" colspan="4" widget="one2many_list" nolabel="1" />
       <button name="create_child_mmt" string="Create child MMT" type="object" colspan="4" />
     </page>
    </notebook>
   </form>
  </field>
 </record>

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello,

This case is not produce at my end so can first remove all attrs attribute temporary and update your hole code and then apply attrs and check again.May be its your side problem.If you will face similar problem again then please provide me your .py file code also then i will check my side by creating test module with your code.

Thanks.

Can you help with this problem?

Provide an answer of your own, or ask ArtERP.ru for more information if necessary.

To post a message you must log in.