Hi, im trying to use a button function in odoo 14.0 and I don't know how it works. I want a button with this function: click the botton and some field is filled in, like an autocomplete.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
2428
أدوات العرض
Hi,
You can define a button of type object and using the orm methods, you can write values into the field.
Adding button to the view:
<button name="action_update" type="object" string="click me"/>
Now define the function in corresponding model,
def action_update(self):
self.field_1 ='clicked'
Thanks
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل
Thanks so much, it's useful.
How can I mark your answer as 'best answer' or vote you?