Re: [tryton-dev] proposal for new features for .ods reports

2012-09-27 Thread Cédric Krier
On 26/09/12 17:07 -0700, oscar_alvarez wrote:
 First, Add the .ods extension to setup.py in package_data for all 
 modules, the .ods file is a bit more flexibility for later work it for 
 the final users, because let it more options for data processing in LO 
 (statistics, 
 filters, functions, graphics, etc)

I don't get you. Why including file that doesn't exist?

 Second, When tryton generates the report for .ods extension, the fields 
 Numeric, Float, Integers are processed like String fields inside the 
 template, so this to do hard work the new render file, because, we can't to 
 realize computes about the data because are strings not numbers.

I think it is a relatorio issue.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/


pgpNRdftTZvbE.pgp
Description: PGP signature


[tryton-dev] country: Rename Cataluña to Catalunya (issue 542002)

2012-09-27 Thread resteve

Reviewers: ,



Please review this at http://codereview.tryton.org/542002/

Affected files:
  M country.xml


Index: country.xml
===

--- a/country.xml
+++ b/country.xml
@@ -9197,7 +9197,7 @@
 /record

 record model=country.subdivision id=es ct
-field name=nameCataluña/field
+field name=nameCatalunya/field
 field name=codeES CT/field
 field name=typeautonomous communities/field
 field name=country ref=es/



--
tryton-dev@googlegroups.com mailing list


[tryton-dev] Default Values Many2Many fields

2012-09-27 Thread Raimon Esteve
Hello,

a little question about framework: how to add default values in Many2Many
fields?

I tested and don't get good result this code:

def default_fieldm2m(self):
return [('set', [ID])]

In trytond/test/test.py aren't m2m defualt values to chek it :(

-- 
Si us plau, NO adjunti arxius a les seves respostes. Li preguem que integri
el text al cos del missatge. Pot respondre usant NetEtiquete que li ajudarà
a seguir la conversa. http://es.wikipedia.org/wiki/Netiquette

Por favor, NO adjunte archivos a sus respuestas. Le rogamos que integre el
texto en el cuerpo del mensaje. Puede responder usando NetEtiquete que le
ayudará a seguir la conversación.http://es.wikipedia.org/wiki/Netiquette

Please, DO NOT send attachment files with your answers, just copy and paste
only the text you need to send into the body of your mails. Repply using
NetEtiquete. http://en.wikipedia.org/wiki/Netiquette

Raimon Esteve
// Tryton - OpenERP :: Technical and consultor ERP
// OpenERP e-sale / Magento OpenERP
// AulaERP, formació online www.aulaerp.com
www.zikzakmedia.com

-- 
tryton-dev@googlegroups.com mailing list


[tryton-dev] trytond: cache set will return value in order to prevent using temporary variable for nothing (issue 543002)

2012-09-27 Thread nicolas . evrard

Reviewers: ,



Please review this at http://codereview.tryton.org/543002/

Affected files:
  M trytond/cache.py


Index: trytond/cache.py
===

--- a/trytond/cache.py
+++ b/trytond/cache.py
@@ -49,6 +49,7 @@
 cache = self._cache.setdefault(cursor.dbname,
 LRUDict(self.size_limit))
 cache[key] = value
+return value

 def clear(self):
 cursor = Transaction().cursor



--
tryton-dev@googlegroups.com mailing list


Re: [tryton-dev] Default Values Many2Many fields

2012-09-27 Thread Cédric Krier
On 27/09/12 13:20 +0200, Raimon Esteve wrote:
 Hello,
 
 a little question about framework: how to add default values in Many2Many
 fields?
 
 I tested and don't get good result this code:
 
 def default_fieldm2m(self):
 return [('set', [ID])]

It is just a list of ids

 In trytond/test/test.py aren't m2m defualt values to chek it :(

Thanks to write them :-)

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/


pgpxQpmBz9vlz.pgp
Description: PGP signature


