How to get the default party address

23 vues
Accéder directement au premier message non lu

Vincent Bastos

non lue,
8 mars 2016, 07:42:3008/03/2016
à tryton
Hi,

I was wondering how I can "get" the default party address. I think that by convention the first address is the default one.

Is it as simple as something like lease.party.address?

lease is an model with a Many2One field party.party.

Thanks.

Sergi Almacellas Abellana

non lue,
8 mars 2016, 07:53:2808/03/2016
à try...@googlegroups.com
El 08/03/16 a les 13:42, Vincent Bastos ha escrit:
> Hi,
>
> I was wondering how I can "get" the default party address. I think that
> by convention the first address is the default one.
>
> Is it as simple as something like lease.party.address?

It seems you are searching address_get method [1]

[1] http://hg.tryton.org/modules/party/file/6716ff45f83e/party.py#l204

>
> lease is an model with a Many2One field party.party.
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "tryton" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton/a917ea82-5739-4b60-9412-ba3677c9caa9%40googlegroups.com
> <https://groups.google.com/d/msgid/tryton/a917ea82-5739-4b60-9412-ba3677c9caa9%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Vincent Bastos

non lue,
8 mars 2016, 07:56:1408/03/2016
à try...@googlegroups.com
On Tue, Mar 8, 2016 at 10:53 PM, Sergi Almacellas Abellana <se...@koolpi.com> wrote:
El 08/03/16 a les 13:42, Vincent Bastos ha escrit:
Hi,

I was wondering how I can "get" the default party address. I think that
by convention the first address is the default one.

Is it as simple as something like lease.party.address?

It seems you are searching address_get method [1]

[1] http://hg.tryton.org/modules/party/file/6716ff45f83e/party.py#l204

Thanks mate! 


--
Vincent Bastos
Lava Lab Software

Vincent Bastos

non lue,
8 mars 2016, 08:14:4808/03/2016
à try...@googlegroups.com
I am actually using 3.4 so the method is address_get in my case. 
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message