openerp - many2one default value with a one2many relation -


मेरे पास निम्न कोड है:

  class table_a (osv.osv): _name = "Table.a" _columns = {'name': fields.char ('name', size = 64), 'link_to_b': fields.one2many ('table.b', 'link_to_a', 'लिंक टू बी'), } Table_a () वर्ग table_b (osv.osv): _name = "table.b" _columns = {'name': fields.char ('name', size = 64), 'link_to_a': fields.many2one ('table। एक ',' link_to_a '),} table_b ()  

(और इन स्तंभों के साथ फार्म और पेड़ प्राप्त करने के लिए एक सरल XML)

जब मैं एक रिकॉर्ड बना देता हूं Table.b सूची के माध्यम से 'लिंक टू बी' तालिका के एक रूप में। क्या यह 'link_to_a' के साथ लिंक का डिफ़ॉल्ट मान होना संभव है? कैसे?

अग्रिम धन्यवाद।


Comments

Popular posts from this blog

python - rpy2 import is not working -

javascript - How to get MySQL query result returned using $.ajax -

javascript - How to use the code plugin with popcornjs -