Hi, I'm using odoo 14 and here is my situation:
class User(Model):
_name = "user"
name = fields.Char()
class Project(Model):
_name = "project"
name = fields.Char()
class Task(Model):
_name = "task"
name = fields.Char()
user_id = fields.Many2one("user")
project_id = fields.Many2one("project")
Both User and Project have the inverse fields to Task.
Is it possible to put a Project tree view with all the records in the User form view? I would like to create a new Task from the User form view and clicking on the Project record to which the task is to be assigned I would like a Task form view to appear with the Task user_id and project_id fields already set according to the context.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
807
Views
Thank you for the answer! The one2many fields referred to Task already exist inside User and Project. However, there is not relation between User and Project and I don't know if it is possible put a Project tree view inside User form view.
Normally I would:
- Add task_ids to user and Project like
task_ids = fields.One2many("task","user_id")
then in the xml:
...
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up