[tryton] display field of parent class/object in child view
Hi, I was wondering how it's possible to display a field of a parent class/object in the view of the child. By parent class/object I mean an parent related by a Many2One field. Cheers, Vincent Bastos Lava Lab Software website: www.lavalab.com.au -- 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/49809cf9-6aac-4ff4-b75c-87d31c3b8251%40googlegroups.com.
[tryton] Configuration error
I'm trying to set up tryton on CENTOS7 with MariaDB. I installed tryton with PIP. No modules are installed. I have set up a database "trytondb" and a user of the same name. My database URI is (password replaced) uri = mysql://trytondb:long_alphanumeric_pass@localhost:3306/ I've verified that I can connect to the database in a PHP script. When I run tryton I get this error $ trytond -c /etc/trytond/trytond.conf -d trytondb --all Traceback (most recent call last): File "/usr/local/bin/trytond", line 80, in server.TrytonServer(options).run() File "/usr/local/lib/python2.7/site-packages/trytond/server.py", line 84, in run with Transaction().start(db_name, 0) as transaction: File "/usr/local/lib/python2.7/site-packages/trytond/transaction.py", line 75, in start Database = backend.get('Database') File "/usr/local/lib/python2.7/site-packages/trytond/backend/__init__.py", line 30, in get ep, = pkg_resources.iter_entry_points('trytond.backend', db_type) ValueError: need more than 0 values to unpack Any advice as to what I've got wrong here is much 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/bba25149-ef80-44f3-aa25-ffe90a575f9a%40googlegroups.com.
Re: [tryton-es] Crear sugerencias en pootle
El 15/04/16 a les 14:34, Sergi Almacellas Abellana ha escrit: Hola, A ver si alguien me puede hechar una mano. Por lo que veo, en pootle.tryton.org solo tengo permisos para trabajar con el idoma catalan, pero no puedo hacer sugerencias para el Idioma castellano. Alguien me puede habilitar dichos permisos? Alguien mas tiene el mismo problema? Que extraño, creía que por defecto todo el mundo podía hacer sugerencia para el idioma castellano (de España). Sergi, te acabo de dar permisos para hacer sugerencias, revisar sugerencias y hacer traducciones directamente para el idioma castellano (de España), a ver si ahora puedes. Están todas hechas, supongo que querrás revisar alguna. -- Jordi Esteve Consultor Zikzakmedia SL jest...@zikzakmedia.com Mòbil 679 170 693 Zikzakmedia SL St. Jaume, 9, baixos, 2a 08720 Vilafranca del Penedès Tel 93 890 2108
[tryton-es] Ayuda con Query en Tryton
Tengo un problema que no pasa en ot6ros lenguajes con consultas sobre el motor. el entorno es: Python con Tryton y motor PostgreSQL la consulta la hago en una pantalla con salida a un informe: class InvoicesRangeReport(Report): __name__ = 'invoices_range_report' @classmethod def parse(cls, report, objects, data, localcontext): consulta1() consulta2() consulta3() def consulta1(): cursor = Transaction().cursor cursor.execute("DROP TABLE mivista3") def consulta2(): query = """CREATE TABLE mivista3 AS SELECT a.number AS factu,a.invoice_date,e.name AS osoc, e.alias AS descrip,d.product,d.servicio, AS cant, d.monto AS valor,d.id,d.invoice_line,00 AS total, 00 AS totfc,d.prefactura FROM account_invoice a INNER JOIN alpi_prefactura c ON a.id=c.invoice INNER JOIN alpi_prefactura_line d ON c.id=d.prefactura INNER JOIN party_party e ON a.party=e.id WHERE invoice_date >= '%s' AND invoice_date >= '%s' AND d.invoice_line >0 ORDER BY product,monto"""% (str(data['desde']), str(data['hasta'])) cursor = Transaction().cursor cursor.execute(query) def consulta3(): query = """SELECT factu, invoice_date AS fecha, osoc, descrip, servicio,COUNT(product) AS canti,valor,COUNT(product)*valor AS totfc, product FROM mivista3 GROUP BY factu,invoice_date,osoc,descrip, servicio,valor,product ORDER BY product""" cursor = Transaction().cursor cursor.execute(query) lista = cursor.fetchone() localcontext['account_invoices'] = lista return super(InvoicesRangeReport, cls).parse(report, objects, data, localcontext) por lo que se ve la sintaxis esta correcta, pero no puede crear una tabla, para mi es inexplicable deberia haber una manera de generar un cursor, cosa que no encuentro en Postgresql. QUE ME RECOMIENDAN.. GRACIAS eduardo martinez
[tryton] Error tryton tests when expected and got are the same
Hie, I try to run sale tests. I get this message: File "/home/resteve/virtualenv/try39pypy/trytond/trytond/modules/sale/tests/scenario_sale.rst", line 163, in scenario_sale.rst Failed example: inventory.state Expected: u'done' Got: u'done' Why? I review and I don't found a blank space. Other: File "/home/resteve/virtualenv/try39pypy/trytond/trytond/modules/account/tests/scenario_move_template.rst", line 122, in scenario_move_template.rst Failed example: move.description Expected: u'Supplier - Test' Got: u'Supplier - Test' Detected run tryton tests with python and PyPy. thanks Raimon -- 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/CAN2HbXX6PxPfzG7w95EDRrHufcWtcf1bboZDG-9iaPzJ050yUQ%40mail.gmail.com.
Re: [tryton] Downloading translations from pootle
On 2016-04-15 13:33, Sergi Almacellas Abellana wrote: > Hi, > > I've all the Strings for catalan and Spanish in pootle translated (Thanks > Jordi and all how contributed), so I developed some script to get all the > translations on a local instance so I can test that all are correct. > > I attach this script so if somebody finds it usefull. The usage is quite > easy: > > python pootle2tryton.py locale environment_directory > > For example: > > python pootle2tryton.py ca_ES . (from environemt root) > python pootle2tryton.py es_ES /home/sergi/trytond/ > > Hope it helps! Maybe you could make a review for tryton-tools. -- 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/20160415151718.GE31157%40tetsuo.
Re: [tryton] Downloading translations from pootle
2016-04-15 13:33 GMT+02:00 Sergi Almacellas Abellana: > Hi, > > I've all the Strings for catalan and Spanish in pootle translated (Thanks > Jordi and all how contributed), so I developed some script to get all the > translations on a local instance so I can test that all are correct. > > I attach this script so if somebody finds it usefull. The usage is quite > easy: > > python pootle2tryton.py locale environment_directory > > For example: > > python pootle2tryton.py ca_ES . (from environemt root) > python pootle2tryton.py es_ES /home/sergi/trytond/ > > Hope it helps! I'm sure! Great job! thanks Raimon -- 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/CAN2HbXVxWoTjSC_ozrzRGSLqeO8bb1CUnv74tR%3DBbJkhgoa%3DVg%40mail.gmail.com.
Re: [tryton-es] Crear sugerencias en pootle
2016-04-15 14:34 GMT+02:00 Sergi Almacellas Abellana: > Hola, > > A ver si alguien me puede hechar una mano. Por lo que veo, en > pootle.tryton.org solo tengo permisos para trabajar con el idoma catalan, > pero no puedo hacer sugerencias para el Idioma castellano. > > Alguien me puede habilitar dichos permisos? > > Alguien mas tiene el mismo problema? Que no sea algo relacionado con (1) A ver si Jordi, que tiene permisos, te puede dar permisos. (1) https://groups.google.com/forum/#!topic/tryton-dev/DxsmTK9YSwk Raimon
[tryton-es] Crear sugerencias en pootle
Hola, A ver si alguien me puede hechar una mano. Por lo que veo, en pootle.tryton.org solo tengo permisos para trabajar con el idoma catalan, pero no puedo hacer sugerencias para el Idioma castellano. Alguien me puede habilitar dichos permisos? Alguien mas tiene el mismo problema? Muchas gràcias. -- Sergi Almacellas Abellana www.koolpi.com Twitter: @pokoli_srk
[tryton] Downloading translations from pootle
Hi, I've all the Strings for catalan and Spanish in pootle translated (Thanks Jordi and all how contributed), so I developed some script to get all the translations on a local instance so I can test that all are correct. I attach this script so if somebody finds it usefull. The usage is quite easy: python pootle2tryton.py locale environment_directory For example: python pootle2tryton.py ca_ES . (from environemt root) python pootle2tryton.py es_ES /home/sergi/trytond/ Hope it helps! -- 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/5710D19E.3000308%40koolpi.com. import os import requests import StringIO from optparse import OptionParser from zipfile import ZipFile import polib from trytond.ir.translation import TrytonPOFile class PootlePoFile(TrytonPOFile): def obsolete_entries(self): # Don't import obsolete entries, leave them in pootle return [] def main(lang, directory): url = 'https://pootle.tryton.org/export/?path=/%s/tryton/' % locale r = requests.get(url, stream=True) zipfile = ZipFile(StringIO.StringIO(r.content)) for file_name in zipfile.namelist(): name = file_name.split('/')[-1][:-3] pofile = polib.pofile(zipfile.open(file_name).read().decode('utf-8'), klass=PootlePoFile) pofile.metadata = { 'Content-Type': 'text/plain; charset=utf-8', } if name == 'tryton': output = os.path.join( directory, 'tryton', 'tryton', 'data', 'locale', lang, 'LC_MESSAGES', 'tryton.po') elif name == 'sao': output = os.path.join( directory, 'sao', 'locale', lang + '.po') elif name in ['ir', 'res']: output = os.path.join( directory, 'trytond', 'trytond', name, 'locale', lang + '.po') else: output = os.path.join( directory, 'trytond', 'trytond', 'modules', name, 'locale', lang + '.po') if not os.path.exists(os.path.dirname(output)): continue with open(output, 'w') as f: f.write(unicode(pofile).encode('utf-8')) if __name__ == '__main__': parser = OptionParser('%prog locale tryton_directory') _, args = parser.parse_args() if not len(args) == 2: parser.error('Missing arguments') locale, directory = args main(locale, directory)
Aw: Re: [tryton] Work cost on production_work module
> Gesendet: Freitag, 15. April 2016 um 04:24 Uhr > Von: "Cédric Krier"> An: tryton@googlegroups.com > Betreff: Re: [tryton] Work cost on production_work module > > On 2016-04-14 20:34, Sergi Almacellas Abellana wrote: > > Hi, > > > > I'm testing the new production_work module and I see that the cicles cost is > > not added to the output unit price automatically [1], so if it is not added > > manually you can not finish the production due to uneven costs. > > > > So I'm wondering why we force the user to manually enter the cost on outputs > > if we can automatically add them when the production is done. > > Because we don't know the cost of the cycle in advance and we don't > really know the part of the cost to add which comes from the cycle and > not from other changes. What about the use of standard costs for certain operations? -- 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/trinity-d77aed6f-7839-4361-a34b-48df77356996-1460709928522%403capp-gmx-bs71.
Re: [tryton-dev] Re: Need some Windows/Excel test for issue5361
> > > About UTC, export date in UTC's SERVER not use UTC's local PC. > > There is only one UTC. Any way, I already explain why we use UTC above. > > > About decimal point may be can get it before to export CSV in same > wizard. > > I think this is the same topic as for UTC. We use universal > representation to be unambiguous. > I agree not use default values and replace to use company language or user language. After export CSV file, usually user open csv file with a speesheet. And conversion language, is very important to open this file. About custom developments, we force export CSV data according user language. For example, about point or comma in decimal fields: from babel.numbers import format_decimal . format_decimal(f['list_price_min_rival'] or 0.0, locale=locale), .. Regards, Raimon -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/CALO_w6p720s5T-jm9pbdp-p%3D4riPFVnaq5LdSHik%3DRLUyOVspA%40mail.gmail.com.