Re: [tryton-dev] How to create template .ods for Tryton report?

2012-09-27 Thread Oscar Alvarez

El 26/09/12 18:46, zodman escribió:

On Wed, Sep 26, 2012 at 6:30 PM, Oscar Alvarez
oscar.alvarez.mont...@gmail.com wrote:

El 20/09/12 05:48, Nicolas Évrard escribió:


* oscar_alvarez  [2012-09-20 01:48 +0200]:

I am trying to create a .ods template file for a report in Tryton, but it
doesn't work, I think that my tryton code is fine, because I can to
generate empty file (opened in Libreoffice Calc) without objects, but
when
I put in it the placeholders/fields for the objects inside of the
template
file .ods with hyperlink option, tryton show protocol error.

In Writer LO, we use menu Insert  Fields, but in Calc doesn't exits it?


You can also use the alternate syntax that uses the Insert 
Hyperlink system:

http://relatorio.openhex.org/wiki/IndepthIntroduction

Has an example (and a link to an ods file).


Thanks, Solved it!

Oscar Alvarez

Colombia

--
tryton-dev@googlegroups.com mailing list

@oscar can you share the code ?



Of course,

First you must to create spreadsheet blank file (example named 
letter.ods) and put in company module.


so then in setup.py, add *.ods extension:

package_data={
'trytond.modules.my_module': info.get('xml', []) \
+ info.get('translation', []) \
+ ['*.odt', '*.ods', 'icons/*.svg'],
},

in xml file:

record model=ir.action.report id=report_my_module
field name=nameMy Module Report/field
field name=modelmodule.my_module/field
field name=report_namemodule.my_module_report/field
field name=reportmodule/report.ods/field
field name=stylecompany/letter.ods/field
/record

the link for the file example report.ods:

http://ubuntuone.com/22b4wKLPKQQYubvDXQQ13z

best regards,

Oscar Alvarez Montero


--
tryton-dev@googlegroups.com mailing list


Re: [tryton-dev] trytond: Add pre-validation (issue 536002)

2012-09-27 Thread Cédric Krier
On 24/09/12 20:31 +, cedric.kr...@b2ck.com wrote:
 Please review this at http://codereview.tryton.org/536002/

Could someone review this one, I would like to include it in the coming
release.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/


pgpjnI4GNiN07.pgp
Description: PGP signature


[tryton-dev] CIA.vc is dead

2012-09-27 Thread Cédric Krier
Hi,

CIA.vc [1] is dead. We used this service to get notification on the irc
channel #tryton-commit.
I'm looking for a simple replacement (better self-hosted). Is there
anyone who has something to recommand?

[1] http://cia.vc/

Thanks,
-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/


pgpzAPh0AoefF.pgp
Description: PGP signature


Re: [tryton-dev] CIA.vc is dead

2012-09-27 Thread zodman
On Thu, Sep 27, 2012 at 4:26 PM, Cédric Krier cedric.kr...@b2ck.com wrote:
 Hi,

 CIA.vc [1] is dead. We used this service to get notification on the irc
 channel #tryton-commit.
 I'm looking for a simple replacement (better self-hosted). Is there
 anyone who has something to recommand?

 [1] http://cia.vc/

 Thanks,
 --
 Cédric Krier

 B2CK SPRL
 Rue de Rotterdam, 4
 4000 Liège
 Belgium
 Tel: +32 472 54 46 59
 Email/Jabber: cedric.kr...@b2ck.com
 Website: http://www.b2ck.com/

It is a django app!

http://code.google.com/p/cia-vc/source/browse/

-- 
Andres Vargas
www.zodman.com.mx

-- 
tryton-dev@googlegroups.com mailing list


Re: [tryton] Use tryton as a framework

2012-09-27 Thread Raimon Esteve
2012/9/26 Valentin Hapiot vhap...@gmail.com

 Can I install a database from command line or proteus without all the
 ir.ui.* and ir.action.* tables ?


