[OGo-Users] Print the location address instead of mail address in formletters

Adam Tauno Williams users@opengroupware.org
Thu, 24 Jan 2008 08:41:02 -0500


--=-s62VHptOSmlTwNu2/SvN
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> > So you should be able to specify the specific address in a formletter b=
y
> > using the address kind instead of "toAddress" and get the value you
> > want.
> > Like -=20
> > formletter_kinds =3D ("myForm");
> > LSEnterpriseFormLetter =3D {
> >   myForm =3D (
> >       { key =3D "ship.name1";      suffix =3D "\n";             },
> >       { key =3D "ship.name2";      suffix =3D "\n";             },
> >       { key =3D "ship.name3";      suffix =3D "\n";             },
> >       { key =3D "ship.street";     suffix =3D "\n";             },
> >       { key =3D "ship.zip";        suffix =3D " ";              },
> >       { key =3D "ship.city";       suffix =3D "\n\n\n\n\n\n\n"; },
> >       { key =3D "toPerson.salutation";  suffix =3D " ";              },
> >       { key =3D "toPerson.name";        suffix =3D ",\n\n";          }
> >     );
> >  - for example.
> Yes this should work. Some time ago I had the same problem and since we
> had just bought a feature from Skyrix we got a config file doing just
> this. This config just exports all addresses. Additionally it also
> changes the behaviour for enterprise addresses in that it always takes
> the address of the contact not that of the company.

Interesting.  So you potentially get multiple output records per
enterprise,  one for each contact linked to the enterprise?

> RequiredAttributes =3D {
>     Person      =3D ("degree", "firstname", "name", "salutation", "sex",
>                   "email1", "isGeek", "petName" );

"isGeek" & "petName" must automatically get mapped to company values
(since they aren't model attributes)?  [Looks like it,
extendedAttrsForEntity in
Logic/LSAddress/LSAddressFetchAttributesCommand.m]

>     Enterprise  =3D ("description", "bank", "bank_code", "account");
>     Address     =3D ("name1", "name2", "name3", "street", "zip", "city");
>     Telephone   =3D ("number", "type", "info");
>   };

Looks like the default default is -
  RequiredAttributes =3D {
    Person      =3D ("degree", "firstname", "name", "salutation", "sex",
                  "email1");
    Enterprise  =3D ("description", "bank", "bank_code", "account");
    Address     =3D ("name1", "name2", "name3", "street", "zip", "city");
    Telephone   =3D ("number", "type", "info");
  };

>   LSEnterpriseFormLetter =3D {
>     enterprise_formletter_test =3D (
>       { key =3D "toAddress.name1";      suffix =3D "\n";             },
>       { key =3D "toAddress.name2";      suffix =3D "\n";             },
>       { key =3D "toAddress.name3";      suffix =3D "\n";             },
>       { key =3D "toAddress.street";     suffix =3D "\n";             },
>       { key =3D "toAddress.zip";        suffix =3D " ";              },
>       { key =3D "toAddress.city";       suffix =3D "\n\n\n\n\n\n\n"; },
>       { key =3D "toPerson.salutation";  suffix =3D " ";              },
>       { key =3D "toPerson.name";        suffix =3D ",\n\n";          }
>     );
>   };

This looks like it still output the address of the enterprise?  With the
name and salutation of the contact?  Can you do a
"toPerson.mailing.street", for example, to reference the address of the
related contact?

--=20
          Consonance: an Open Source .NET OpenGroupware client.
 Contact:awilliam@whitemiceconsulting.com   http://freshmeat.net/projects/c=
onsonance/

--=-s62VHptOSmlTwNu2/SvN
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQBHmJVuLRePpNle04MRAn8mAJ968zpMpYVMW5H7WuFidsDSSoZkKACfS71X
m/yHTv0A/GmWMNshrqj011I=
=/q92
-----END PGP SIGNATURE-----

--=-s62VHptOSmlTwNu2/SvN--