Re: [tryton] Proteus

2018-01-10 Thread Cato Nano
Il giorno giovedì 11 gennaio 2018 01:10:06 UTC+1, Cédric Krier ha scritto:
> On 2018-01-10 11:52, Cato Nano wrote:
> > When called from within a python3 prompt, Proteus gets found
> > 
> > But this time xmlrpclib is missing
> > 
> > Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
> 
> xmlrpclib is a standard library of Python so it should not be declared
> as dependency.
> But indeed xmlrpclib is the name for Python2, in Python3 it should be
> xmlrpc.
> Normally, when installing proteus with Python3, the code is transformed
> and xmlrpclib is changed for xmlrpc. So it seems the installation is
> wrong. I guess it should be reported to the distribution you are using.
> 
> -- 
> Cédric Krier - B2CK SPRL
> Email/Jabber: cedric.kr...@b2ck.com
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/

Thank you Cedric

I already opened a thread with the Debian Tryton mantainers

I'll report to them your observation 

-- 
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/dd5aa4e1-8248-4b9a-af16-2673d9c9d36d%40googlegroups.com.


Re: [tryton-es] País predeterminado

2018-01-10 Thread Raimon Esteve
El dia 11 gen. 2018 12:56 a. m., "Josias Pérez"  va
escriure:

Hola amigos,

Quisiera hacer una consulta que espero sea sencilla de resolver. Al momento
de crear un tercero y registrar la dirección es necesario buscar el país, y
luego que cargue las subdivisiones.

¿Hay alguna forma de agregar un default_country?


El   mòdul country_zip te permite definir un país pot defecto en la
configuración del tercero.


Desde ya gracias por la ayuda!


Re: [tryton] Proteus

2018-01-10 Thread Cédric Krier
On 2018-01-10 11:52, Cato Nano wrote:
> When called from within a python3 prompt, Proteus gets found
> 
> But this time xmlrpclib is missing
> 
> Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file

xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
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/20180111000732.GE3972%40kei.


Re: [tryton] Party view

2018-01-10 Thread Cédric Krier
On 2018-01-10 11:56, Cato Nano wrote:
> The view/party_form.xml file contains a view with a  "notebook" with 2 pages 
> within it
> 
> The 2 pages are "General" and "identifiers"
> 
> But in the GUI I see 2 more tabs: Accounting and Stock
> 
> Where do they come from ?

>From the module account and stock which extend the views:
http://doc.tryton.org/4.6/trytond/doc/topics/views/extension.html#topics-extension

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
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/20180111000901.GF3972%40kei.


[tryton-es] País predeterminado

2018-01-10 Thread Josias Pérez
Hola amigos,

Quisiera hacer una consulta que espero sea sencilla de resolver. Al momento 
de crear un tercero y registrar la dirección es necesario buscar el país, y 
luego que cargue las subdivisiones. 

¿Hay alguna forma de agregar un default_country?

Desde ya gracias por la ayuda!


[tryton] Party view

2018-01-10 Thread Cato Nano
The view/party_form.xml file contains a view with a  "notebook" with 2 pages 
within it

The 2 pages are "General" and "identifiers"

But in the GUI I see 2 more tabs: Accounting and Stock

Where do they come from ?

Thanks in advance

-- 
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/85760957-db54-4376-8ed8-41c43caa1aa4%40googlegroups.com.


Re: [tryton] Proteus

2018-01-10 Thread Cato Nano
Il giorno mercoledì 10 gennaio 2018 19:30:07 UTC+1, Cédric Krier ha scritto:
> On 2018-01-10 08:59, Cato Nano wrote:
> > This
> > 
> > $ python
> > Python 2.7.14 (default, Sep 17 2017, 18:50:44) 
> > [GCC 7.2.0] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> from proteus import config, Model
> > Traceback (most recent call last):
> >   File "", line 1, in 
> > ImportError: No module named proteus
> > >>> 
> > 
> > 
> > Of course Proteus is installed with apt-get
> 
> I guess you are not using the right Python for which proteus was
> installed.
> Maybe you are under a virtualenv, in this case you should install
> proteus using `$ pip install proteus`.
> 
> -- 

Thank you people

No, I' m not using virtualenv.

But I found a couple of facts.

When called from within a python3 prompt, Proteus gets found

But this time xmlrpclib is missing

Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file

I think I' ll take Fredy's suggestion, I'll build Proteus on my own and try to 
use that

Only, not right now.
Tomorrow
Thanks for your suggestions
Good night 

-- 
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/f5e19135-03d9-4e13-aa0a-b8bef0c826d8%40googlegroups.com.


