Fri, 04/11/2011 alle 12.44 +0100, Korbinian Preisler ha scritto:
> Hi,
>
> you need to create a default_function for the country field on the model
> train.TrainingStaff.
>
> def default_country(self):
> return Transaction().context.get('country', False)
>
> --
> Korbinian Preisler
thanks but this didn't solve the problem
Fri, 04/11/2011 alle 12.57 +0100, Cédric Krier ha scritto:
> Indeed it is a bug, country.subdivision should have a field country in
the
> form view as it is required.
> Fill a bug and you can also submit a patch for it.
>
ok, i added the country field to country.subdivision_view_form and now
the country field is displayed into the form, evaluated to the
train.TrainingStaff.country field value, so now it works like a charm.
The only strange behaviour is that now in the subdivision form showed
inside Administration -> Countries the space for the country field is
reserved but the field is not shown (but subdivision saving works
correctly anyway). I solved adding a newline tag after the country field
and now the Administration -> Countries -> subdivision form appears like
it was before the change (without the country field)
I opened the bug on bugs.tryton.org: I'm no use to such operations so i
hope i didn't mess up something, i assigned it to me and uploaded the
modified country.xml file. Please have patience and let me know it
there's something else i should do
Leo Venturini
--
[email protected] mailing list