class Model1(models.Model):
_name = "module.model1"
m1_field1 = fields.One2many(
'module.model2',
'm2_field3',
)
class Model2(models.Model):
_name = "module.model2"
m2_field1 = fields.Char(
'Field Name',
required=True,
)
m2_field2 = fields.Char(
'Field Value',
required=True,
)
m2_field3 = fields.Many2one(
"module.model1",
required=True,
index=True,
)
problem statement: filter records of Model1 where m2_field2 = for m2_field1 in tree/kanban view of Model1.
in other words, the requirement is to show values of m2_field1 in tree view and take user input for respective m2_field2 values and filter accordingly dynamically.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
3204
Prikazi
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
PrijaviRelated Posts | Odgovori | Prikazi | Aktivnost | |
---|---|---|---|---|
|
1
mar. 23
|
2758 | ||
|
0
dec. 22
|
3361 | ||
|
0
jun. 20
|
5786 | ||
One2many or many2one
Solved
|
|
1
nov. 19
|
2995 | |
|
0
dec. 18
|
93 |