c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #37156
[Bug 889431] [NEW] buttons in tree views in one2many fields not working with type="object"
Public bug reported:
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'
** Affects: openobject-client
Importance: Undecided
Status: New
--
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
Follow ups
References