is there any way to put two fields inside the same column in the tree view in odoo 15?
| Columns |
|Field1 Field2 |
the two fields are different [type]
is there any way to put two fields inside the same column in the tree view in odoo 15?
| Columns |
|Field1 Field2 |
the two fields are different [type]
Hi Rguibi,
You can create a computing field and compute the value from the other fields two fields and display the value in this.
Please check code in comment.
I hope this will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Check the below example:
class Product(models.Model):
_name = 'product.product'
name = fields.Char()
price = fields.Char()
prod_name = fields.Char(compute="_compute_product_name", string="Product Name")
def _compute_product_name(self):
for rec in self:
rec.prod_name = rec.name + " " + rec.price
In tree view you can add a field like this:
<tree>
<field name="prod_name" />
</tree>
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
0
Mei 26
|
1 | |||
|
3
Apr 25
|
7938 | |||
|
5
Nov 23
|
46290 | |||
|
Create dynamic tree view
Diselesaikan
|
3
Sep 23
|
11981 | ||
|
1
Jun 22
|
14902 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.