Re: [tryton] What is the state of server-side sending mail/messages/notifications in 3.2?

2014-10-07 Thread Nicolas Évrard
* Dale Scott [2014-10-08 06:25:05 +0200]
> Hi Pierre-Louis, thank you for clarifications.
> 
> > On Oct 7, 2014, at 9:11 PM, Pierre-Louis Bonicoli 
> >  wrote:
> > 
> >> On 08/10/2014 01:53, Dale Scott wrote:
> > 
> >> Assuming trytond does send mail server-side, I am trying to
> >> understand why both are required - in my situation I require all mail
> >> be sent server-side to avoid needing user workstation configuration.
> > 
> > The SMTP configurations of the client and the server are unrelated:
> > mails sent by the Tryton client use the configuration of the 'mail reader'.
> 
> Is the *only* purpose of client-side mail sending (from the Tryton
> client) to send report attachments?

Currently yes it is.

> Is there a way to send reports from server-side?

In that case you should create a module and use the smtp configuration
of trytond (the tools module provides a function to get a smtplib SMTP
client).

Then you can call the report and send the received data through the
SMTP client.

-- 
Nicolas Évrard - B2CK SPRL
E-mail/Jabber: nicolas.evr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/


signature.asc
Description: PGP signature


Re: [tryton] What is the state of server-side sending mail/messages/notifications in 3.2?

2014-10-07 Thread Dale Scott
Hi Pierre-Louis, thank you for clarifications.

