← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 889431] Re: buttons in tree views in one2many fields not working with type="object"

 

Something is wrong with the way "state" is searched in
current_active_model. I guess that wrong model is used

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/889431

Title:
  buttons in tree views in one2many fields not working with
  type="object"

Status in OpenERP GTK Client:
  New

Bug description:
  XML example:

          <record id="smb_account_bank_statement_form_cash_inherit" model="ir.ui.view">
              <field name="name">smb.account.bank.statement.cash.form.inherit</field>
              <field name="model">account.bank.statement</field>
              <field name="inherit_id" ref="account.view_bank_statement_form2"/>
              <field name="type">form</field>
              <field name="arch" type="xml">
                  <xpath expr="//tree[@string='Statement lines']/field[@name='analytic_account_id']" position="replace">
                  	<field name="currency_id"/>
                      <field name="force_rate" on_change="onchange_amount_currency(force_rate,amount_currency)" />
                      <field name="amount_currency" on_change="onchange_amount_currency(force_rate,amount_currency)"/>
                      <field name="outgoing_rate" readonly="1"/>
                      <button name="%(smb_account_kp_kw)d" type="action" string="KP/KW" icon="gtk-print" states="done"/>
                      <button name="button_confirm" type="object" string="KP/KW" icon="gtk-ok" states="draft"/>
                      <button name="button_cancel" type="object" string="KP/KW" icon="gtk-cancel" states="done"/>  
                  </xpath>
              </field>
          </record>

  The type="action" button works OK, but type="object" returns:
  Traceback (most recent call last):
    File "/home/lacan/workspacemonolit/ERPClient6/src/widget/view/list.py", line 571, in __contextual_menu
      current_active_model['state'].get(current_active_model) in states):
  AttributeError: 'bool' object has no attribute 'get'

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client/+bug/889431/+subscriptions


References