Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
158 Vizualizări

<!-- MRP.WORKORDER TABLET VIEW -->

<record id="mrp_workorder_tablet_view_form_inherit_biz_client_namson" model="ir.ui.view">

<field name="name">mrp.workorder.view.form.inherit.biz_client_namson</field>

<field name="model">mrp.workorder</field>

<field name="inherit_id" ref="mrp_workorder.mrp_workorder_view_form_tablet"/>

<field name="arch" type="xml">

​<xpath expr="//div[hasclass('workorder_bar_left')]" position="inside">

​<div style="width: 15px;"></div>

​<button name="action_return_mrp_production" type="object" class="btn-secondary mr8 ml5" string="Return MRP Production"/>

​</xpath>

</field>
</record>

def action_return_mrp_production(self):

​return {

​'type': 'ir.actions.act_window',

​'res_model': 'mrp.production',

​'res_id': self.production_id.id,

​'view_mode': 'form',

​​'target': 'current'

​}

my issue is want to change the button string, here i want to replace "Return MRP Production" with "self.production_id.name"

How can I solve it?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

Please refer to the link:

Solved Forum:

1.https://www.odoo.com/sl_SI/forum/pomoc-1/how-to-change-button-string-dynamically-145273


Hope it helps.

Imagine profil
Abandonează
Autor

Thanks for your attention, my problem has been solved.

Autor Cel mai bun răspuns

Thanks for your attention, my problem has been solved.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
feb. 25
834
0
nov. 24
942
0
feb. 25
712
2
ian. 25
1305
0
oct. 24
1034