Hello,
I have wizard that I want to interact only with model views. My users will
use the wizard to lookup inventory and pricing for a product.
I have created a module and things are going along okay except I want to set
values for a Many2One field. I'm not sure what to pass in or if its even
possible.
I have an action that precedes the form like this:
'check': {
'actions': ['_check'],
'result': {
'type': 'form',
'object': 'product.stock_price_check.init',
'state': [
('end', 'Cancel', 'tryton-cancel'),
('check', 'Check', 'tryton-ok', True),
],
},
}
The action should return the fields that I want to be used in the form(or at
least that seems to work).
I cannot figure out what to pass for Many2One fields such as this:
class CheckProductInit(ModelView):
_name = 'product.stock_price_check.init'
#...
stock_lines
= fields.One2Many('product.stock_price_check.init.stock_line',
'check_product', 'Stock Lines',
readonly=True)
I need to make these stock lines, they are a class that inherits from
ModelView, in _check and send them to the form but ModelView does not have
create method and a dictionary does not work. I thought I had done this
before in another module but I can't find any examples of this in my modules
or in the system modules.
Anyways any help would be appreciated.
Thanks,
Ian
--
[email protected] mailing list