Odoo Help
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
|
etc.
write on many2many field
hii... iam using a 6.0 version of "openerp" and iam trying to write on many2many field
_columns={
'referencia' : fields.char("Referência",size=64, required=True),
'data_consulta' : fields.date("Data da Consulta", required=True, readonly=False),
'especialidade' : fields.many2one('dotcom.consutorio.especialidades',"Especialidade"), 'lista_medicos_por_especialidade': fields.many2many('dotcom.consutorio.medicos','rel_consulta_medicos','medicos_id','consutas_id'), }
the method is on the same class ...dont give any error but do not fill the
list medicos_ids=self.pool.get('dotcom.consutorio.medicos').search(cr,uid,[ ('especialidade','=',documento.especialidade.id)]) self.write(cr,uid,ids,{'lista_medicos_por_especialidade':[(medicos_ids,5)]}) return True
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 10/17/16, 6:17 AM |
Seen: 783 times |
Last updated: 10/17/16, 9:40 AM |
contains elements!