I don't understand why you need to install tryton server without this
tables. Can you explain it?

The names of this tables is Internal Resource. Tryton need this tables to
install all system. For example, ir_ui_menu you have all Tryton menus. When
tryton is installed, there are some menus are added, for example,
Administration and their menu chills.

After, when you install some modules, XML add information in ir* tables.
You need this tables.

-- 
Si us plau, NO adjunti arxius a les seves respostes. Li preguem que integri
el text al cos del missatge. Pot respondre usant NetEtiquete que li ajudarà
a seguir la conversa. http://es.wikipedia.org/wiki/Netiquette

Por favor, NO adjunte archivos a sus respuestas. Le rogamos que integre el
texto en el cuerpo del mensaje. Puede responder usando NetEtiquete que le
ayudará a seguir la conversación.http://es.wikipedia.org/wiki/Netiquette

Please, DO NOT send attachment files with your answers, just copy and paste
only the text you need to send into the body of your mails. Repply using
NetEtiquete. http://en.wikipedia.org/wiki/Netiquette

-- 
-- 
tryton@googlegroups.com mailing list





[tryton] Server Implementation

2012-09-27 Thread Tejas
Hello Everyone,

Implementation Of Tryton Server.


   - Can people let me about server architecture and theading system.

   - How does concurrency managed !

   - About therad model !

   - How much strong it, About benchmarking !

   - Whats Server configuration parameter for server system !

   - Database cursor behavior with instance!



Thanks in advance.
Tejas

-- 
-- 
tryton@googlegroups.com mailing list





[tryton] Install Tryton 2.4 Running from sources

2012-09-27 Thread Jordi Ballester Alomar
Hello! I'm following the steps documented in the following link in order to 
install Tryton on an Ubuntu server running from sources:
http://code.google.com/p/tryton/wiki/InstallationOnDebian

However I'm finding the following issues:
1) on step Take a look at /etc/mercurial/hgrc.d/hgnested.rc, how to 
activate the extension., I'm seeing no indication in that file on how to 
activate the extension, other than, uncomment the following lines:
# [extensions]
# hgnested =

I suppose that hgnested should point somewhere?

2) On step *copy init scripts (can be downloaded from 
herehttp://debian.tryton.org/gitweb/?p=packages/tryton-server.git;a=blob_plain;f=debian/tryton-server.init;hb=HEAD),
 
the link points to:*
http://debian.tryton.org/gitweb/?p=packages/tryton-server.git;a=blob_plain;f=debian/tryton-server.init;hb=HEAD
*
*
However the next instructions are incoherent:

# cp trytond /etc/init.d/trytond
# chmod +x /etc/init.d/trytond
# mkdir /usr/local/etc/default/
# cp trytond_default /usr/local/etc/default/trytond


, because they refer to 2 files, trytond and trytond_default instead of 
a single init file.


Regards,
Jordi
www.eficent.com

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Install Tryton 2.4 Running from sources

2012-09-27 Thread Jean Cavallo

 1) on step Take a look at /etc/mercurial/hgrc.d/hgnested.rc, how to
 activate the extension., I'm seeing no indication in that file on how to
 activate the extension, other than, uncomment the following lines:
 # [extensions]


No need for that, you really just need to uncomment in order to activate
the extension.

For your second point, I run a custom install of tryton on fedora, so
someone else should answer you.

Jean

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Install Tryton 2.4 Running from sources

2012-09-27 Thread zodman
On Thu, Sep 27, 2012 at 3:47 AM, Jean Cavallo jean.cava...@coopengo.com wrote:
 1) on step Take a look at /etc/mercurial/hgrc.d/hgnested.rc, how to
 activate the extension., I'm seeing no indication in that file on how to
 activate the extension, other than, uncomment the following lines:
 # [extensions]


 No need for that, you really just need to uncomment in order to activate the
 extension.

 For your second point, I run a custom install of tryton on fedora, so
 someone else should answer you.

 Jean

 --
 --
 tryton@googlegroups.com mailing list