Re: [tryton] Proteus

2018-01-10 Thread Cédric Krier
On 2018-01-10 08:59, Cato Nano wrote:
> This
> 
> $ python
> Python 2.7.14 (default, Sep 17 2017, 18:50:44) 
> [GCC 7.2.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from proteus import config, Model
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named proteus
> >>> 
> 
> 
> Of course Proteus is installed with apt-get

I guess you are not using the right Python for which proteus was
installed.
Maybe you are under a virtualenv, in this case you should install
proteus using `$ pip install proteus`.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
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/20180110182948.GC3972%40kei.


[tryton] why doesn' t this field get assigned ?

2018-01-10 Thread Cato Nano
I have these 2 fields

numeroGiorni = fields.Function(fields.Integer('Numero 
Giorni'),'on_change_with_numeroGiorni')
@fields.depends('dataInizio', 'dataFine')
def on_change_with_numeroGiorni(self, name=None):
if self.dataInizio and self.dataFine:
return abs((self.dataFine - self.dataInizio).days) + 1
return 0

[...]

fattoreGiorni = fields.Function(fields.Numeric('fattoreGiorni'), 
'on_change_with_fattoreGiorni')

@fields.depends('numeroGiorni')
def on_change_with_fattoreGiorni(self, name=None):
return (self.numeroGiorni - 10) / 5


fattoreGiorni DOESN'T get assigned
I can't see why

-- 
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/ebafa43c-f12c-4058-8d9a-d91ae05c32c4%40googlegroups.com.


[tryton] Proteus

2018-01-10 Thread Cato Nano
This

$ python
Python 2.7.14 (default, Sep 17 2017, 18:50:44) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from proteus import config, Model
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named proteus
>>> 


Of course Proteus is installed with apt-get

This is more of a Debian/Python question than Tryton
Please bear with me

I'd like to use Proteus to debug one of my calculated fields, that's not working

Currently I have to reload the whole client and log in again every time I 
change something

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/386f8265-ab17-4499-a136-440f81404843%40googlegroups.com.


Re: [tryton] what are sequences ?

2018-01-10 Thread Cato Nano
Il giorno mercoledì 10 gennaio 2018 11:01:04 UTC+1, Sergi Almacellas Abellana 
ha scritto:
> El 10/01/18 a les 10:15, Cato Nano ha escrit:
> > Hello
> > 
> > I' d like to have a setup with a relation in my project
> > 
> > Similar to Sale and Sale Lines
> > 
> > I made the models, they compile and run.
> > Now I only neeed a basic form with a list of lines within it
> > 
> > But I' m a bit confused
> > 
> > In sale.xml I see these 2 records:
> > 
> > 
> > sale.line
> > tree
> > 
> > sale_line_tree
> > 
> > 
> > 
> > sale.line
> > tree
> > 
> > sale_line_tree_sequence
> > 
> > 
> > 
> > What's the difference between a sequence and a plain tree view ? 
> 
> This view has a special definition taht uses the sequence field to order
> the record in the list. On the gtk client you can drag and drop the
> lines and the client will set the value of the sequence field to follow
> the defined order. It's explained on the docs:
> 
> http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html?highlight=sequence#tree
> 
> 
> 
> > 
> > What's a sequence anyway ?
> > 
> > the view/sales_form.xml file conatins this line 
> > 
> >  > view_ids="sale.sale_line_view_tree_sequence"/>
> > 
> >
> > Why does it point to the sequence rather than to the plain view ?
> > Do I need to do the same ? 
> 
> You should do the same if you want to allow to define the order of the
> lines.
> 
> 
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

Thank you Sergi
Appreciated

-- 
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/4e05cad1-0ac2-4240-b354-b5e75732403c%40googlegroups.com.


Re: [tryton] Timesheet Module - Employee can only input own lines

2018-01-10 Thread 'Hendrik Brandes' via tryton
Am Montag, 25. Dezember 2017 20:15:08 UTC+1 schrieb Cédric Krier:
> Hi,
> 
> On 2017-12-25 09:02, 'Hendrik Brandes' via tryton wrote:
> > we are introducing the timesheet module, and we are facing the topic,
> > that we cannot find a small solution for limit the input of
> > timesheet-lines only for the current user. 
> > 
> > Is there a possibility, to change this via the authority-concept or do
> > we need to develop a small solution to disable the necessary input
> > fields, if the user is not authorized?
> 
> By default, users can only fill timesheet lines for their employee:
> http://hg.tryton.org/modules/timesheet/file/default/line.xml#l60
> 
> The timesheet admin group can fill for anyone.

Thank you. I saw this, but did not understand the authority-definition.

> 
> -- 
> Cédric Krier - B2CK SPRL
> Email/Jabber: cedric.kr...@b2ck.com
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/

-- 
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/fb53de78-c01e-4f0e-bd39-82ae9ef375a2%40googlegroups.com.


[tryton-es] Re: Filtrar lista por usuario tryton domain

2018-01-10 Thread Gloworms Glow
Gracias por responder!
Sigue sin funcionarme, no se que estoy haciendo mal.

No tengo mucha experiencia en tryton, asi que les comento que es lo que 
hice:

En la clase (archivo .py):
user = fields.Many2One('res.user', 'User')

@staticmethod
def default_user():
return Transaction().context.get('user')

Y en el archivo .xml:


Me da error: TypeError: int() argument must be a string, a bytes-like 
object or a number, not 'list'


Y si cambio por: 
Me da error: AttributeError: 'list' object has no attribute 'get'

Tengo que agregar alguna otra cosa?
Gracias!


Re: [tryton-fr] Clôture d'une année fiscale.

2018-01-10 Thread Noureddine EL GHANI
Merci beaucoup pour votre réponse.

Cordialement

Noureddine EL GHANI

Le mardi 9 janvier 2018 17:50:05 UTC, Cédric Krier a écrit :
>
> Bonjour, 
>
> On 2018-01-09 00:55, Noureddine EL GHANI wrote: 
> > Est-ce que Tryton solde automatiquement les comptes de charges et de 
> > produits lors de la clôture d'une année fiscale ? 
>
> Oui, il faut utiliser le wizard "Équilibrer les non-reports" sur l'année 
> que l'on veut fermer et définir un journal de situation et une période 
> d'ajustement (mis au dernier jour de l'année). 
> Ensuite un mouvement sera crée avec une ligne pour chaque compte qui le 
> crédit ou débit en fonction de sa balance et le grand total sera débiter 
> ou créditer sur le compte définit. 
>
> > Que fait réellement la fonction "Clôturer les années fiscales" ? 
>
> La clôture ferme toutes les périodes ce qui empêche de créer de nouveaux 
> mouvements dessus mais en plus elle vérifie que les années précédentes 
> sont aussi clôturées et elle calcule les montants de report qui servira 
> de cache pour les calcules de balance des comptes. 
>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com  
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>

-- 
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes 
tryton-fr.
Cette discussion peut être lue sur le Web à l'adresse 
https://groups.google.com/d/msgid/tryton-fr/acccf300-2cab-4356-9185-8b8548012bce%40googlegroups.com.


Re: [tryton] what are sequences ?

2018-01-10 Thread Sergi Almacellas Abellana
El 10/01/18 a les 10:15, Cato Nano ha escrit:
> Hello
> 
> I' d like to have a setup with a relation in my project
> 
> Similar to Sale and Sale Lines
> 
> I made the models, they compile and run.
> Now I only neeed a basic form with a list of lines within it
> 
> But I' m a bit confused
> 
> In sale.xml I see these 2 records:
> 
> 
> sale.line
> tree
> 
> sale_line_tree
> 
> 
> 
> sale.line
> tree
> 
> sale_line_tree_sequence
> 
> 
> 
> What's the difference between a sequence and a plain tree view ? 

This view has a special definition taht uses the sequence field to order
the record in the list. On the gtk client you can drag and drop the
lines and the client will set the value of the sequence field to follow
the defined order. It's explained on the docs:

http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html?highlight=sequence#tree



> 
> What's a sequence anyway ?
> 
> the view/sales_form.xml file conatins this line 
> 
>  view_ids="sale.sale_line_view_tree_sequence"/>
> 
>
> Why does it point to the sequence rather than to the plain view ?
> Do I need to do the same ? 

You should do the same if you want to allow to define the order of the
lines.



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

-- 
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/6b5d6323-0152-fc9b-2b48-0f97c76dec96%40koolpi.com.


[tryton] what are sequences ?

2018-01-10 Thread Cato Nano
Hello

I' d like to have a setup with a relation in my project

Similar to Sale and Sale Lines

I made the models, they compile and run.
Now I only neeed a basic form with a list of lines within it

But I' m a bit confused

In sale.xml I see these 2 records:


sale.line
tree

sale_line_tree



sale.line
tree

sale_line_tree_sequence



What's the difference between a sequence and a plain tree view ? 

What's a sequence anyway ?

the view/sales_form.xml file conatins this line 




Why does it point to the sequence rather than to the plain view ?
Do I need to do the same ? 


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/4990a718-ee2b-4d3c-8677-327c0e096833%40googlegroups.com.