Hey i just added
new button in shipment out but labels are not showing on the button where as functions works perfectly
shipment.xml
<record model="ir.model.button" id="shipment_out_eway_button">
<field name="name">eway</field>
<field name="string">Eway</field>
<field name="model" search="[('model', '=', 'stock.shipment.out')]"/>
</record>
<record model="ir.model.button-res.group" id="shipment_out_eway_button_group_stock">
<field name="button" ref="shipment_out_eway_button"/>
<field name="group" ref="group_stock"/>
</record>
shipment.py
cls._buttons.update({
'eway': {
'invisible': ~Eval('state').in_(['assigned', 'picked',
'packed','done']),
'depends': ['state'],
},
})
shipment_out_form.xml
<button name="eway" icon="tryton-ok" />
pokoli
(Sergi Almacellas Abellana)
2
I guess you need to refresh the sao interface to make the buttons appear.
button is appearing along with icons but not labels
pokoli
(Sergi Almacellas Abellana)
4
Sorry I meant the labels. Did you refresh the server and the web interface?
I do not see anything wrong on your definition.
what do you mean by refreshing ? i restarted my docker and new session of web interface
pokoli
(Sergi Almacellas Abellana)
6
Did you update the database ( running trytond-admin
) to create the ir.model.button
records containing the string definition?
Yes i did that . even function is working but Label are not showing
pokoli
(Sergi Almacellas Abellana)
8
Could you search on the UI the button definition to see if it’s there and the String is properly set?
What happens if you click the button?
the function executes correctly when i click on it
pokoli
(Sergi Almacellas Abellana)
10
Could you please answer this question?
i cant’t find the button with the name eway what i am doing wrong ?
pokoli
(Sergi Almacellas Abellana)
12
This is the reason that the string is not shown.
Can be two problems:
- You did not update the database
- The shipment.xml is not included in the tryton.cfg file so its not loaded by the server.
I forgot to mount the docker volume which leads into all those mess
system
(system)
Closed
14
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.