[tryton-dev] Last email on this mailing list

2018-11-17 Thread 'Cédric Krier' via tryton-dev
As discussed on 
https://discuss.tryton.org/t/replace-mailing-list-by-discuss/599, this is the 
last email on this mailing list which will be read only.
Please consider using https://discuss.tryton.org/

Thanks.

-- 
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/96f80e7b-4e41-4f83-9e30-2c968ac6cbd1%40googlegroups.com.


Re: [tryton-dev] What is the fields_child and context_model

2018-10-01 Thread 'Cédric Krier' via tryton-dev
On 2018-10-01 02:52, Markus Bala wrote:
> > > I am going to integrate with some WMS system for receiving. When user 
> > > input the PO number which is "Lodnum" then tryton "on_change" and will 
> > > display the WMS data to the list (MS SQL Server).
> > > 
> > > Background, after "on_change", I will read data from MSSQL. And insert to 
> > > Tryton postgres. 
> > > But when inserted, above error occurred.
> > 
> > on_change calls are always read-only to enforce good design and
> > practice. You can not save in the database something that the user did
> > not save yet. Instead you must just send modification to the client by
> > setting fields (without saving).
> 
> for ModelSQL , we can set  by "self.field = value".
> But how to setting the fields for context_model?

It is set by the context. Otherwise, it is a model like the others, you
can define on_change on it etc.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20181001102039.pcjhlogazp3dwy4t%40kei.


Re: [tryton-dev] What is the fields_child and context_model

2018-10-01 Thread 'Cédric Krier' via tryton-dev
On 2018-10-01 01:55, Markus Bala wrote:
> > > It prompt error psycopg2, cannot execute INSERT because is 
> > > readonly-transaction
> > 
> > On which kind of RPC call are you doing a save?
> 
> Traceback (most recent call last):
>   File "/trytond/wsgi.py", line 71, in dispatch_request
> return endpoint(request, **request.view_args)
>   File "/trytond/protocols/dispatcher.py", line 41, in rpc
> request, database_name, *request.rpc_params)
>   File "/trytond/wsgi.py", line 42, in auth_required
> return wrapped(*args, **kwargs)
>   File "/trytond/protocols/wrappers.py", line 122, in wrapper
> return func(request, pool, *args, **kwargs)
>   File "/trytond/protocols/dispatcher.py", line 172, in _dispatch
> result = rpc.result(meth(inst, *c_args, **c_kwargs))
>   File "/trytond/model/modelview.py", line 677, in on_change
> method()
>   File "/trytond/model/modelview.py", line 84, in wrapper
> result = func(self, *args, **kwargs)
>   File "/trytond/model/fields/field.py", line 114, in wrapper
> return func(self, *args, **kwargs)
>   File "/trytond/modules/tri_jda/jda.py", line 189, in on_change_lodnum
> rec.save(recs)
>   File "/trytond/model/descriptors.py", line 33, in newfunc
> return self.func(owner, *args, **kwargs)
>   File "/trytond/model/modelstorage.py", line 1532, in save
> news = cls.create([save_values[r] for r in to_create])
>   File "/trytond/model/modelsql.py", line 580, in create
> [insert_values], [table.id]))
>   File "/trytond/backend/postgresql/database.py", line 61, in execute
> cursor.execute(self, sql, args)
> psycopg2.InternalError: cannot execute INSERT in a read-only transaction
> 
> 
> -
> Above is my stacktrace.
> 
> I am going to integrate with some WMS system for receiving. When user input 
> the PO number which is "Lodnum" then tryton "on_change" and will display the 
> WMS data to the list (MS SQL Server).
> 
> Background, after "on_change", I will read data from MSSQL. And insert to 
> Tryton postgres. 
> But when inserted, above error occurred.

on_change calls are always read-only to enforce good design and
practice. You can not save in the database something that the user did
not save yet. Instead you must just send modification to the client by
setting fields (without saving).

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20181001091551.rfhe2e2es5h26rwf%40kei.


Re: [tryton-dev] What is the fields_child and context_model

2018-10-01 Thread 'Cédric Krier' via tryton-dev
On 2018-10-01 01:04, Markus Bala wrote:
> But when I try using context_model, i am going to do some "save" to model.

I do not understand. the context model is only used by the client.

> It prompt error psycopg2, cannot execute INSERT because is 
> readonly-transaction

On which kind of RPC call are you doing a save?

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20181001082958.whomnyoacfe3lc5z%40kei.


Re: [tryton-dev] Mobile Apps For tryton?

2018-10-01 Thread 'Cédric Krier' via tryton-dev
On 2018-09-30 20:02, Markus Bala wrote:
> Is it any plan for Tryton in App?

No but sao, the web client, is responsive and so it can be used on
mobile device.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20181001073510.cu467jw3r7umhcjn%40kei.


Re: [tryton-dev] What is the fields_child and context_model

2018-10-01 Thread 'Cédric Krier' via tryton-dev
On 2018-09-30 09:56, Markus Bala wrote:
> I found the balance_sheet reporting.
> But I do not undertstand what is the field_childs at the line 04.

It is to define a tree:
https://tryton-readthedocs.readthedocs.io/projects/server/en/latest/topics/views/index.html?highlight=field_childs#tree-view

> And what is the "context_model" at the line 10.?

It is the model to display on top of the list to alter the context of
the view.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20181001073415.2awuqi2niyiktzo6%40kei.


Re: [tryton-dev] How to get the timezone from client

2018-09-28 Thread 'Cédric Krier' via tryton-dev
Hi,

On 2018-09-27 20:51, Markus Bala wrote:
> I noticed that setting timezone in user preference is missing.
> However, in the documentation still show the setting.

It is a mistake, the field has been removed long time ago:
https://bugs.tryton.org/issue7750

> Back to topic,
> My situation is to print the printer date/time in the report.
> If in the libreoffice, I set the date from the report. It will take the 
> server date but server's date is UTC timezone.
> 
> So, I will custom printed_date but how to get the timezone from client show 
> that can show the correct time?

You can not know the timezone of the client because it is the OS
timezone on which it runs. The best option is to use a timezone stored
on some record, for example you can use the one on company.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180928072623.pzmurrf55xwlcuvf%40kei.


Re: [tryton-dev] How to get the Report in Byte?

2018-09-21 Thread 'Cédric Krier' via tryton-dev
On 2018-09-21 01:35, Markus Bala wrote:
> > > Question 3: How to get report in byte in trytond so I can print direct to 
> > > printer through network. Like the link below
> > > 
> > > https://www.zebra.com/us/en/support-downloads/knowledge-articles/ait/Network-Printing-Python-Example.html
> > 
> > You can get the Report class from the pool and call execute on it. This
> > will return the bytes as second element of the response.
> 
> Could you give me example on this? Iam litte bit confuse.
> 
> Currently, I am using Relatio. It should be a dirty hack. I hope can use the 
> method directly from Trytond instead.
> 
> Below is my code:
> 
> from relatorio import Report
> 
> class BarcodeLabel(Workflow, ModelSQL, ModelView):
> 
> @classmethod
> def print_lpn(cls, records):
> report = Report(abspath(join(dirname(__file__), 'lpn.odt')),
> ODT_MIME)
> data = report(records=records).render().getvalue()
> file_name = join(dirname(__file__), 'output_basic.odt')
> open(file_name, 'wb').write(data)

It should be something like:

@classmethod
def print_lpn(cls, records):
pool = Pool()
Report = pool.get('module.my_report', type='report')
ext, data, print, name = Report.execute(map(int, records), {})


-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180921085311.jzkbjx3askvyu6nd%40kei.


Re: [tryton-dev] How to get the Report in Byte?

2018-09-21 Thread 'Cédric Krier' via tryton-dev
On 2018-09-17 01:21, Markus Bala wrote:
> Actually I have 3 questions, below is my case:
> 
> I will doing barcode label for some warehouse operation.
> 
> Case Study:
> At the receiving area, during receiving & storage, it will need to print 2 
> labels. One label is product label. One label is storage label. The different 
> between 2 labels are in the label's size.
> Product label using 5cm x 10cm. Storage label using 15cm x 10cm.
> 
> Because of this, I will  have 2 labels printer. Printer (A) for product 
> label. Printer (B) for storage Label.
> 
> Question 1: for "Direct Print", how can set when I click on print "Product 
> Label" it choose Printer (A) and vice versa.

On windows, the client use the command 'print' which let the OS decide.
So maybe you can use different file extension and configure the OS to
choose the right printer.
On MacOS, the client uses the 'open' command which just open the file.
Maybe it is possible to configure the "opener" to select the right
printer when requesting to print.
On UNIX, it uses the 'xdg-open' command. In this case, I guess you can
also customize xdg to select the right printer from the mime-type.

> Or alternative solution:
> Making the printer module. Like the link below:
> 
> https://groups.google.com/forum/#!searchin/tryton-dev/printer|sort:date/tryton-dev/1Hu0AE5bjd8/0zCHyxkPq3EJ

Not sure it is the best option because it requires a connection between
the server and the printer. Usually they are not in the same physical
area.

> Question 2: How to get "Tryton Client" IP from "Trytond"? the purpose to 
> fixed the IP/PC for the label printers so other PC do not have label printer

Since 4.8, the Transaction.context has an attribute '_request' which is
the werkzeug request object and contain the IP address of the client.
But there is no guarantee that this attribute will always be set (for
example from proteus request or cron job).

> Question 3: How to get report in byte in trytond so I can print direct to 
> printer through network. Like the link below
> 
> https://www.zebra.com/us/en/support-downloads/knowledge-articles/ait/Network-Printing-Python-Example.html

You can get the Report class from the pool and call execute on it. This
will return the bytes as second element of the response.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180921081919.jaygesgfwrolmchi%40kei.


[tryton-dev] Translation for 5.0

2018-09-04 Thread 'Cédric Krier' via tryton-dev
Hi,

The translation terms have been updated on http://pootle.tryton.org/ for
the release 5.0. A second update is planned for the 14th. The end of
translation is scheduled for the 28th at 18:00 CEST.

For the record, I have added a script that automates the task:
http://hg.tryton.org/tryton-tools/rev/c6d07120dd7b
It is configured (on tycho) to run every month so the translation task
will be smoothed during all the development period for the future
releases.

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180904205219.ryqk44seylxyklma%40kei.


Re: [tryton-dev] ssh key doesnt work on hg.tryton.org

2018-07-24 Thread Cédric Krier
Hi,

