i want to use Many2one field as a states which is show at the statusbar,
and show only few modes their others are invisible.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i want to use Many2one field as a states which is show at the statusbar,
and show only few modes their others are invisible.
Hi,
Yes you can use many2one field to represent the state. If you install the project module in odoo, you can see similar thing in the task. Where the stage_id is the many2one field with comodel "project.task.type"
in XML,
<field name="stage_id" widget="statusbar"/>
Thanks
thanks for the answer, now i want to show some of them states into statusbar...
in the selection field their is attribute called "statusbar_visible" but in the many2one field that is not acceptable.
In the project module, stages cane be specified for which all the projects task the stage has to be visible, you can use the same concept here too
Hi
you should add another selection field which call "selection_stage_id" and selection list should come from function that function get data from stage_id model.
Then you can use <field name="selection_stage_id" widget="statusbar"/>.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Hi,
Have you got the answer ?
I found out one way to do it
That if you like dynamic domain then this is the trick
First you have your stage id( many2one) field
Then you have to create one more many2one field as compute field ...
You compute a list of stage ids in return of that compute function..
Then in xml put a domain like
domain=[('stage_id', 'in', yourcustomfield)]
And that's it