> On Oct 7, 2014, at 9:11 PM, Pierre-Louis Bonicoli 
>  wrote:
> 
>> On 08/10/2014 01:53, Dale Scott wrote:
>> Is there a general rule for which events in Tryton can be expected to
>> send mail?
> 
> With 3.2, the cron tasks (when an error occurs) [1] and the module
> calendar_scheduling [2] send mails using the SMTP server configured in
> 'trytond.conf'. Default parameters are: host 'localhost', port '25', no
> authentication, without ssl/tls [3] (you don't need to uncomment the
> default values).
> 
>> I see the only mail-related modules for Tryton 3.2 in pip/pypi[4][5] 
>> appears to be openlabs_email_queue[6]. Does this module have any 
>> relevance for base modules I have installed, or is this module only 
>> relevant to a new module that is specifically coded to use it?
> 
> "electronic-mail" [4] is a partial implementation of the blueprint for
> email integration [5] and was previously named "trytond_electronic_mail".
> "openlabs_email_queue" [6] is another unrelated module.
> Both modules have one thing in common: they are developed by OpenLabs.
> 
>> It appears from the Tryton GUI (Options > Email) that a client-side
>> mail client can be invoked to send mail, but the Tryton GUI
>> documentation refers to a "mail reader"[7]. Am I correct that the
>> purpose is to send mail (not read), and if so, what examples based on
>> experience are there for a user needing to send mail client-side?
> 
> Indeed, the purpose is to send mail (according to Wikipedia 'email
> client' and 'email reader' are synonyms [7]), for example to send a
> report as an email attachment. See also the Email widget used in
> 'Contact Mechanisms' form of the view 'Party'.
> 
>> Assuming trytond does send mail server-side, I am trying to
>> understand why both are required - in my situation I require all mail
>> be sent server-side to avoid needing user workstation configuration.
> 
> The SMTP configurations of the client and the server are unrelated:
> mails sent by the Tryton client use the configuration of the 'mail reader'.

Is the *only* purpose of client-side mail sending (from the Tryton client) to 
send report attachments? Is there a way to send reports from server-side?

> 
> [1] http://hg.tryton.org/trytond/file/0d923063b3d8/trytond/ir/cron.py#l126
> [2]
> http://hg.tryton.org/modules/calendar_scheduling/file/a13ecbad4b3a/calendar_.py#l220
> [3] http://hg.tryton.org/trytond/file/0d923063b3d8/trytond/config.py#l67
> [4] https://github.com/openlabs/electronic-mail
> [5] https://code.google.com/p/tryton/wiki/EmailIntegration
> [6] https://github.com/openlabs/email-queue
> [7] http://en.wikipedia.org/wiki/E-mail_reader
> 
> --
> Pierre-Louis


Re: [tryton] What is the state of server-side sending mail/messages/notifications in 3.2?

2014-10-07 Thread Pierre-Louis Bonicoli
On 08/10/2014 01:53, Dale Scott wrote:
> Is there a general rule for which events in Tryton can be expected to
> send mail?

With 3.2, the cron tasks (when an error occurs) [1] and the module
calendar_scheduling [2] send mails using the SMTP server configured in
'trytond.conf'. Default parameters are: host 'localhost', port '25', no
authentication, without ssl/tls [3] (you don't need to uncomment the
default values).

> I see the only mail-related modules for Tryton 3.2 in pip/pypi[4][5] 
> appears to be openlabs_email_queue[6]. Does this module have any 
> relevance for base modules I have installed, or is this module only 
> relevant to a new module that is specifically coded to use it?

"electronic-mail" [4] is a partial implementation of the blueprint for
email integration [5] and was previously named "trytond_electronic_mail".
"openlabs_email_queue" [6] is another unrelated module.
Both modules have one thing in common: they are developed by OpenLabs.

> It appears from the Tryton GUI (Options > Email) that a client-side
> mail client can be invoked to send mail, but the Tryton GUI
> documentation refers to a "mail reader"[7]. Am I correct that the
> purpose is to send mail (not read), and if so, what examples based on
> experience are there for a user needing to send mail client-side?

Indeed, the purpose is to send mail (according to Wikipedia 'email
client' and 'email reader' are synonyms [7]), for example to send a
report as an email attachment. See also the Email widget used in
'Contact Mechanisms' form of the view 'Party'.

> Assuming trytond does send mail server-side, I am trying to
> understand why both are required - in my situation I require all mail
> be sent server-side to avoid needing user workstation configuration.

The SMTP configurations of the client and the server are unrelated:
mails sent by the Tryton client use the configuration of the 'mail reader'.

[1] http://hg.tryton.org/trytond/file/0d923063b3d8/trytond/ir/cron.py#l126
[2]
http://hg.tryton.org/modules/calendar_scheduling/file/a13ecbad4b3a/calendar_.py#l220
[3] http://hg.tryton.org/trytond/file/0d923063b3d8/trytond/config.py#l67
[4] https://github.com/openlabs/electronic-mail
[5] https://code.google.com/p/tryton/wiki/EmailIntegration
[6] https://github.com/openlabs/email-queue
[7] http://en.wikipedia.org/wiki/E-mail_reader

--
Pierre-Louis


Re: [tryton] Why not killing company?

2014-10-07 Thread Albert Cervera i Areny
2014-09-12 17:55 GMT+02:00 Cédric Krier :
> On 12 Sep 16:29, Dominique Chabord wrote:
>> hello
>>
>> I've never seen, up to now, a sane use of multi-company
>> As far as business applisation is concerned, I don't even think it can
>> be a legal approach in EU. Group reports are the worst reason to do
>> it.
>
>> As Sebastian explained, there is a problem to move existing
>> multi-companiy solutions.
>
> Indeed I really think it is doable to split such DB into many DB.
>
> - make a copy of the DB for each company
> - add delete cascading on all company foreign key
> - delete all but one company
> - remove the delete cascading
> - update the DB

I've created a simple script that helps in removing stuff. It's been
quick and for the usage in a working database so there are some
specific tables, but at least there's a function that can be easily
used to cascade without setting cascade in all foreign keys. Of
course, the latter would be better and more generic, but just in case
it is useful to somebody else:

https://bitbucket.org/nantic/tryton-tasks/src/e9b83654b3b4a1da0c3555401bc8c1a268f67e92/single-company.py?at=default

-- 
Albert Cervera i Areny
Tel. 93 553 18 03
@albertnan
www.NaN-tic.com


Re: [tryton] Tryton 3.2 Repository

2014-10-07 Thread Nicolas Évrard
Excerpts from Farid Shahy's message of 2014-10-07 10:06:59 +0200:
> 
> On 10/07/2014 11:28 AM, Raimon Esteve wrote:
> >
> >
> > 2014-10-07 9:45 GMT+02:00 Farid Shahy  > >:
> >
> > Hi
> > Wanted to get Tryton 3.2 series from repository at
> > http://hg.tryton.org/
> > but it seems to be the trunk version. I can download it from
> > http://downloads.tryton.org/3.2/
> > but I prefer to get from repository to be able to update in
> > future. Am I missing something?
> >
> >
> > get 3.2 branch for each module or tryton or trytond.
> >
> >
> Thanks Raimon
> I know every module is maintained separately, but where the repository 
> is located?

All the repositories have been merged into a single repository and
each branch is now a mercurial branch.

-- 
Nicolas Évrard - B2CK SPRL
E-mail/Jabber: nicolas.evr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/


Re: [tryton] Tryton 3.2 Repository

2014-10-07 Thread Mathias Behrle
* Farid Shahy: " Re: [tryton] Tryton 3.2 Repository" (Tue, 07 Oct 2014 11:36:59
  +0330):

> 
> On 10/07/2014 11:28 AM, Raimon Esteve wrote:
> >
> >
> > 2014-10-07 9:45 GMT+02:00 Farid Shahy  > >:
> >
> > Hi
> > Wanted to get Tryton 3.2 series from repository at
> > http://hg.tryton.org/
> > but it seems to be the trunk version. I can download it from
> > http://downloads.tryton.org/3.2/
> > but I prefer to get from repository to be able to update in
> > future. Am I missing something?
> >
> >
> > get 3.2 branch for each module or tryton or trytond.
> >
> >
> Thanks Raimon
> I know every module is maintained separately, but where the repository 
> is located?

Hi Farid,

the branches are all in one repository. To get the branch change to the
repository and run

hg checkout 3.2

You can find hints in the wiki at
https://code.google.com/p/tryton/wiki/InstallationMercurial
and subsequent pages.

Cheers,
Mathias
-- 

Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6


signature.asc
Description: PGP signature


Re: [tryton] Tryton 3.2 Repository

2014-10-07 Thread Farid Shahy


On 10/07/2014 11:28 AM, Raimon Esteve wrote:



2014-10-07 9:45 GMT+02:00 Farid Shahy >:


Hi
Wanted to get Tryton 3.2 series from repository at
http://hg.tryton.org/
but it seems to be the trunk version. I can download it from
http://downloads.tryton.org/3.2/
but I prefer to get from repository to be able to update in
future. Am I missing something?


get 3.2 branch for each module or tryton or trytond.



Thanks Raimon
I know every module is maintained separately, but where the repository 
is located?


Re: [tryton] Tryton 3.2 Repository

2014-10-07 Thread Raimon Esteve
2014-10-07 9:45 GMT+02:00 Farid Shahy :

> Hi
> Wanted to get Tryton 3.2 series from repository at http://hg.tryton.org/
> but it seems to be the trunk version. I can download it from
> http://downloads.tryton.org/3.2/
> but I prefer to get from repository to be able to update in future. Am I
> missing something?
>

get 3.2 branch for each module or tryton or trytond.


[tryton] Tryton 3.2 Repository

2014-10-07 Thread Farid Shahy

Hi
Wanted to get Tryton 3.2 series from repository at http://hg.tryton.org/
but it seems to be the trunk version. I can download it from 
http://downloads.tryton.org/3.2/
but I prefer to get from repository to be able to update in future. Am I 
missing something?


Thanks
Farid Shahy