You could use the 'context' parameter of the O2M field to set a value in
the context of the transaction. So you can test it in the default, and do
something (or not) depending on the test result.

Jean CAVALLO
Coopengo


2013/6/10 Sergi Almacellas Abellana <[email protected]>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi devs,
>
> I have a custom module which add's a One2Many between,
> sale_opportunity and timesheet_lines. It works perfectly, but I also
> have and extra requirement:
>
> - - Add a default value on the work field of the lines created from the
> opportunity, so all the timesheet_lines created from the
> sale_opportunity have a default value and the ones created from
> timesheet report havent a default value.
>
> So that would be a "default_value_depending" on view.
>
> Is that possible with the tryton framework?
>
> Thanks in advance.
> - --
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJRtc8WAAoJEGRfwiQCVal5+FYH/jgrW55RJELTsJa/qDQAZMNI
> MXH65ih2AoSPLcTPL2y1p9HBZRWWyUVGXRNOTLC96EfSjJqKrr7P0Rpp6vqbgNnG
> kDMIWpxDXVFyyxrYc08mkVi1fdagmyOFwne6bP4jH12F2nM8g6pjdHdoPGGEPBHK
> Af0tbtWE1FBdKUBtED8es56tGUFJX7tVvjMNv3cSO2KylSI50x8o7d4pUwbXiFis
> nbDWFNEiV24HWwnPLFBl8IcQ+MzytypMdKImZN079RReFpI3L1KZzQxzpFnjPCbe
> XRLxYEkdjnrJGbAq3agqePywDKGLSULFzyqPbBWojpO1vW6+mPbwNtRWfNr7gPg=
> =vMCP
> -----END PGP SIGNATURE-----
>

Reply via email to