c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #22703
[Bug 768255] Re: State field with invisible="True" has problem in web
Hello Jacara,
I have tested as your description with the latest code of web client.
But i do not get any problem, Its working fine as expected and no need to add your code.
Try this and check the behavior as under,
Warehouse > Inventory Control > Physical Inventory > now open any record in form view which is with draft or confirmed state (for split inventory line)
Did you check it with draft or confirm state ?
Because it should display with draft and confirmed state only and it should not be display with done state.
Check the behavior with latest code of trunk web client.
Current revisions are,
Web client: 4644
Addons: 4666
Thanks !
Server: 3396
Thanks !
** Changed in: openobject-client-web
Status: New => Invalid
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/768255
Title:
State field with invisible="True" has problem in web
Status in OpenERP Web Client:
Invalid
Bug description:
I want to use a button on the tree widget like this :
<tree String="My One2Many Field Relation">
<field name="name"/>
<field name="state" invisible="True"/>
<button name="%(my_action)d" string="Click it" states="draft,confirmed" icon="gtk-execute" type="action"/>
</tree>
---
This view is working normal on gtk-client. But it's working unproperly
on webclient. (button named "Click it" is does not display in
webclient. Because state field is hidden (invisible=True).
My suggestion, edit this method like this:
def params_from(self, data):
id = data.get('id')
visible = True
if self.states:
state = data.get('state')
try:
state = ((state or False) and state.value) or 'draft'
except:
# using hidden state field's value.
if isinstance(state, Hidden) :
try :
state = state.widget.get_value()
except:
state = ustr(state)
else :
state = ustr(state)
visible = state in self.states
return dict(id=id, visible=visible)
On openerp-webclient/addons/openerp/widgets/listgrid.py line 622
My I commit this code ?
References