In my personal option i use http://supervisord.org/ for manage the
trytond daemon

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Install Tryton 2.4 Running from sources

2012-09-27 Thread Craig Barnes
Hi Jordi,

On 27 September 2012 00:48, Jordi Ballester Alomar
jordi.balles...@eficent.com wrote:
 Hello! I'm following the steps documented in the following link in order to
 install Tryton on an Ubuntu server running from sources:
 http://code.google.com/p/tryton/wiki/InstallationOnDebian

 However I'm finding the following issues:
 1) on step Take a look at /etc/mercurial/hgrc.d/hgnested.rc, how to
 activate the extension., I'm seeing no indication in that file on how to
 activate the extension, other than, uncomment the following lines:
 # [extensions]
 # hgnested =

The mercurial site provides a little more detail on the configuration syntax.
http://mercurial.selenic.com/wiki/UsingExtensions#Enabling_an_extension


 I suppose that hgnested should point somewhere?

 2) On step copy init scripts (can be downloaded from here), the link
 points to:
 http://debian.tryton.org/gitweb/?p=packages/tryton-server.git;a=blob_plain;f=debian/tryton-server.init;hb=HEAD
 However the next instructions are incoherent:

 # cp trytond /etc/init.d/trytond
 # chmod +x /etc/init.d/trytond
 # mkdir /usr/local/etc/default/
 # cp trytond_default /usr/local/etc/default/trytond


 , because they refer to 2 files, trytond and trytond_default instead of
 a single init file.

These files (with slightly different names) appear to be available
from the same repo.
http://debian.tryton.org/gitweb/?p=packages/tryton-server.git;a=tree;f=debian;hb=HEAD

trytond should be the init script on the original link,
trytond_default looks like a defaults file used by the init, an
example seems to be available in the repo named tryton-server.defaults

HTH

Craig

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Use tryton as a framework

2012-09-27 Thread Valentin Hapiot
On Thursday, September 27, 2012 8:15:21 AM UTC+2, raimonesteve wrote:

 2012/9/26 Valentin Hapiot vha...@gmail.com javascript:

 Can I install a database from command line or proteus without all the 
 ir.ui.* and ir.action.* tables ?


 I don't understand why you need to install tryton server without this 
 tables. Can you explain it?


I don't understand why my original message was lost but there was an 
explanation about why I do want to do that.
In short, I want to use tryton as a framework, but I only need the object 
model and low level functionalities (res.users, cron, ...).
I don't need all the UI stuff. There will never be a client connected to 
the database, thus no action triggered, ...

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Use tryton as a framework

2012-09-27 Thread Valentin Hapiot


 You can use: 

 http://nereid.openlabs.co.in/docs/ 


Thank you but I don't want Flask either. I just want the barebones.

In nereid, do you know if they stripped the UI stuff or just ignore them ? 

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Server Implementation

2012-09-27 Thread Cédric Krier
On 27/09/12 11:55 +0530, Tejas wrote:
- Can people let me about server architecture and theading system.

trytond is multithreaded, one thread per connection.

- How does concurrency managed !

By the database isolation level.

- About therad model !

see above.

- How much strong it, About benchmarking !

Most of benchmarks don't give valid information.

- Whats Server configuration parameter for server system !

Don't understand.

- Database cursor behavior with instance!

Don't understand.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric.kr...@b2ck.com
Website: http://www.b2ck.com/


pgpDCW4azL4nY.pgp
Description: PGP signature


Re: [tryton] Use tryton as a framework

2012-09-27 Thread Nicolas Évrard
* Valentin Hapiot  [2012-09-27 14:30 +0200]: 

On Thursday, September 27, 2012 8:15:21 AM UTC+2, raimonesteve wrote:


