Steven Lightfoot
2018-03-05 13:51:17 UTC
Hi
What is the easiest way of filling a selection field dynamically? I need to fill it based on a custom product class that has a description and up to 8 can sizes (different products will have different available can sizes)
Using a classmethod function does not give me the access to the instance values so I assume that a function field is the way to go but the only examples I can see using a function field is to set a value from a predefined list.
Should I be going down the route of using One2Many, Many2one fields?
No idea if this makes sense or not :-)
If not then I will go forth back to the shadows from whence I came!!!!
What is the easiest way of filling a selection field dynamically? I need to fill it based on a custom product class that has a description and up to 8 can sizes (different products will have different available can sizes)
Using a classmethod function does not give me the access to the instance values so I assume that a function field is the way to go but the only examples I can see using a function field is to set a value from a predefined list.
Should I be going down the route of using One2Many, Many2one fields?
No idea if this makes sense or not :-)
If not then I will go forth back to the shadows from whence I came!!!!
--
You received this message because you are subscribed to the Google Groups "tryton" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/0caebec1-d152-49f6-b5eb-5c1e72318ae4%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "tryton" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/0caebec1-d152-49f6-b5eb-5c1e72318ae4%40googlegroups.com.