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]
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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>
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
3
квіт. 25
|
3718 | ||
|
5
лист. 23
|
41932 | ||
Create dynamic tree view
Вирішено
|
|
3
вер. 23
|
8807 | |
|
1
черв. 22
|
11909 | ||
|
3
бер. 20
|
10475 |