2012/9/26 Valentin Hapiot vha...@gmail.com javascript:


Can I install a database from command line or proteus without all the
ir.ui.* and ir.action.* tables ?



I don't understand why you need to install tryton server without this
tables. Can you explain it?



I don't understand why my original message was lost but there was an
explanation about why I do want to do that.


For my own curiosity what do you want to use tryton for?


In short, I want to use tryton as a framework, but I only need the object
model and low level functionalities (res.users, cron, ...).
I don't need all the UI stuff. There will never be a client connected to
the database, thus no action triggered, ...


I am afraid the easiest way is to ignore the ir.ui stuff, you will
have some tables filled with useless stuff but the amount of disk
space wasted is little wrt the business data you will create.

--
Nicolas Évrard

B2CK SPRL
rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
E-mail/Jabber: nicolas.evr...@b2ck.com
Website: http://www.b2ck.com/


signature.asc
Description: Digital signature


Re: [tryton] Use tryton as a framework

2012-09-27 Thread Sharoon Thomas



On Sep 27, 2012, at 6:03 PM, Valentin Hapiot vhap...@gmail.com wrote:

 You can use: 
 
 http://nereid.openlabs.co.in/docs/ 
 
 Thank you but I don't want Flask either. I just want the barebones.
 
 In nereid, do you know if they stripped the UI stuff or just ignore them ? 
 

In nereid we ignore it (and use it) depending on the situation.

I think the best course of action would be to ignore it as it may not be worth 
the 
pain to remove ui.x models/module.

If you explain your reasoning for why you want to remove the module we might 
be able to offer better suggestions.

Thanks

Sharoon Thomas
Openlabs Technologies  Consulting (P) Limited

w: http://www.openlabs.co.in
m: +1 813.793.6736 (OPEN) Extn. 200
t: @sharoonthomas 

- We CARE for our customers

-- 
-- 
tryton@googlegroups.com mailing list





Re: [tryton] Install Tryton 2.4 Running from sources

2012-09-27 Thread Craig Barnes

 Yes, it was indeed there. However, I'm still missing the trytond.conf file
 to be but in /etc/trytond.conf.
http://debian.tryton.org/gitweb/?p=packages/tryton-server.git;a=blob;f=etc/trytond.conf;hb=HEAD

if you want to access the server from the network you will need to
change the jsonrpc value to something more appropriate.

I believe most (if not all) of the settings in here are as default so
this file helps as more of a guide.



 By the way, am I missing the whole point by attempting to do a manual
 install? After all, I did not want to use easy_install method  because it
 stores the trytond files in the default pythonpath, and I wanted Tryton to
 be in /opt instead.

It should work, you will need to ensure that your alternative path is
in your $PYTHONPATH environment variable for the user running the
service, and adjust the init file.

-- 
-- 
tryton@googlegroups.com mailing list





[tryton] Creating this search doman

2012-09-27 Thread Tristian Paul
Hi I've been struggling to create the following domain

I want all the records of a model for which one or both of two fields have 
 the same value 

and where created on a list of given days, each day starts at 0:0:0 and 
 ends at 23:59:59


For example in a person database containing the following model

class Person(ModelSQL):
# implicit create date
firstname = Char('Firstname')
lastname = Char('Lastname')

Here's the current domain that I have:
given that 
 
  dates = [date(2012, 9, 10, date(2012, 9, 2), date(2012,9,3) ]
 name = 'Smith'
dom = [
  ['OR',
  [('lastname', '=', name)],
  [('firstname', '=', name)]
 ],
 ['OR',
  [ [
  (CD, '=', dt(date(d.year, d.month, d.day), time(0, 
0, 0))),
  (CD, '', dt(date(d.year, d.month, d.day), time(23, 
59, 59))),
  ] for d in dates ]
  ]
  ]
   
Any help is really appreciated.

-- 
-- 
tryton@googlegroups.com mailing list