On 08/11/11 20:39 +0100, leo venturini wrote:
> > > def get_plan_companies(self, ids, name):
> > > if not ids:
> > > return []
> > > res = {}
> > > for Edition in self.browse(ids):
> > > Project = Edition.Project
> > > TrainingPlan = Project.TrainingPlan
> > > Companies = TrainingPlan.Company
> > > #for Company in Companies:
> > > # res[Company.id] = Company.name
> > res[Edition.id] = [c.id for x in TrainingPlan.Company]
> > > print res
> > > return res
> > >
>
> perfect, now it works! The only 'weird' thing is that i *must* have the
> PlanCompanies field into the Edition form, wich is quite useless but i
> set invisible=1 into the xml so it's not really a problem.No you must set 'companies' in depends of the field Company. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpwyvrQ3MyyA.pgp
Description: PGP signature