On 2018-07-24 16:06, Carlos Eduardo Sotelo Pinto wrote:
> I have tryton to follow the "how to contribute", however when I try to
> update my code from [ssh://h...@hg.tryton.org/trytond], it start to request a
> password, although I have added my publick key to the [
> https://bugs.tryton.org/] site. I also try to clone a new copy, but the
> password request also appears on a new clear copy using hg clone
> 
> 
> $ hg clone ssh://h...@hg.tryton.org/trytond
> 
> 
> This is the password request
> 
> $ hg npull
> [.]
> pulling from ssh://h...@hg.tryton.org/trytond/
> remote: Warning: Permanently added the ECDSA host key for IP address
> '91.121.144.88' to the list of known hosts.
> Password:
> 
> 
> Please give me a suggest in order on try to contribute to tryton dev

Because ssh access is reserved to core developers with push access.
You must fetch using https.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180724222022.mmfgsklld4zgtic5%40kei.


Re: [tryton-dev] Vibora similar to Flask

2018-06-29 Thread Cédric Krier
On 2018-06-29 11:59, Sergi Almacellas Abellana wrote:
> El 29/06/18 a les 11:10, Cédric Krier ha escrit:
> > Indeed at B2CK after some experiences with Flask-Tryton, we think that
> > this is no more a best way to interface website with trytond. We think
> > about using dedicated RPC calls in the future.
> 
> When you talk about RPC calls you mean also a specific endpoint using
> the new custom routing feature?

I think it is to be decided case by case.

> How do you think it's better to consume those APIs? Using javascript
> directly or by using an intermediary webserver?

Idem.
Indeed we have done both cases.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180629102242.GN3931%40kei.


Re: [tryton-dev] Vibora similar to Flask

2018-06-29 Thread Cédric Krier
On 2018-06-28 08:32, Oscar Alvarez wrote:
> Interesting new tool, it maybe in future can be used with Tryton ;)
> 
> https://vibora.io/?ref=stackshare

I do not think it worse the investment to change all the code base of
Tryton to be async. Indeed async ORM may be strange to use without
talking about the Transaction context switch.

But for a website like an webshop, it could be interesting and it will
be not difficult if the communication with trytond is made via RPC.
Indeed at B2CK after some experiences with Flask-Tryton, we think that
this is no more a best way to interface website with trytond. We think
about using dedicated RPC calls in the future.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180629091015.GL3931%40kei.


Re: [tryton-dev] Open a view as result of button click

2018-06-29 Thread Cédric Krier
On 2018-06-29 09:52, Carlos Gálvez wrote:
> 2018-06-28 14:47 GMT+02:00 Sergi Almacellas Abellana :
> >
> >
> > Yes, it is possible. You should use the button_action decorator to
> > returns an wizard with an StateAction from the model of the new created
> > instance.
> >
> > You should set the res_id of the action on the wizard to the ids of the
> > new created instances.
> 
> 
> Finally, I did not use a "button_action" decorator to return an assistant
> because
> I was not interested in having a wizard dirtying my code, but his
> suggestions showed me the way.

button_action is not limited to wizard, it can be used for any action.

> The way I have done it is returning on my Modelview.button an Action id
> that points to an act_window that open the desired view:
> 
> return Action.get_action_id(ModelData.get_id('mymodule', 'myaction'))

This would be cleaner to use the button_action decorator.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180629083908.GK3931%40kei.


Re: [tryton-dev] How related origin reference field with One2Many fields

2018-06-28 Thread Cédric Krier
Hi,

On 2018-06-27 18:53, Oscar Alvarez wrote:
> It is possible to use field reference (origin) instead of Many2One?

Yes: 
http://doc.tryton.org/4.8/trytond/doc/ref/models/fields.html#trytond.model.fields.One2Many

> for  example in this case:
> 
> class A(...):
> 
>      name = fields.Char(..)
> 
>      documents = field.One2Many('document.notification', 'origin', '???')
> 
> class B(...):
> 
>      name = fields.Char(..)
> 
>      documents = field.One2Many('document.notification', 'origin', '???')
> 
> 
> 
> 
> class DocumentNotification(...):
>    anotherfields = .
>    origin = fields.Reference('Origin', selection='get_origin') --> this 
> field keep reference to records from A model or B model or C model, etc.
> 

That's all you have to do. The '???' should be the string of the field.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180628082943.GA3931%40kei.


Re: [tryton-dev] Print from custom button

2018-06-27 Thread Cédric Krier
Hi,

On 2018-06-26 10:42, Josias Pérez wrote:
> I have a custom module with transitions controlled by buttons. In the last 
> transition I need that the active record is printed. I have already created a 
> report and it appear in the actions menu, but I want to print it with the 
> button. 

You must use the decorator button_action:
http://doc.tryton.org/4.8/trytond/doc/ref/models/models.html#trytond.model.ModelView.button_action
This will make the client launch the referenced action.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180627064209.GH30646%40kei.


Re: [tryton-dev] After upgrade "Method" not callable

2018-06-25 Thread Cédric Krier
On 2018-06-25 00:10, 'Hendrik Brandes' via tryton-dev wrote:
> Am Samstag, 23. Juni 2018 23:55:05 UTC+2 schrieb Cédric Krier:
> > On 2018-06-23 09:31, 'Hendrik Brandes' via tryton-dev wrote:
> > > I tried to migrate an existing tryton installation and get the following 
> > > error:
> > > 
> > > AssertionError: .margin not callable
> > 
> > What is the traceback?
> 
> I started the trytond-admin command with parameter --all and finally got the 
> following traceback:
> 
> Traceback (most recent call last):
>   File "/opt/projekte/git/tryton2018/EBBTryton2018/bin/trytond-admin", line 
> 21, in 
> admin.run(options)
>   File "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/admin.py", line 
> 54, in run
> activatedeps=options.activatedeps)
>   File "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/pool.py", line 
> 162, in init
> lang=lang, activatedeps=activatedeps)
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/__init__.py", 
> line 406, in load_modules
> _load_modules(update)
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/__init__.py", 
> line 376, in _load_modules
> load_module_graph(graph, pool, update, lang)
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/__init__.py", 
> line 165, in load_module_graph
> pool.setup(classes)
>   File "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/pool.py", line 
> 236, in setup
> cls.__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/sale_margin/sale.py",
>  line 109, in __setup__
> super(SaleLine, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/sale_price_list/sale.py",
>  line 49, in __setup__
> super(SaleLine, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/sale_discount/sale.py",
>  line 56, in __setup__
> super(SaleLine, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/modules/sale/sale.py", 
> line 1120, in __setup__
> super(SaleLine, cls).__setup__()
>   File "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/model/order.py", 
> line 15, in __setup__
> super(SequenceOrderedMixin, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/model/modelsql.py", line 
> 164, in __setup__
> super(ModelSQL, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/model/modelstorage.py", 
> line 59, in __setup__
> super(ModelStorage, cls).__setup__()
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/model/modelview.py", line 
> 194, in __setup__
> setup_field(name, field, attribute)
>   File 
> "/opt/projekte/git/tryton2018/EBBTryton2018/trytond/model/modelview.py", line 
> 175, in setup_field
> "%s.%s not callable" % (cls, meth_name)
> AssertionError: .margin not callable


This looks like you have defined 'margin' in the methods argument of
fields.depends. Something like: @fields.depends(methods=['margin'])
But margin is a field not a method, so it should be:
@fields.depends('margin')

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180625073624.GY30646%40kei.


Re: [tryton-dev] After upgrade "Method" not callable

2018-06-23 Thread Cédric Krier
On 2018-06-23 09:31, 'Hendrik Brandes' via tryton-dev wrote:
> I tried to migrate an existing tryton installation and get the following 
> error:
> 
> AssertionError: .margin not callable

What is the traceback?

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180623215343.GV30646%40kei.


Re: [tryton-dev] Import data from CSV

2018-06-14 Thread Cédric Krier
On 2018-06-13 12:41, Josias Pérez wrote:
> I was trying to import data with CSV with a multi-company stage and all the 
> companies with the same accounting plan. 
> 
> I'm trying to import a file that require to import the a group of accounts 
> but I found with an error that say that encounter many ocurrences. I dont 
> know how to import that. 

Why not creating a template chart of account like the
account_{be,fr,es}?

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180614101833.GO518%40kei.


Re: [tryton-dev] How put date field on Calendar widget ?

2018-06-04 Thread Cédric Krier
On 2018-06-03 19:27, Oscar Alvarez wrote:
> It seems that calendar widget (tryton 4.4) does not accept date or time 
> fields,

For date, what is the problem?
For time, it is normal, time can not be put on a calendar.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180604065014.GW4128%40kei.


Re: [tryton-dev] Debian link broken

2018-06-02 Thread Cédric Krier
On 2018-05-31 10:27, Luciano Rossi wrote:
> The url http://debian.tryton.org still is redirecting to the old entry 
> http://tryton.alioth.debian.org

The Tryton DNS only set an IP for debian.tryton.org. This is an IP that
Mathias provided. So I do not know if we should stop this DNS record and
manage the redirect ourself, or if the targeted machine can be updated
or if we should just drop this shortcut.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180602081419.GS4128%40kei.


Re: [tryton-dev] PEP-0008 Dunder names

2018-05-25 Thread Cédric Krier
On 2018-05-24 19:27, Vincent Bastos wrote:
> Just wondering why Tryton does not follow one of the points in PEP-0008[1]?

Probably because our linter flake8 does not enforce it.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180525071235.GA3926%40kei.


[tryton-dev] Debian link broken

2018-05-24 Thread Cédric Krier
Hi,

The Debian link https://tryton.alioth.debian.org/ on
http://www.tryton.org/download.html does not return any more useful
information.
Does anyone know what is happening?

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180524112634.GN3926%40kei.


Re: [tryton-dev] Updating form_relate title

2018-05-22 Thread Cédric Krier
On 2018-05-22 06:40, Maxime Richez wrote:
> Hi, 
> 
> In some form_relate, i would add specific informations in the title 
> (default_uom for instance). The suggestion is to update rec_name which is 
> displayed after the form_relate action name in the title. But,  i don't want 
> this rec_name in all my forms... 
> So another suggestion is to update this rec_name following the context...
> Indeed, but how? It seems context used by form_relate to get_rec_name with 
> RPCExecute use a default context that can't be updated 
> 
> Here's the context used when getting rec_name with RPCExecute:
> 
> {"params":[[1],["rec_name"],{"language":"en","employee.rec_name":"Maxime 
> Richez","locale":{"date":"%m/%d/%Y","thousands_sep":",","grouping":[3,3,0],"decimal_point":"."},"language_direction":"ltr","company.rec_name":"Saluc","groups":[5,6,18,1,15,2,3,4,11,10,12,14,13,16,17,8,7,9],"employee":1,"company":1}],"id":36,"method":"model.product.product.read"}
> 
> Context manually added in ir.action.act_window (XML) is in the context after 
> the get_rec_name call when displaying the form.
> 
> Could we have some more details in the default context like "origin_action"? 
> Or updating ir.action to pass context here :
> http://hg.tryton.org/tryton/file/default/tryton/action/main.py#l91

I think the RPC call to get the rec_name should use the action_ctx.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180522135246.GQ27454%40kei.


Re: [tryton-dev] Replace doc.tryton.org by readthedocs

2018-05-18 Thread Cédric Krier
On 2018-05-19 02:37, Cédric Krier wrote:
> Hi,
> 
> Today we talked on IRC about the documentation [1] and that there are
> many places where documentation can be found.
> One place is the readthedocs [2][3] and another place is doc.tryton.org
> The readthedocs was an attempt to automate the publication but it was
> never finished.
> I made some tests and here is my proposal to merge both:
> 
> I create a repository which contains a single index.rst [4], the idea is
> to have this repository as the main project on rtfd. As you can see it
> lists all the documentation using sub-projects [5] which allow to share
> index. Also we could manage the index.rst file per branches so we could
> have the documentation per series.
> We could also set a custom domain [6] as 'doc.tryton.org'
> 
> I think it will be a good improvement to have automate documentation
> build on such platform.
> 
> What do you think?

For the record, this could only be done once this PR is merged and
running on rtfd: https://github.com/rtfd/readthedocs.org/pull/4114

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180519004545.GY3927%40kei.


[tryton-dev] Replace doc.tryton.org by readthedocs

2018-05-18 Thread Cédric Krier
Hi,

Today we talked on IRC about the documentation [1] and that there are
many places where documentation can be found.
One place is the readthedocs [2][3] and another place is doc.tryton.org
The readthedocs was an attempt to automate the publication but it was
never finished.
I made some tests and here is my proposal to merge both:

I create a repository which contains a single index.rst [4], the idea is
to have this repository as the main project on rtfd. As you can see it
lists all the documentation using sub-projects [5] which allow to share
index. Also we could manage the index.rst file per branches so we could
have the documentation per series.
We could also set a custom domain [6] as 'doc.tryton.org'

I think it will be a good improvement to have automate documentation
build on such platform.

What do you think?


[1] http://www.tryton.org/~irclog/2018-05-18.log.html#t11:05
[2] https://trytond.readthedocs.io/en/latest/
[3] https://tryton.readthedocs.io/en/latest/
[4] http://hg.tryton.org/readthedocs/
[5] https://docs.readthedocs.io/en/latest/subprojects.html
[6] https://docs.readthedocs.io/en/latest/alternate_domains.html
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180519003717.GX3927%40kei.


Re: [tryton-dev] Willing to write some documentation

2018-05-18 Thread Cédric Krier
Hi,

On 2018-05-18 01:42, Jean-Michel Pouré wrote:
> First I would like to thank you all for the hard work around Tryton. It seems 
> to be a nice alternative to OpenERP and Odoo.
> 
> I am willing to contribute starting with documentation, around installation 
> issued. 
> 
> How to update the documentation published on website: 
> http://doc.tryton.org/4.8/

The source of this website is scattered in all doc/ folder of every
repository.
The script that aggregates them is on http://hg.tryton.org/doc.tryton.org

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180518132448.GQ3927%40kei.


Re: [tryton-dev] Missing translations for release 4.8

2018-05-15 Thread Cédric Krier
Reminder, only 1 week left to fix translations.
As far as I see only French, Spanish and Catalan are fixed.

On 2018-05-04 11:05, Sergi Almacellas Abellana wrote:
> Hi Translations,
> 
> We found that there are some missing translations on the 4.8 release [1]
> which should be fixed by adding new translations on pootle.
> 
> We've scheduled a new minor release on 21th of May which may
> exceptionally contain the new translations. Translations have two weeks
> to upload them. We will publish a news on the release date explaining
> the issue and encouraging people to do the database update for this
> release so new translations are loaded.
> 
> In order to find the missing translations the best is to create a new
> database with all the modules installed. This can be achieved by the
> following command:
> 
> trytond-admin -d translation -l  -u ir res `curl
> https://downloads.tryton.org/4.8/modules.txt | tr '\n' ' '`
> 
> Once you have a the database created all missing translations can be
> found with the following SQL QUERY:
> 
> SELECT * FROM ir_translation WHERE lang =  AND src = value
> AND fuzzy = false;
> 
> Those translations must be resubmitted to pootle before the release date.
> 
> Thank you for collaboration and sorry for the inconvenience.
> 
> [1] https://bugs.tryton.org/issue7414
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180515154003.GH3927%40kei.


Re: [tryton-dev] NSIS new string PreviousInstall

2018-05-11 Thread Cédric Krier
On 2018-05-08 09:41, Sergi Almacellas Abellana wrote:
> Spanish: "Tryton ja esta instalado.$\n$\nPulse `OK` para eliminar la
> versión anterior o `Cancelar` para cancelar la actualitzación."

On 2018-05-08 10:41, Xavier Codinas wrote:
> Spanish: "Tryton ya esta instalado.$\n$\nPulse `OK` para eliminar la
> versión anterior o `Cancelar` para cancelar la actualización."

On 2018-05-11 07:14, Sergio Morillo wrote:
> Spanish: "Tryton ya está instalado.$\n$\nPulse `OK` para eliminar la
> versión anterior o `Cancelar` para cancelar la actualización."

On 2018-05-11 16:26, Raimon Esteve wrote:
> Spanish: "Tryton ya está instalado.$\n$\nPulse `OK` para eliminar la
> versión anterior o `Cancelar` para cancelar la actualización."

On 2018-05-11 16:25, Raimon Esteve wrote:
> Spanish: "Tryton ya está instalado.$\n$\nPulse `OK` para eliminar la
> versión anterior o `Cancelar` para cancelar la actualización."

Guys, this starts to become ridiculous. Is it possible to have a
definitive correct translation.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180511152828.GG3925%40kei.


Re: [tryton-dev] Move origin issue when in same period

2018-05-08 Thread Cédric Krier
On 2018-05-08 22:46, Richard PALO wrote:
> BTW, why does save(), for example on a move, automatically save() its lines?
> Is the problem because origin is unidirectional?

Because proteus simulate the behavior of other clients.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180508205226.GC12271%40kei.


Re: [tryton-dev] Move origin issue when in same period

2018-05-08 Thread Cédric Krier
On 2018-05-08 18:48, Richard PALO wrote:
> I came across a difficulty noticed during FEC generation (French plan) where I
> get the following exception:
> >...
> >   File "/trytond/modules/account_fr/account.py", line 315, in get_reference
> > return line.move.origin.rec_name
> > AttributeError: 'str' object has no attribute 'rec_name'
> 
> To briefly explain the issue, it concerns a reversal entry having origin set
> to the initial entry at the same date (ie:cancel).
> 
> As these entries are bulk loaded via an openerp2tryton migration script, 
> Move.save()
> is invoked for all the moves in the period, period by period.
> 
> What I notice is that the origin saved in the database is 
> "account.move,-272790" so I
> presume the error is related to the fact that the referenced move is not yet 
> saved when
> the origin was set, even though when really saved, the origin move will have 
> been saved.
> 
> Indeed, all the moves where the reversal entry is in a different period have 
> the origin with
> a non-negative number, with no problem during FEC generation. It concerns 
> only the moves
> generated in the same period for this scenario.
> 
> So the question I pose, without resorting to individual saves on the moves 
> which would probably
> have disastrous timing repercussions on the import (>35K moves), is there 
> perhaps an outside chance
> that something is forgetting to verify the state (.reload()?) of the origin 
> move prior to saving?
> 
> Any other suggestion(s)?

The origin must be saved before being assigned if you want to store the
saved id.


I submitted https://bugs.tryton.org/issue7421 to prevent the exception
raising.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180508175617.GA12271%40kei.


[tryton-dev] NSIS new string PreviousInstall

2018-05-07 Thread Cédric Krier
Hi,

@translators, I'm working on support automatic uninstallation of
previous version on Windows [1]. For that, the string PreviousInstall
has changed and must be retranslated:

LangString PreviousInstall ${CURLANG} "Tryton is already 
installed.$\n$\nClick `OK` to remove the previous version or `Cancel` to cancel 
this upgrade."

Thanks to send me the new translation. I will just use a translation
service for language that I would not receive.


[1] https://bugs.tryton.org/issue7007

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180507221532.GF27289%40kei.


Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Cédric Krier
On 2018-05-04 05:04, Maxime Richez wrote:
>  
> > How to specify sort on the correct column "c.employee" instead of 
> > "b.employee"?
> In the convert_order method in fields.py, it's using:
> table, _ = tables[None]
> 
> but in my case it should use
> table, _ = tables['requisition'] to use the correct column for the order ???

So pass the right dictionary to convert_order

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180504123858.GK3922%40kei.


Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Cédric Krier
On 2018-05-04 00:31, Maxime Richez wrote:
> > It will be easier to have the full traceback.
> 
> https://pastebin.com/Derb7cna
> 
> Client traceback: https://pastebin.com/XkDAZt2V
> 
> Did i proceed correctly to join tables? 

The value for 'requisition' should again be a dictionary with a None key
etc.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180504090637.GH3922%40kei.


Re: [tryton-dev] Ordering function field depending of the "parent" of an origin field

2018-05-04 Thread Cédric Krier
Hi,

On 2018-05-02 07:00, Maxime Richez wrote:
> I saw some examples to redefine order but never with 3 models, it's often one 
> join between 2 models and also in my case field origin involved in the join 
> condition is a tuple... here's my code (not working for ordering, i got 
> 'TypeError: tuple indices must be integers, not NoneType' and also i don't 
> know if the "join" is correct).
> 
> https://pastebin.com/TkTcw2ZL

It will be easier to have the full traceback.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180504072141.GC3922%40kei.


Re: [tryton-dev] Good practice: Function Field naming ?

2018-04-26 Thread Cédric Krier
On 2018-04-26 06:26, Maxime Richez wrote:
> I'm adding function fields from model purchase in model purchase_line : 
> party, currency, purchase_date,...
> 
> Wondering if it's better to name those fields with a prefix : purchase_party, 
> purchase_currency,... but purchase_date is already prefixed...
> 
> Should i define a global dictionary of mapped fields or use a startwith 
> function to remove prefix ?
> 
> Or finally don't care to prefix except for duplicate name fields ?

For me, the rule should be to use a name that describes the best field
and is unambiguous from the Model point of view.
So in your case, you should use a prefix only if the name of the field
without it has an ambiguous meaning or if there could be another module
that adds the same field but for different purpose.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180426135304.GY10584%40kei.


Re: [tryton-dev] Appearence of the product field on product template form view

2018-04-25 Thread Cédric Krier
On 2018-04-25 14:07, Udo Spallek wrote:
> For me it is the perfect solution:
> 
> if the Variants have more than one record, it is shown as a list
> if the Variants have less than two records, it is shown as a form
> 
> Is it an interesting enhancement of the product module?

I do not think so because the behaviour is strange when user adds a
second variant. The field on which the second variant is added become
invisible.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180425140004.GW10584%40kei.


signature.asc
Description: Digital signature


Re: [tryton-dev] Appearence of the product field on product template form view

2018-04-25 Thread Cédric Krier
On 2018-04-24 17:53, Udo Spallek wrote:
> But the following code (in version 4.0), but it doesn't work,  
> the view_attribute[2] does not *dynamically* set the 
> *mode*[3] attribute::
> 
> 
> class Template:
> __metaclass__ = PoolMeta
> __name__ = "product.template"
> 
> 
> @classmethod
> def view_attributes(cls):
> res = super(Template, cls).view_attributes()
> 
> res.append((
> "/form/notebook/page[@id='general']/field[@name='products']",
> 'mode',
> If(Greater(Len(Eval('products')), 1),
> 'tree,form', 'form,tree')
> ))
> return res
> 
> Are there any ideas how it could work? What is missing?

It can not work because clients build first the view before bind it with
record values.

I think it will be better to have a configuration option that defines if
the company is working with variants or not. This configuration will be
used to set a proper mode.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180425074058.GQ10584%40kei.


signature.asc
Description: Digital signature


Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-22 Thread Cédric Krier
On 2018-04-21 10:23, Cédric Krier wrote:
> On 2018-04-21 09:09, Richard PALO wrote:
> > but get_rec_name() returns the hierarchy of names when there is a parent 
> > type,
> > case not treated for but which is *always* the case for 
> > account_account_type.
> 
> Indeed, it will be good to customize the search_rec_name like in
> party.category.

I wrote a generic Mixin for such tree model: https://bugs.tryton.org/issue7383

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180422205548.GD10584%40kei.


Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-21 Thread Cédric Krier
On 2018-04-21 09:09, Richard PALO wrote:
> but get_rec_name() returns the hierarchy of names when there is a parent type,
> case not treated for but which is *always* the case for account_account_type.

Indeed, it will be good to customize the search_rec_name like in
party.category.

> If I set on the header 'type:id', then the lookup seems to expect the 
> identifier of
> the account_account_type_template and not the instance of it in 
> account_account_type
> as it invokes ModelData.get_id() much like Sergi mentioned (and must be 
> specified
> like 'account_fr.provisions_charges'

Yes ':id' suffix works only for XML id because they are the only unique
ID valid on different databases.


The script openerp2tryton is just a starting skeleton and the CSV import
is not the most powerful tool. It was used in openerp2tryton for simple
case. But it is still more powerful to write proteus script instead.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180421082321.GA18860%40kei.


Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-19 Thread Cédric Krier
On 2018-04-18 17:40, Richard PALO wrote:
> In the French plan, there are unfortunately 7 instances of 
> account_account_type_template
> with the name 'Autres'... but in the xml, there are indeed unique ID's...
> 
> Is the mapping of these (xml id => sql id) stored somewhere it can be accessed
> to somehow facilitate import?

In "ir.model.data".

> That is, it would be very useful to be able to
> use the xml id in import_data as unique label for the sql id.

Better to write a proteus script.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180419153838.GQ3929%40kei.


Re: [tryton-dev] Repository freeze

2018-04-14 Thread Cédric Krier
On 2018-04-02 23:19, Cédric Krier wrote:
> On 2018-03-26 18:11, Cédric Krier wrote:
> > The translation will start next week on 2nd April and will end on 20th
> > April at 20:00 CEST on https://pootle.tryton.org/
> 
> The translations have been updated. You can start translate.

Due to the addition of Persian language (which require the name to be
translated), I have proceeded to the update of translations with the
late issue found. So there are few more strings to translate.

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180414181255.GU31629%40kei.


Re: [tryton-dev] Package release announce

2018-04-14 Thread Cédric Krier
On 2018-04-14 19:31, Cédric Krier wrote:
> On 2018-04-13 17:47, Sergi Almacellas Abellana wrote:
> > El 01/04/18 a les 14:39, Cédric Krier ha escrit:
> > > Hi,
> > > 
> > > The package release announce on tryton-annou...@googlegroups.com relies
> > > on rss2email [1] and farmhouse [2], a service that B2CK is running to
> > > generate RSS feeds.
> > > farmhouse relies on the XML-RPC API of the now legacy PyPI website. But
> > > it is going to be deprecated [3]. There is no planned date yet but I
> > > think it is better to act before.
> > > There is a service that provides also RSS feed of packages on PyPI (and
> > > also npm): https://libraries.io/
> > > It is based on AGPL code: https://github.com/librariesio
> > > I think we could use this feed instead of farmhouse.
> > > Here is an example of the RSS feed: 
> > > https://libraries.io/pypi/trytond/versions.atom
> > > The only different is about the text and title. It is limited to just
> > > the version number. So the email will contain only the version number,
> > > the sender name will be " versions - Libraries.io" and the link
> > > will point to libraries.io page.
> > > But I think it is only minor changes compare to the benefit of not
> > > having to run farmhouse and have continuous plan after the close of
> > > XML-RPC API.
> > 
> > Looks as a good plan for me.
> 
> Well it did not take long, it seems that the XML-RPC API does not work
> anymore.

Feeds have been changed.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180414175130.GT31629%40kei.


Re: [tryton-dev] Package release announce

2018-04-14 Thread Cédric Krier
On 2018-04-13 17:47, Sergi Almacellas Abellana wrote:
> El 01/04/18 a les 14:39, Cédric Krier ha escrit:
> > Hi,
> > 
> > The package release announce on tryton-annou...@googlegroups.com relies
> > on rss2email [1] and farmhouse [2], a service that B2CK is running to
> > generate RSS feeds.
> > farmhouse relies on the XML-RPC API of the now legacy PyPI website. But
> > it is going to be deprecated [3]. There is no planned date yet but I
> > think it is better to act before.
> > There is a service that provides also RSS feed of packages on PyPI (and
> > also npm): https://libraries.io/
> > It is based on AGPL code: https://github.com/librariesio
> > I think we could use this feed instead of farmhouse.
> > Here is an example of the RSS feed: 
> > https://libraries.io/pypi/trytond/versions.atom
> > The only different is about the text and title. It is limited to just
> > the version number. So the email will contain only the version number,
> > the sender name will be " versions - Libraries.io" and the link
> > will point to libraries.io page.
> > But I think it is only minor changes compare to the benefit of not
> > having to run farmhouse and have continuous plan after the close of
> > XML-RPC API.
> 
> Looks as a good plan for me.

Well it did not take long, it seems that the XML-RPC API does not work
anymore.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180414173133.GS31629%40kei.


Re: [tryton-dev] Repository freeze

2018-04-07 Thread Cédric Krier
Hi,

On 2018-04-02 23:19, Cédric Krier wrote:
> On 2018-03-26 18:11, Cédric Krier wrote:
> > The translation will start next week on 2nd April and will end on 20th
> > April at 20:00 CEST on https://pootle.tryton.org/
> 
> The translations have been updated. You can start translate.

I found that I made a mistake in the process of generating the template.
So some new translations have been marked as translated with the English
value. So I run a script to mark every translations which has the same
value as the source, as fuzzy. This may have marked as fuzzy some valid
translations but it was the options with the smaller impact.
Sorry for the extra work that generates.

I filled https://bugs.tryton.org/issue7330 to avoid this in the future.

PS: I have updated the translations of country and currency modules.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180407115635.GN3910%40kei.


Re: [tryton-dev] Repository freeze

2018-04-04 Thread Cédric Krier
On 2018-04-02 23:19, Cédric Krier wrote:
> On 2018-03-26 18:11, Cédric Krier wrote:
> > The translation will start next week on 2nd April and will end on 20th
> > April at 20:00 CEST on https://pootle.tryton.org/
> 
> The translations have been updated. You can start translate.

I forgot to say that for this release we have translator credits
available.
So if you want to appear for your language, you must add your name as
translation to the keyword 'translator-credits' (of tryton.po) in your
language.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180404142645.GQ3910%40kei.


[tryton-dev] Disable python3.3 on drone-old

2018-04-03 Thread Cédric Krier
Hi,

I had to remove python3.3 on the python docker image because it fails to
create a virtualenv:

Using base prefix '/usr'
New python executable in 
/var/cache/drone/src/trypod.tryton.org/tryton/modules.stock/.tox/py33-postgresql/bin/python3.3
Also creating executable in 
/var/cache/drone/src/trypod.tryton.org/tryton/modules.stock/.tox/py33-postgresql/bin/python
Installing setuptools, pip, wheel...
  Complete output from command /var/cache/drone/src...gresql/bin/python3.3 
- setuptools pip wheel:
  Collecting setuptools
  Downloading 
http://pypi.tryton.org/root/pypi/+f/ca2/99c7acd13a72e/setuptools-39.0.1-py2.py3-none-any.whl
 (569kB)
Collecting pip
  Downloading 
http://pypi.tryton.org/root/pypi/+f/d51/2ceb964f38ba3/pip-9.0.3-py2.py3-none-any.whl
 (1.4MB)
Collecting wheel
  Downloading 
http://pypi.tryton.org/root/pypi/+f/240/d714477a715bc/wheel-0.31.0-py2.py3-none-any.whl
 (41kB)
wheel requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' but the 
running Python is 3.3.6

...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0-py2.7.egg/virtualenv.py",
 line 2328, in 
main()
  File 
"/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0-py2.7.egg/virtualenv.py",
 line 713, in main
symlink=options.symlink)
  File 
"/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0-py2.7.egg/virtualenv.py",
 line 945, in create_environment
download=download,
  File 
"/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0-py2.7.egg/virtualenv.py",
 line 901, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File 
"/usr/local/lib/python2.7/dist-packages/virtualenv-15.1.0-py2.7.egg/virtualenv.py",
 line 797, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /var/cache/drone/src...gresql/bin/python3.3 - setuptools 
pip wheel failed with error code 1
Running virtualenv with interpreter /usr/bin/python3.3

This is a Python version that is any way no more supported since
September 29, 2017.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180403223730.GM3910%40kei.


Re: [tryton-dev] Consolidated reports

2018-04-03 Thread Cédric Krier
On 2018-04-02 14:34, Josias Pérez wrote:
> Thanks for the info Cédric, and sorry for this [1]. 

But why still top-post?

> How could we start to adapt the get_multivalue method and how this affect 
> Access Rules?

It is about removing all attribute access to MultiValue by call to
get_multivalue with the right pattern.
It does not affect the access rules, it will just allow to remove those
that are purely for multi-company support.

> I know that that multi-company affect to sales, invoices, inventories and 
> more, so, could you give us a guideline on which modules start to develop 
> this? 

All modules that depends on company.

> [1] http://groups.tryton.org/netiquette
> [2] 
> https://github.com/tryton/company/blob/057e8b4749159c6bec255b712d45e50d2361646b/model.py#L11
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180403083605.GV3910%40kei.


Re: [tryton-dev] HTTP Error 404 http://hg.tryton.org/trytond/trytond/modules/account_es

2018-04-03 Thread Cédric Krier
Hi,

On 2018-04-02 23:57, Thierry Bruyere wrote:
> I'm looking at a 404 error when accessing the URL: 
> http://hg.tryton.org/trytond/trytond/modules/account_es

This is the result of 
http://www.tryton.org/posts/newsletter-april-2018.html#spanish-chart-of-account
The repository is still available at
https://hg.tryton.org/modules/account_es

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180403083842.GW3910%40kei.


Re: [tryton-dev] Repository freeze

2018-04-02 Thread Cédric Krier
On 2018-03-26 18:11, Cédric Krier wrote:
> The translation will start next week on 2nd April and will end on 20th
> April at 20:00 CEST on https://pootle.tryton.org/

The translations have been updated. You can start translate.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180402211931.GS3910%40kei.


[tryton-dev] Package release announce

2018-04-01 Thread Cédric Krier
Hi,

The package release announce on tryton-annou...@googlegroups.com relies
on rss2email [1] and farmhouse [2], a service that B2CK is running to
generate RSS feeds.
farmhouse relies on the XML-RPC API of the now legacy PyPI website. But
it is going to be deprecated [3]. There is no planned date yet but I
think it is better to act before.
There is a service that provides also RSS feed of packages on PyPI (and
also npm): https://libraries.io/
It is based on AGPL code: https://github.com/librariesio
I think we could use this feed instead of farmhouse.
Here is an example of the RSS feed: 
https://libraries.io/pypi/trytond/versions.atom
The only different is about the text and title. It is limited to just
the version number. So the email will contain only the version number,
the sender name will be " versions - Libraries.io" and the link
will point to libraries.io page.
But I think it is only minor changes compare to the benefit of not
having to run farmhouse and have continuous plan after the close of
XML-RPC API.


[1] https://github.com/wking/rss2email
[2] http://farmhouse.b2ck.com/
[3] 
https://pyfound.blogspot.be/2018/03/warehouse-all-new-pypi-is-now-in-beta.html#deprecations

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180401123949.GD3910%40kei.


Re: [tryton-dev] Repository freeze

2018-03-26 Thread Cédric Krier
On 2018-03-26 17:10, Oscar Alvarez wrote:
> Thank you Cedk, but I am worried about this
> 
> https://codereview.tryton.org/44491002/#msg6
> 
> It never was response, I dont know if its possible to take this issue or 
> assign to me for fix it.

This proposal will not be included in the release 4.8.
About the assignation, I see that nobody is assigned to issue6999 so you
are free to take it and make a proposal.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180326225813.GM3910%40kei.


[tryton-dev] Repository freeze

2018-03-26 Thread Cédric Krier
Hi,

The release 4.8 is planned for the 23rd April, it is time to freeze the
repositories. So now only bug fixes can be pushed. So everyone is
invited to test, report issues and provide patches.
There are still one week left for strings correction.

The translation will start next week on 2nd April and will end on 20th
April at 20:00 CEST on https://pootle.tryton.org/

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180326161104.GK3910%40kei.


Re: [tryton-dev] Consolidated reports

2018-03-25 Thread Cédric Krier
On 2018-03-24 21:26, Josias Pérez wrote:
> I was reading discussion [1] and maybe we could know what is the status of 
> the issues: 
> 
> - property field: it will not be possible to have correct 
>   multi-company when we still have those shitty fields. 

This has been done in https://bugs.tryton.org/issue2349 which is linked
to https://bugs.tryton.org/issue4080

> - context: in base we should never depend on context. 

This has not yet been done. It is about using get_multivalue method
instead of using field attribute to get the value of the MultiValue
field.
I think the best way to process is to review module by module and create
one issue per module for the patch.

> - user.company: in base we should never depend on this. 

I think it is almost gone but the source tree should be verified.



PS: Please do not top-post on this mailing list, see 
http://groups.tryton.org/netiquette

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180325103019.GD5880%40kei.


Re: [tryton-dev] Consolidated reports

2018-03-23 Thread Cédric Krier
On 2018-03-21 11:28, Josias Pérez wrote:
> Hi, 
> 
> I want to ask if someone has made some development to this post [1] ?
> 
> I'm interesting in start the development, if someone has already started I 
> want to join forces to multi-company consolidated reports. Is there is a 
> blueprint is good start point. 
> 
> I will wait for news. 

I think this can only be developed once this [1] multi-company issue is
generally fixed. This will require to ensure that MultiValue in the code
are properly called using the get_multivalue method instead of accessing
the field with the global context.


[1] https://bugs.tryton.org/issue4080

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180323140916.GF25494%40kei.


Re: [tryton-dev] New tax report engine

2018-03-18 Thread Cédric Krier
On 2018-03-18 17:20, Cédric Krier wrote:
> On 2018-03-17 01:47, Cédric Krier wrote:
> > On 2018-03-16 18:05, Cédric Krier wrote:
> > > I'm starting to update the chart of account modules. I will upload each
> > > one as soon as they are ready.
> > 
> > The account_be module is done.
> 
> The account_fr is done, thanks to French guys to check it.

The account_de_skr03 is done, thanks to German guys to check it.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180318232602.GI3935%40kei.


Re: [tryton-dev] New tax report engine

2018-03-18 Thread Cédric Krier
On 2018-03-17 01:47, Cédric Krier wrote:
> On 2018-03-16 18:05, Cédric Krier wrote:
> > I'm starting to update the chart of account modules. I will upload each
> > one as soon as they are ready.
> 
> The account_be module is done.

The account_fr is done, thanks to French guys to check it.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180318162009.GF3935%40kei.


Re: [tryton-dev] New tax report engine

2018-03-16 Thread Cédric Krier
On 2018-03-16 18:05, Cédric Krier wrote:
> I'm starting to update the chart of account modules. I will upload each
> one as soon as they are ready.

The account_be module is done.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180317004705.GA3935%40kei.


[tryton-dev] New tax report engine

2018-03-16 Thread Cédric Krier
Hi,

The last 2 days, I have been working on this new tax report:
https://bugs.tryton.org/issue6013

It is ready for testing on new database. I will be happy to have
feedbacks.

I'm starting to update the chart of account modules. I will upload each
one as soon as they are ready.
I will also write a SQL query to remove potential duplicate tax lines.

The two advantages of this new engine is:

- remove the need to create "fake" taxes just to have more than 2
  codes

- the definition can be updated without needed to change the posted
  tax lines.

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180316170516.GY788%40kei.


Re: [tryton-dev] Tax Code Usage

2018-03-15 Thread Cédric Krier
On 2018-03-15 15:13, Richard PALO wrote:
> Le 15/03/2018 à 12:48, Cédric Krier a écrit :
> > Hi,
> > 
> > I'm working on https://bugs.tryton.org/issue6013
> > For the migration, I need to define for each tax line if the amount is
> > tax or base.
> > So I write a script that use the existing couple (tax, code) from the
> > tax definition to decide if it is a tax or a base.
> > This works on the assumption that no tax code is used for both.
> > 
> > Has anybody an counter example?
> > 
> > Thanks,
> > 
> 
> I notice in the French plan, that this seems to be the case.
> 
> Go to the nested tax code list and note, for example,
> tax code 0030 is twice (base and tax)
> "Livraisons d'électricité, de gaz, de chaleur ou de froid imposables en 
> France (base)""0030"  "BAOU"
> "Livraisons d'électricité, de gaz, de chaleur ou de froid imposables en 
> France"   "0030"  "BAOU"

It is not a problem for the migration as they are two different tax code
record.
But with issue6013, we will be able to merge them.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180315164341.GS788%40kei.


[tryton-dev] Tax Code Usage

2018-03-15 Thread Cédric Krier
Hi,

I'm working on https://bugs.tryton.org/issue6013
For the migration, I need to define for each tax line if the amount is
tax or base.
So I write a script that use the existing couple (tax, code) from the
tax definition to decide if it is a tax or a base.
This works on the assumption that no tax code is used for both.

Has anybody an counter example?

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180315114848.GO788%40kei.


Re: [tryton-dev] Re: Get a second mac mini

2018-03-06 Thread Cédric Krier
On 2018-03-05 10:51, dieter.plassm...@virginweb.de wrote:
> Dear Cédric,
> 
> 1. Switching via VNC / SSH
> you can switch between the different OSX version / partitions by rebooting 
> the machine.
> In order to do so you access via VNC and select System Preferences.
> There you select “startup disk”.
> https://support.apple.com/en-us/HT202796
> (there is also a way to do this via ssh: 
> https://www.techwalla.com/articles/how-to-change-the-mac-startup-disk-from-the-command-line)
> 
> After the selection of the startup disk you have to reboot the machine, which 
> is then coming up with the selected OSX version.
> 
> 2. Resizing the internal disk
> Your internal disk seems to be 500GB with 465GB available.
> I assume you just have one partition right now.
> You can resize (also shrink) the last partition of a volume using disk 
> utility from Apple.
> https://www.imore.com/how-partition-your-mac
> Of course I recommend to make a backup before, which you should have anyway.
> However, it works without loosing data. I have done it.
> 
> A minimum installation of OSX needs 16GB, but recommended is 32 GB.
> Provided that you need space for the development tools as well I would 
> suggest 128GB for a partion.
> 
> Thus, reduce the existing partition by 256 GB with disk utility and create 
> two new partitions with 128 GB each. Gives you the option to go for OS 10.14 
> on the second partition as this gets available.
> 
> 3. Installing additional OSX versions
> If you want to follow this root and have performed the above step, please 
> contact me again.
> Perhaps, we can find a way how to access the older OSX version you need for 
> installation.

Thanks but this is still not very remote developer friendly (and we will
need to give root access). But also, I'm a bit worry to make disk
manipulation on a machine for which I have no backup nor installation
disk.

Any way, I will keep this in mind if the Foundation does not provide a
second host.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180306090234.GI4221%40kei.


[tryton-dev] Get a second mac mini

2018-03-03 Thread Cédric Krier
Hi,

issue7182 [1] shows that our support for macOS bundle is not optimal.

Ideally, we would need to have 3 machines as it seems it is the number
of version supported by Apple.
But I think we can have a pretty good support with only 2 machines.
The first one will be keep one release behind and used to build the
bundle. The second one will be kept up to date and used to test the
bundle against the new version.

So this is a request to buy a second machine by the Foundation.

Otherwise, we could try to update macOS lately about 1 year after the
release. But without being able to test the build on new version.

Or last option is to keep up to date for each build and take the risk to
make non backward compatible App.


[1] https://bugs.tryton.org/issue7182

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180303105015.GA4228%40kei.


Re: [tryton-dev] Call a Functional Field from another module

2018-02-16 Thread Cédric Krier
On 2018-02-15 11:53, Josias Pérez wrote:
> Hi, 
> 
> I would appreciate if could tell how I can call a functional field from 
> another module, in this case, I need to call the payable function field from 
> account module.
> 
> The code is the follow: 
> 
>   currency_digits = fields.Function(fields.Integer('Currency Digits'),
>   'get_currency_digits')
> 
>   receivable = fields.Function(
>   fields.Numeric('Por cobrar',
>   digits=(16, Eval('currency_digits', 2)),
>   depends=['currency_digits']),
>   'get_receivable_payable')
> 
>   @classmethod
>   def get_currency_digits(cls, parties, name):
>   pool = Pool()
>   Company = pool.get('company.company')
>   company_id = Transaction().context.get('company')
>   if company_id:
>   company = Company(company_id)
>   digits = company.currency.digits
>   else:
>   digits = 2
>   return {p.id: digits for p in parties}
> 
>   @classmethod
>   def get_receivable_payable(cls, subscriptions, names):
>   for subscription in subscriptions:
>   if subscription.party:
>   amount = subscription.party.receivable
>   return amount
>   else: 
>   return 0 
> 
> I'm trying to get the value of the payable field of account module. [1]

You should not try to call getter of Function field directly indeed you
should use the ORM and just access the corresponding field.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180216090350.GT24410%40kei.


Re: [tryton-dev] Impact mitigation for DDoS attack

2018-02-14 Thread Cédric Krier
On 2018-02-14 12:17, Mathias Behrle wrote:
> I am still missing a thorough handling of the _several_ _different_ involved
> issues as proposed in

If you have an issue to report, please create it on the bug tracker.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180214113337.GA24410%40kei.


signature.asc
Description: Digital signature


Re: [tryton-dev] Impact mitigation for DDoS attack

2018-02-14 Thread Cédric Krier
On 2018-02-14 01:27, Axel Braun wrote:
> Am Sonntag, 4. Februar 2018 00:30:05 UTC+1 schrieb Cédric Krier:
> > On 2018-02-03 07:48, Axel Braun wrote:
> > > Am Montag, 29. Januar 2018 23:25:07 UTC+1 schrieb Cédric Krier:
> > > > On 2018-01-29 12:47, Axel Braun wrote:
> > > > > I would like to discuss https://bugs.tryton.org/issue5375 with all 
> > > > > developers involved.
> > > > 
> > > > All developers have already commented on the issue and we all agree that
> > > > the proposal is wrong, solves nothing and weakens the brute force attack
> > > > protection.
> > > 
> > > We had a constructive and friendly discussion about the topic here: 
> > > https://bugzilla.opensuse.org/show_bug.cgi?id=1078111
> > 
> > What I read is that more people agree that the applied patch does not
> > solve any issue and disable the brute force attack protection.
> 
> Maybe you should read more carefully: The current implementation in
> Tryton, that allows you to bring the whole system down by flooding the
> database with login requests is rubbish (OK, the security team phrased
> it more politely)

So as it seems argumentations are just ignored. Here is a script that
shows that the "GNU Health patch" solves nothing and make things worst:

#!/usr/bin/env python3
import sys
from concurrent.futures import ThreadPoolExecutor
from requests_futures.sessions import FuturesSession

try:
URL = sys.argv[1]
except IndexError:
URL = 'http://localhost:8000/trunk/'


def payload():
return {
'method': 'common.db.login',
'params': [
'admin',
{'password': 'wrong'},
]
}

session = FuturesSession(executor=ThreadPoolExecutor(max_workers=80))

while True:
session.post(URL, json=payload())


If you run on a vanilla Tryton, of course the system will be slowed down
but users can still use the system because vanilla Tryton does not keep
a connection to the database on login failure. But of course the 'admin'
user can no more login as long as the attack is running (this is what
the common expected behaviour).

If you run on a "GNU Health" patched Tryton, the system is unusable for
every body because very fast all the database connections are hold by
the sleep.

This is just a simple example to show that the "GNU Health patch"
camp is just blinded by a limited vision on the security despite our
countless attempt to explain why their reasoning is wrong.


Now about the brute force attack, the only valid alternative protection
is to always slow any login. Slowing failing login is just useless
because as it leaks information too fast. But having a delay on the
login process is something we can not accept, there are scripts that
login on every call and we do not want to penalize them. Also we always
try to minimize the login time, well because it is the first impression
from the user and it will be bad if he has to wait more than 5 seconds
each time.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180214112837.GZ24410%40kei.


Re: [tryton-dev] Impact mitigation for DDoS attack

2018-02-14 Thread Cédric Krier
On 2018-02-14 10:48, Sergi Almacellas Abellana wrote:
> In case of flodding, the system can be turned down when the server does
> not have enougth capacity to reply all the request. If you get such
> attacks, i think it's better to block the correponding ip. Indeed a new
> patch have been proposed to improve it:
> 
> https://bugs.tryton.org/issue7110
> 
> I think this will work better for flooding attacks.

There are many other measures like the size request limitation, the
periodical cleaning of the table, the login size limit etc.
But this is not enough and it will never be enough.

Flooding attack (or DoS) should be fixed at lower level like firewall or
even better at the router level. But Tryton provides enough information
in the log file to let tools like fail2ban to block such IP. Also it is
recommended to put the server behind a proxy which provides all the
tools against such attack.

DDoS attack is even more difficult to counter because at this level it
is a matter of size. You must have a large enough network to absorb the
bandwidth the attacker is sending.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180214100433.GY24410%40kei.


Re: [tryton-dev] Deposit accounts on Spanish Chart

2018-02-12 Thread Cédric Krier
On 2018-02-12 10:03, Sergi Almacellas Abellana wrote:
> > If we want to use this feature, yes the fs_values must reflect the sum
> > of what was written by the module.
> I'm not sure if it's worth to implement it. Let me explain: Currently we
> are forced to update a record definition of the same module because the
> new kind is not defined on the same module but on another one. The
> problem is that account_es doest not depend on account_deposit and we
> don't want to add the dependency. Normally this is fixed by adding the
> code on a third module that depends on both modules.

I think there are use cases where it will be useful just like the
"depends" attribute on record because it increases the modularity.
Indeed I think we could extend the "depends" to the "field" tag and have
something like this:


other
deposit


The parser should use the latest value matching the condition.

> I don't think there are so much uses cases for defining the same record
> (with different values) on two different modules. Indeed I can not see
> any other usage that fixing this issue.

No because it is an hack but having values depending on the modules is a
use case.

> For me it will be simpler to define the deposit kind on the account
> module (so CoA modules can define accounts with the deposit kind). I
> don't see any drawback of allowing this kind on the account module.

I think it is a too simple solution which does not scale.


On another point of view, the kind attribute is maybe the problem. A
selection field is maybe too limited and we may need a multiselection.
But using a Many2Many field will not be good for performance so we may
need to find a way to create MultiSelection fields.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180212093016.GN24410%40kei.


Re: [tryton-dev] Deposit accounts on Spanish Chart

2018-02-08 Thread Cédric Krier
On 2018-02-08 16:50, Sergi Almacellas Abellana wrote:
> El 07/02/18 a les 18:22, Cédric Krier ha escrit:
> > On 2018-02-07 18:01, Sergi Almacellas Abellana wrote:
> >> El 07/02/18 a les 17:51, Cédric Krier ha escrit:
> >>> On 2018-02-07 17:27, Sergi Almacellas Abellana wrote:
> >>>> El 07/02/18 a les 16:43, Cédric Krier ha escrit:
> >>>>> On 2018-02-07 16:26, Sergi Almacellas Abellana wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> The account_deposit module defines a new kind of account (Deposit
> >>>>>> account) but there is no deposit account on the Spanish CoA. After a
> >>>>>> little bit of digging i found that the Spanish CoA includes deposit
> >>>>>> accounts for customers (4380) and suppliers (4070), so this accounts
> >>>>>> should be marked as deposit. This requires to add the account_deposit 
> >>>>>> as
> >>>>>> dependency of the account_es module, but not sure if this is the best
> >>>>>> way as this module also adds new functionaly on party and invoice which
> >>>>>> is not relevant to people not using the deposit functionaly.
> >>>>> You may put those account inside a extra depend module.
> >>>> The main issue here is that this account should be included on the
> >>>> balance sheet so probably the best is to use the deposit kind when the
> >>>> account_deposit module is installed and the other type when not 
> >>>> installed.
> >>> I do not think it is possible to do that.
> >> I've achieved it by adding the the following code at the end of the xml
> >> definition:
> >>
> >> 
> >>  >> update="1">
> >> deposit
> >> 
> >> 
> >>  >> update="1">
> >> deposit
> >> 
> >> 
> >> 
> > Are you sure that the ir.model.data is correct when the module
> > account_deposit is activated?
> 
> fs_values only contains the values of the last update (kind and
> party_required) but other fields are not computed. Which if i understand
> correctly this is not correct.
> 
> Is this something that we should fix?

If we want to use this feature, yes the fs_values must reflect the sum
of what was written by the module.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180208192323.GA7321%40kei.


Re: [tryton-dev] Deposit accounts on Spanish Chart

2018-02-07 Thread Cédric Krier
On 2018-02-07 18:01, Sergi Almacellas Abellana wrote:
> El 07/02/18 a les 17:51, Cédric Krier ha escrit:
> > On 2018-02-07 17:27, Sergi Almacellas Abellana wrote:
> >> El 07/02/18 a les 16:43, Cédric Krier ha escrit:
> >>> On 2018-02-07 16:26, Sergi Almacellas Abellana wrote:
> >>>> Hi,
> >>>>
> >>>> The account_deposit module defines a new kind of account (Deposit
> >>>> account) but there is no deposit account on the Spanish CoA. After a
> >>>> little bit of digging i found that the Spanish CoA includes deposit
> >>>> accounts for customers (4380) and suppliers (4070), so this accounts
> >>>> should be marked as deposit. This requires to add the account_deposit as
> >>>> dependency of the account_es module, but not sure if this is the best
> >>>> way as this module also adds new functionaly on party and invoice which
> >>>> is not relevant to people not using the deposit functionaly.
> >>>
> >>> You may put those account inside a extra depend module.
> >>
> >> The main issue here is that this account should be included on the
> >> balance sheet so probably the best is to use the deposit kind when the
> >> account_deposit module is installed and the other type when not installed.
> > 
> > I do not think it is possible to do that.
> 
> I've achieved it by adding the the following code at the end of the xml
> definition:
> 
> 
>  update="1">
> deposit
> 
> 
>  update="1">
> deposit
> 
> 
> 

Are you sure that the ir.model.data is correct when the module
account_deposit is activated?

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180207172251.GU7321%40kei.


Re: [tryton-dev] Deposit accounts on Spanish Chart

2018-02-07 Thread Cédric Krier
On 2018-02-07 17:27, Sergi Almacellas Abellana wrote:
> El 07/02/18 a les 16:43, Cédric Krier ha escrit:
> > On 2018-02-07 16:26, Sergi Almacellas Abellana wrote:
> >> Hi,
> >>
> >> The account_deposit module defines a new kind of account (Deposit
> >> account) but there is no deposit account on the Spanish CoA. After a
> >> little bit of digging i found that the Spanish CoA includes deposit
> >> accounts for customers (4380) and suppliers (4070), so this accounts
> >> should be marked as deposit. This requires to add the account_deposit as
> >> dependency of the account_es module, but not sure if this is the best
> >> way as this module also adds new functionaly on party and invoice which
> >> is not relevant to people not using the deposit functionaly.
> > 
> > You may put those account inside a extra depend module.
> 
> The main issue here is that this account should be included on the
> balance sheet so probably the best is to use the deposit kind when the
> account_deposit module is installed and the other type when not installed.

I do not think it is possible to do that.

> > But usually, you have 1 account deposit per party so you create them and
> > they do not come from the standard chart.
> 
> But the code groups by line party [1], so it's possible to have multiple
> parties on the same account (as the party required flag should be set
> for this accounts). Furthermore, I don't see how each party gets it's
> deposit account assigned. Am I missing something?

Indeed deposit account must have party checked.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180207165137.GT7321%40kei.


Re: [tryton-dev] Deposit accounts on Spanish Chart

2018-02-07 Thread Cédric Krier
On 2018-02-07 16:26, Sergi Almacellas Abellana wrote:
> Hi,
> 
> The account_deposit module defines a new kind of account (Deposit
> account) but there is no deposit account on the Spanish CoA. After a
> little bit of digging i found that the Spanish CoA includes deposit
> accounts for customers (4380) and suppliers (4070), so this accounts
> should be marked as deposit. This requires to add the account_deposit as
> dependency of the account_es module, but not sure if this is the best
> way as this module also adds new functionaly on party and invoice which
> is not relevant to people not using the deposit functionaly.

You may put those account inside a extra depend module.
But usually, you have 1 account deposit per party so you create them and
they do not come from the standard chart.

> So my doubt
> is the following:
> 
> - Why is the deposit type defined on the account_deposit module and not
> on the account base module?

Because we did not think that standard chart of account would need it
and we did not want to add new type if no code is using it.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180207154324.GS7321%40kei.


Re: [tryton-dev] How to update to null a table column with python-sql

2018-01-31 Thread Cédric Krier
On 2018-01-31 13:50, Raimon Esteve wrote:
> I try with python-sql to update a column to "null".
> 
> Somebody know how to update to null a column?
> 
> Example:
> 
> query = user.update(
> columns=[user.main_company],
> values=[None], <- I like here to update with null
> where=user.main_company != Null)

As you do not explain what is not working, we can not help you.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180131141904.GE23162%40kei.


Re: [tryton-dev] Adding a sequence on an existing field

2018-01-31 Thread Cédric Krier
On 2018-01-31 05:51, Maxime Richez wrote:
> So, what's the best way to finish my custom module?
> 
> - Changing my original test "if values.get('number') is None:" by "if 
> values.get('number') == "":" (and keeping the database unchanged) ?

Use a test like this:

if not values.get('number'):
…

In Tryton required means not False for Python so it includes None,
empty string, empty list, empty dictionary etc.

> - Using some sql in the __register__ method to remove the "NOT NULL" on the 
> "number" column ?

The constraint on removing "NOT NULL" only by the original module is
there on purpose because once a field is required all depending code
will not manage the case if it is empty. So we must ensure that there
will be always a value.
Also it is the reason why we must be careful when setting a field
required.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180131141825.GD23162%40kei.


Re: [tryton-dev] Impact mitigation for DDoS attack

2018-01-29 Thread Cédric Krier
On 2018-01-29 12:47, Axel Braun wrote:
> I would like to discuss https://bugs.tryton.org/issue5375 with all developers 
> involved.

All developers have already commented on the issue and we all agree that
the proposal is wrong, solves nothing and weakens the brute force attack
protection.

> In short, what is it about?
> In current implementation of the Tryton Server, each failed login attempt is 
> written to a database table (https://bugs.tryton.org/msg24643)
> 
> As a consequence, in case of a DDoS attack [1], the backend is flooded with 
> requests, filling the database and exhausting its resources (IO, conn. pool, 
> memory, transaction logs ..), leading to contention and finally bringing the 
> system down. This could be proofed with a small script.

This is no more true at all. Many improvements have been introduced
since.
And even, it was never right because there is a limit on the number of
concurrent database connections so the script just show this limit and
never exhaust all the resources described.
More over the script is really a newbie script because it just waits for
the answer for 3 seconds (with the bad patch) instead of starting a new
connection to try another password. A simple modification to use thread
will just flood the server the same way.

> In order to mitigate the impact of a DDoS attack, a patch was proposed in 
> above issue that implements a login timeout similar to the Secure Shell 
> (SSHD): On a failed login attempt, the a timeout of 3 seconds (by default) on 
> that session is  applied before the next login.

This is completely false and stupid as it was explained many times that
this behaviour provides no protection at all.
But it seems you and Luis can not understand that the sleep is only
effective if it applies on bad and succeed tentative.
And by the way OpenSSH does not have such protection and if you search
the internet a little bit, you will find many advise about using
fail2ban or firewall rate limit (which is the solution implemented on
Tryton's server).
Indeed I guess you are talking about pam_tally2 which uses a similar
technic as vanilla Tryton but without the penalty to the attacker.
But penalty is important see
https://www.schneier.com/blog/archives/2009/01/bad_password_se.html

> It also removes the functionality of writing the failed attempt on the 
> dabasase table, so the IO subsystem on PostgreSQL, FS and network are not 
> impacted in comparison to the server without the patch.

And this is the main problem. This remove the memory from the system
about tentative and so prevent to have any brute force attack protection.

> As you can see in above issue, the patch was not applied. For openSUSE 
> packages, I have applied it anyway, as I feel it makes sense. Now I received 
> the request to remove it again

All Tryton's developers are against this change so we should stop
promoting the openSUSE packages because they distribute a weakened
version of Tryton.

> So let me know your thoughts about the proposed patch – which of the two 
> proposals has less impact in case of a DDoS attack?

Any!  The only solutions in Tryton against DDoS are the resource
limitations like the database connections, the memory cache limit etc.

> [1] We are not talking about means to prevent a DdoS, e.g. by a proxy 
> configuration or similar

Too bad because they are the only *real* DDoS protection.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180129222002.GI23162%40kei.


[tryton-dev] MySQL backend removal

2018-01-21 Thread Cédric Krier
Hi,

I'm working on https://bugs.tryton.org/issue7017 which remove the mysql
backend from trytond repository and move it to its own backend
repository (like for trytond-gis). But I'm facing many issues to make it
working. Indeed it is broken since years and nobody care of it.
So in https://bugs.tryton.org/msg37708, I propose to just move the
existing code in a sandbox repository and wait to see if someone want to
make it works.
So the requirement to become an official package will be to have the
standard tests passing.

Regards,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180121182441.GG4239%40kei.


[tryton-dev] Request review

2018-01-13 Thread Cédric Krier
Hi,

I would like to push the reset password feature but I think it will be
good to have at least review for the email text:
https://codereview.tryton.org/41761002/
But of course, a general review is better as it touch the authentication
mechanism.

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20180113190849.GA4239%40kei.


Re: [tryton-dev] Re: Request testing for new OSX client

2017-12-25 Thread Cédric Krier
On 2017-12-23 08:35, José Arturo García wrote:
> im receiving this error in several machines with sierra and high sierra:

Please fill an issue at https://bugs.tryton.org/
And add console output when you launch from the console with:

$ DYLD_PRINT_LIBRARIES="1" Tryton.app/Contents/MacOS/tryton

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171225130923.GA3925%40kei.


Re: [tryton-dev] 80 cols on XML file

2017-12-22 Thread Cédric Krier
On 2017-12-20 15:55, Cédric Krier wrote:
> Hi,
> 
> I think we should remove the 80 cols limit on XML file.
> The rational is that XML file are indented by 4 spaces with at least 2
> indentation ( and ) but also XML is quite verbose.
> So we reach the limit very quickly and so we add line break which makes
> the XML more difficult to read. Also most of the time 'pyson' attribute
> already exceed the limit and it can not be break in multiple line.
> 
> I think we should be more flexible. For example the  line with
> 'model' and 'id' is more readable when not split. But  is more
> readable if each attribute is on his own line.
> 
> So I think the style should be one line with all attributes or one
> attribute per line, but not allow mixed.

Here is the style update: https://codereview.tryton.org/43871002

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171222143735.GK8635%40kei.


[tryton-dev] 80 cols on XML file

2017-12-20 Thread Cédric Krier
Hi,

I think we should remove the 80 cols limit on XML file.
The rational is that XML file are indented by 4 spaces with at least 2
indentation ( and ) but also XML is quite verbose.
So we reach the limit very quickly and so we add line break which makes
the XML more difficult to read. Also most of the time 'pyson' attribute
already exceed the limit and it can not be break in multiple line.

I think we should be more flexible. For example the  line with
'model' and 'id' is more readable when not split. But  is more
readable if each attribute is on his own line.

So I think the style should be one line with all attributes or one
attribute per line, but not allow mixed.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171220145518.GU8635%40kei.


Re: [tryton-dev] How to build and use plugins in the client

2017-12-14 Thread Cédric Krier
On 2017-12-13 23:48, edbo.des...@gmail.com wrote:
> On Thursday, 14 December 2017 00:10:06 UTC+1, Cédric Krier  wrote:
> > On 2017-12-13 12:54, edbo wrote:
> > > On Wednesday, 13 December 2017 10:40:06 UTC+1, Cédric Krier  wrote:
> > > > On 2017-12-13 01:13, wrote:
> > > > > But the question remains: Is it possible?
> > > > 
> > > > Yes probably. Plugins are kind of wizard that run on client side.
> > > 
> > > I got the first part working, I got the data from the database. Now I
> > > want to put that data into a label. For that part I need the
> > > win32com.client library from Python. But importing failed (I'm working
> > > on Windows 10). So, do I need to rebuild the whole client to get this
> > > working?
> > 
> > You can not add new dependencies except if you bundle them.
> 
> Does this mean that I have to rebuild the client? It's not a problem,
> just want to know if this is the case. So I can ask my IT-department
> to install the needed build tools.

Not necessary but your plugin may contains all the needed libraries.
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171214133118.GF10740%40kei.


Re: [tryton-dev] How to build and use plugins in the client

2017-12-13 Thread Cédric Krier
On 2017-12-13 12:54, edbo.des...@gmail.com wrote:
> On Wednesday, 13 December 2017 10:40:06 UTC+1, Cédric Krier  wrote:
> > On 2017-12-13 01:13, wrote:
> > > But the question remains: Is it possible?
> > 
> > Yes probably. Plugins are kind of wizard that run on client side.
> 
> I got the first part working, I got the data from the database. Now I
> want to put that data into a label. For that part I need the
> win32com.client library from Python. But importing failed (I'm working
> on Windows 10). So, do I need to rebuild the whole client to get this
> working?

You can not add new dependencies except if you bundle them.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171213230525.GD10740%40kei.


Re: [tryton-dev] How to build and use plugins in the client

2017-12-13 Thread Cédric Krier
On 2017-12-13 04:11, edbo.des...@gmail.com wrote:
> > But indeed you may be interested by https://bugs.tryton.org/issue6999, I
> > think we will allow to customize the command to do direct printing. In
> > this case, you could write a script that will recognize the label and
> > send it to the right printer.
> 
> The label-format is binary and you need the labelsoftware to read
> that. So Tryton-report-engine cannot do anything with it.

The report engine is capable of generating binary data.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171213124713.GZ10740%40kei.


Re: [tryton-dev] How to build and use plugins in the client

2017-12-13 Thread Cédric Krier
On 2017-12-13 01:13, edbo.des...@gmail.com wrote:
> But the question remains: Is it possible?

Yes probably. Plugins are kind of wizard that run on client side.

> and if so, how can we execute a plugin-command from the client?

The plugins appears in the action menu of the form.
The plugin can decide on which model to appear thanks to the
'get_plugins(model)' method.

> So a user clicks on the (new?) print button and in the background the
> labelsoftware is started, a predefined label with variables is opened
> (just like a odt-report) and filled in with the data the plugin got
> from the Tryton-client.

I guess you will have to retrieve the report using RPC calls and send it
to the printer.

But indeed you may be interested by https://bugs.tryton.org/issue6999, I
think we will allow to customize the command to do direct printing. In
this case, you could write a script that will recognize the label and
send it to the right printer.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171213093943.GW10740%40kei.


Re: [tryton-dev] How see calendar view of production

2017-11-25 Thread Cédric Krier
On 2017-11-25 09:01, Oscar Andres Alvarez Montero wrote:
> Hi Devs
> 
> I can not see calendar view of my productions in Tryton client gtk 4.4?

You are probably missing GooCalendar dependency: https://goocalendar.tryton.org/

> Indeed in sao 4.4 when I click for see this view is freezing with processing 
> message, nothing is showed.

You need to show the browser console log (with the sao compiled in
development mode).

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171125142649.GA19116%40kei.


Re: [tryton-dev] Help on Pyson Statement

2017-11-24 Thread Cédric Krier
On 2017-11-24 03:02, Maxime Richez wrote:
> Is there a tool in the gui to convert expression to Pyson ?

We have the pyson widget now. I think the condition field is missing it.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171124111753.GJ4148%40kei.


Re: [tryton-dev] Test client build under GTK+-3

2017-11-22 Thread Cédric Krier
On 2017-11-22 19:31, Cédric Krier wrote:
> On 2017-11-22 03:27, Gonzalo González Domínguez wrote:
> > El martes, 21 de noviembre de 2017, 20:45:06 (UTC+1), Cédric Krier  
> > escribió:
> > > On 2017-11-12 23:58, Cédric Krier wrote:
> > > > I need again some help to test the build of client with GTK+-3.
> > > > The scripts needed some changes to manage correctly the introspection.
> > > > You will find information and links at https://bugs.tryton.org/issue6932
> > > 
> > > I still did not have feedback on testing the clients:
> > > 
> > > http://www.b2ck.com/~ced/tryton-4.7.dev0.dmg
> > > http://www.b2ck.com/~ced/tryton-setup-4.7.dev0.exe
> > 
> > In Windows 10 (Spanish) it works, but the icons in the search limit
> > menu are lost. The buttons work, it's just aesthetic.
> 
> I uploaded a new version which should be fixed.
> I have found the same problem in OSX but did not yet find a solution.

I fixed also the dmg

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171122185738.GD4011%40kei.


Re: [tryton-dev] Test client build under GTK+-3

2017-11-22 Thread Cédric Krier
On 2017-11-22 03:27, Gonzalo González Domínguez wrote:
> El martes, 21 de noviembre de 2017, 20:45:06 (UTC+1), Cédric Krier  escribió:
> > On 2017-11-12 23:58, Cédric Krier wrote:
> > > I need again some help to test the build of client with GTK+-3.
> > > The scripts needed some changes to manage correctly the introspection.
> > > You will find information and links at https://bugs.tryton.org/issue6932
> > 
> > I still did not have feedback on testing the clients:
> > 
> > http://www.b2ck.com/~ced/tryton-4.7.dev0.dmg
> > http://www.b2ck.com/~ced/tryton-setup-4.7.dev0.exe
> 
> In Windows 10 (Spanish) it works, but the icons in the search limit
> menu are lost. The buttons work, it's just aesthetic.

I uploaded a new version which should be fixed.
I have found the same problem in OSX but did not yet find a solution.


-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171122183129.GC4011%40kei.


Re: [tryton-dev] Test client build under GTK+-3

2017-11-22 Thread Cédric Krier
On 2017-11-22 08:57, Sebastien Marie wrote:
> I tested tryton-setup-4.7.dev0.exe on Windows XP SP3.
> 
> No problem with installer.
> But when I start the program I have the following error message:
> 
> "Le point d'entrée de procédure GetFileInformationByHandleEx est introuvable 
> dans la bibliothèque de liaison dynamique KERNEL32.dll"
> 
> But it could be related to unsupported Windows version (XP is quite old
> now).

We do not support OS which are no more supported by the editor.
Indeed the build is based on http://www.msys2.org/ which does not
support Windows XP as stated on the main page.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171122104245.GR4011%40kei.


Re: [tryton-dev] Test client build under GTK+-3

2017-11-21 Thread Cédric Krier
On 2017-11-12 23:58, Cédric Krier wrote:
> I need again some help to test the build of client with GTK+-3.
> The scripts needed some changes to manage correctly the introspection.
> You will find information and links at https://bugs.tryton.org/issue6932

I still did not have feedback on testing the clients:

http://www.b2ck.com/~ced/tryton-4.7.dev0.dmg
http://www.b2ck.com/~ced/tryton-setup-4.7.dev0.exe

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171121194359.GN4011%40kei.


Re: [tryton-dev] RFC: First reporting implementation

2017-11-20 Thread Cédric Krier
On 2017-11-20 14:45, Sergi Almacellas Abellana wrote:
> El 19/11/17 a les 00:39, Cédric Krier ha escrit:
> > Hi
> > 
> > There are still some improvement that could be done on the client:
> > 
> >  - switch window action from an active tab
> Don't understand why you mean.

As we will have a lot of report based on different ModelSQL. Instead of
having a menu entry for each of them, I think it will be better to have
a single entry with many actions. This is already supported by the
client but it will just show in a popup a selection for the action to
run. I want to have this selection the tab and be able to change it at
any time.

> >  - allow graph on date to fill by month or year
> Indeed it will be also great to only show the relevant part of a date on 
> the tree view. So if we are grouping per month only 11/2017 is show 
> (currently it shows 01/11/2017).

It may be nice to have but it will require to have a date format
depending of the context.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171120150621.GA4011%40kei.


[tryton-dev] RFC: First reporting implementation

2017-11-18 Thread Cédric Krier
Hi,

I started to work on implementing reporting for aggregate data [1] for
sale [2].
A first report is ready for review [3]. This does not implement all the
features etc. But it is a proposal for the pattern which will be used
for all other reports. So I would like to have feedback before going
further.


There are still some improvement that could be done on the client:

- switch window action from an active tab
- allow graph on date to fill by month or year


[1] https://discuss.tryton.org/t/reporting-of-aggregated-data/437
[2] https://discuss.tryton.org/t/sale-reporting-of-aggregated-data/438
[3] https://bugs.tryton.org/issue6944

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171118233909.GA3602%40kei.


[tryton-dev] Test client build under GTK+-3

2017-11-12 Thread Cédric Krier
Hi,

I need again some help to test the build of client with GTK+-3.
The scripts needed some changes to manage correctly the introspection.
You will find information and links at https://bugs.tryton.org/issue6932

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171112225822.GI2029%40kei.


Re: [tryton-dev] Old test build of sao failed

2017-11-11 Thread Cédric Krier
On 2017-11-11 08:57, Axel Braun wrote:
> I saw one other message during installation:
> npm WARN deprecated bower@1.8.2: ...psst! Your project can stop working at 
> any moment be cause its dependencies can change. Prevent this by migrating to 
> Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
> 
> Is this planned?

I think we should go for browserify like I do for Ceryx.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/2017173318.GS9681%40kei.


Re: [tryton-dev] Product category is always mandatory

2017-11-11 Thread Cédric Krier
On 2017-11-10 07:18, Carlos Ibrahim Arias wrote:
> Hello,
> 
> I have an installation with tryton 4.2 and users are reporting that the 
> system is always setting up new products with the options "Use accounts of 
> the category by default" and "Use taxes of the category by default", so that 
> it is mandatory to assing a category, eventhough this two options are set up 
> to false (deactivated) in the product configuration form.
> 
> Do any one know anything about this bug? Is it a bug?

Tested on demo4.2.tryton.org and it works as expected. So for me, it
comes from a custom module.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/2017095722.GN9681%40kei.


Re: [tryton-dev] Old test build of sao failed

2017-11-08 Thread Cédric Krier
On 2017-11-08 06:56, Sebastien Marie wrote:
> On Wed, Nov 08, 2017 at 12:05:10AM +0100, Cédric Krier wrote:
> > Hi,
> > 
> > The build of sao on the old drone server is failing because of phantomjs:
> > https://drone-old.tryton.org/trypod.tryton.org/tryton/sao/4.4/23979d2770ba8c2d7b82f560db98ae017e208646
> > https://drone-old.tryton.org/trypod.tryton.org/tryton/sao/4.4/972c7d602e983e6c2d91c2179cc177abe5571394
> > 
> > Indeed we can see that the new version phantomjs-prebuilt@2.1.16 used
> > 'const' which is not supported by the version of node. It was working
> > with phantomjs-prebuilt@2.1.15
> > 
> > Is there any one who get an idea to fix that easily?
> > 
> 
> I am not a user of node, so it may be just partial elements... according
> to 
> https://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode
>  :
> 
> "const" is part of ECMAScript 2015 that could be enable in
> node 0.10 or 0.12 with --harmony flag.
> 
> I dunno if it is possible to ask npm to pass specific flag to node ?

I could not find how to pass this flag.
So I created https://bugs.tryton.org/issue6924 to fix the version of
phantomjs-prebuilt.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171108232031.GC9681%40kei.


[tryton-dev] Old test build of sao failed

2017-11-07 Thread Cédric Krier
Hi,

The build of sao on the old drone server is failing because of phantomjs:
https://drone-old.tryton.org/trypod.tryton.org/tryton/sao/4.4/23979d2770ba8c2d7b82f560db98ae017e208646
https://drone-old.tryton.org/trypod.tryton.org/tryton/sao/4.4/972c7d602e983e6c2d91c2179cc177abe5571394

Indeed we can see that the new version phantomjs-prebuilt@2.1.16 used
'const' which is not supported by the version of node. It was working
with phantomjs-prebuilt@2.1.15

Is there any one who get an idea to fix that easily?


-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171107230510.GS32103%40kei.


Re: [tryton-dev] Request testing for new OSX client

2017-11-02 Thread Cédric Krier
On 2017-11-01 01:03, Cédric Krier wrote:
> Hi,
> 
> Long story short, the new build platform for OSX to test at
> http://www.b2ck.com/~ced/tryton-4.6.0.dmg

I have uploaded a new build, please retry with this last one.
I was affected by https://github.com/anthony-tuininga/cx_Freeze/pull/304
so some libraries where not correctly re-referenced.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171102162746.GM5001%40kei.


Re: [tryton-dev] Request testing for new OSX client

2017-11-02 Thread Cédric Krier
On 2017-11-02 14:33, lists.jc.mic...@symetrie.com wrote:
> Hi Cédric,
> 
> On 1 Nov 2017, at 1:03, Cédric Krier wrote:
> > Long story short, the new build platform for OSX to test at
> > http://www.b2ck.com/~ced/tryton-4.6.0.dmg
> 
> Sees nothing (hangs before menu bar appears).
> In console :
> Nov  2 14:25:13 mbpjcm com.apple.launchd.peruser.501[353] 
> ([0x0-0xef0ef].Tryton[37993]): Exited with code: 1
> 
> OS X 10.9 on MacBookPro (2013)
> with macports & python installed.

Unfortunately, it is no more supported since 1 year:
https://en.wikipedia.org/wiki/OS_X_Mavericks

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171102141309.GK5001%40kei.


[tryton-dev] Request testing for new OSX client

2017-10-31 Thread Cédric Krier
Hi,

Long story short, the new build platform for OSX to test at
http://www.b2ck.com/~ced/tryton-4.6.0.dmg


Yesterday, when I built the OSX client for the release 4.6, I made the
simple test to launch it and connect to the demo server. But it did not
launch, indeed it just bounced few times on the dock and it vanish
without any error message.
As there was an update few weeks before of the OS, I tried an older
client (4.4.2) and it started normally. So I suspected that the GTK
libraries were too old for what we use in the series so I tried to
update the libraries. And it was the mistakes which I would discover 48
hours after. The GTK+ libraries are build using the official jhbuild
tool: https://wiki.gnome.org/Projects/GTK+/OSX/Building
The update did not go well, it crashed multiple times, to the point that
the environment was no more usable. So I decided to rebuild everything
from scratch. I skip the part where openssl does not compile, some
patches did not apply etc. I finally got a new environment that seemed
to work. I could launch the client from command line, connect to demo
server etc. So I built a new bundler and it crashed exactly the same
way. But this time launching the application from command line failed
also. I found that 'gdk.pixbuf_new_from_file' was not returning a pixbuf
for the 'png' files. So I started to debug this behaviour slowly because
it required to make a new bundle for each changes. I could not find an
explanation to this behaviour. But I remembered that I had to install
manually an header from glib 'gio/gdesktopappinfo.h' so I investigate
this issue because it may be that libraries were wrongly linked.
I discover that the libraries glib and pygobject from jhbuild are not
compatible anymore. I could not find a set of version that allowed
jhbuild to build both. I think jhbuild is no more used for Gtk+-2 but
only for Gtk+-3. 24 hours have already passed since the first attempt to
build release 4.6, I was closed to give up and declare that we can no
more support OSX until we migrate fully to Gtk+-3 and Python-3.
In a last attempt to find a solution, I tried https://brew.sh/. And I
think it is a good choice, it is like when we switched to MSYS2.
I installed every dependencies from brew and some with pip like
python-dateutil and cx_Freeze. And so I build again a bundle to discover
that it crashes exactly like all the previous one but only from the
launcher, at least it works from command line. So I'm back at the point
as the beginning.
I finally found by change this bug report:
https://github.com/GNS3/gns3-gui/issues/495
And it is exactly the problem, the stupid Apple is appending a random
argument "-psn_" to the program. So I made a similar fix at
https://bugs.tryton.org/issue6899 and build a final bundle which starts
from launcher: http://www.b2ck.com/~ced/tryton-4.6.0.dmg

The result is that I broke the old build system and I can not rebuild it
because of incompatible dependencies.
I have a brew environment on which I can build new series starting from
4.2. But the brew environment is global to the system so I can not test
if it works on a vanilla setup. So I'm requesting from user who has a
vanilla OSX without brew (python, gtk+ etc) to test this new bundle
before I publish it.
Do not report that calender view is not working, it is expected because
brew does not have goocanvas library that works with Gtk+-2.

Thanks,
-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20171101000314.GF5001%40kei.


  1   2   3   4   5   6   7   8   9   10   >