Re: [tryton-dev] Add sum widget in SAO

2018-03-01 Thread Diego Abad
I added nico con issue as collaborator..

Thanks nico

-- 
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/07a5f6fd-2850-406d-8133-aa21efdcbecf%40googlegroups.com.


Re: [tryton-dev] Proposal for to do Sao more responsive

2016-12-05 Thread Diego Abad
El lunes, 5 de diciembre de 2016, 13:10:51 (UTC-5), oscar_alvarez escribió:
>
> On 04/12/16 21:02, Cédric Krier wrote:
>
> On 2016-12-04 11:00, Oscar Alvarez wrote:
>
> 1. Use placeholders, instead of [ label: field ]
>
> This is not practical because Tryton forms are not fill once form, they
> are used also for consultation. So your proposal makes it not possible
> to know what is the label of a field once it is filled.
>
> I think that when the users dubts of field name (new users), they can be 
> push a button or option menu and this change view to classic mode 
> (current), so another way can be to stay pushed this button and the name 
> fields are revealed, he idea is to do usable Sao on Smartphones for example 
> for companies with sellers that has out of company to visit to customer and 
> to do sales on retail clients using a smartphone.
>

Maybe label should be load as a pop up, in case that form is filled. 

-- 
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/c03f475f-81f7-43ad-af93-706f19a93a84%40googlegroups.com.


[tryton-dev] Re: How to call custom method in proteus

2016-10-19 Thread Diego Abad
El miércoles, 19 de octubre de 2016, 5:54:14 (UTC-5), Markus Bala escribió:
>
> Hi,
>
> As we know proteus able to work as Tryton client, able to do Find, update, 
> delete, call Button, and Wizard.
>
>
> Below is to call button in proteus:
> s = ShipmentIn.find([('reference','=', ref),('state','=','draft')])
> s.click('receive')
>
> My question is how to call a method by using proteus?
>
> Example: (how to call method add in proteus?)
>
> Class StockMove:
> def add(self, val1, val2):
> return val1 + val2
>
>
You can find a example on account module, see get_origin method,
there is a definition inside   cls.__rpc__.update

http://hg.tryton.org/modules/account/file/tip/move.py#l689

-- 
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/36652981-fa50-41c4-bdac-f9a65f1bc0fb%40googlegroups.com.


Re: [tryton-dev] Sao problems on reports generation from IOS

2016-08-03 Thread Diego Abad
El miércoles, 3 de agosto de 2016, 8:46:43 (UTC-5), Diego Abad escribió:
>
> El miércoles, 3 de agosto de 2016, 3:35:03 (UTC-5), Cédric Krier escribió:
>>
>> On 2016-08-02 18:00, Diego Abad wrote: 
>> > The problem seems to be exec_report (inside action.js) function on sao, 
>> > because to deliver data to client actually sao used createObjectUrl 
>> > function. 
>> > 
>> > This link related the problem: 
>> > https://github.com/readium/readium-js/issues/72 
>> > 
>> > Reports generation works fine If I replace the use of createObjectURL 
>> by 
>> > the readAsDataURL 
>> > (fileapi) as suggested on: 
>> > 
>> http://stackoverflow.com/questions/24485077/how-to-open-blob-url-on-chrome-ios
>>  
>>
>> Normally, Blob URLs are well supported now: 
>> http://caniuse.com/#feat=bloburls 
>>
>> > But with this solution, report data is received as base64, but I'm not 
>> > sure, any disadvantage 
>> > of using fileapi. 
>>
>> Yes there is a big issue with this solution because data URIs size is 
>> limited on some browsers and it is less efficient as it must be encoded 
>> in base64. 
>> http://caniuse.com/#search=datauri 
>> Also FileReader.readAsBinaryString() is deprecated and non standard 
>>
>> https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsBinaryString
>>  
>>
>>
>> So I do not think we should change it especially for a non standard 
>> method and because recent version of iOS support the standard way. 
>>
>> -- 
>> Cédric Krier - B2CK SPRL 
>> Email/Jabber: cedric...@b2ck.com 
>> Tel: +32 472 54 46 59 
>> Website: http://www.b2ck.com/ 
>>
>  
> But in http://caniuse.com/#feat=bloburls on known issues section tells 
> that
> Chrome on iOS appears to have an issue when opening Blob URLs in another 
> tab
>

Maybe this library can be useful. https://github.com/eligrey/Blob.js/ 

-- 
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/83ac4e63-5e3b-4b19-9907-7b6ee0b42de4%40googlegroups.com.


Re: [tryton-dev] Sao problems on reports generation from IOS

2016-08-03 Thread Diego Abad
El miércoles, 3 de agosto de 2016, 3:35:03 (UTC-5), Cédric Krier escribió:
>
> On 2016-08-02 18:00, Diego Abad wrote: 
> > The problem seems to be exec_report (inside action.js) function on sao, 
> > because to deliver data to client actually sao used createObjectUrl 
> > function. 
> > 
> > This link related the problem: 
> > https://github.com/readium/readium-js/issues/72 
> > 
> > Reports generation works fine If I replace the use of createObjectURL by 
> > the readAsDataURL 
> > (fileapi) as suggested on: 
> > 
> http://stackoverflow.com/questions/24485077/how-to-open-blob-url-on-chrome-ios
>  
>
> Normally, Blob URLs are well supported now: 
> http://caniuse.com/#feat=bloburls 
>
> > But with this solution, report data is received as base64, but I'm not 
> > sure, any disadvantage 
> > of using fileapi. 
>
> Yes there is a big issue with this solution because data URIs size is 
> limited on some browsers and it is less efficient as it must be encoded 
> in base64. 
> http://caniuse.com/#search=datauri 
> Also FileReader.readAsBinaryString() is deprecated and non standard 
>
> https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsBinaryString
>  
>
>
> So I do not think we should change it especially for a non standard 
> method and because recent version of iOS support the standard way. 
>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@b2ck.com  
> Tel: +32 472 54 46 59 
> Website: http://www.b2ck.com/ 
>
 
But in http://caniuse.com/#feat=bloburls on known issues section tells that
Chrome on iOS appears to have an issue when opening Blob URLs in another tab

-- 
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/b4bfb20e-5cf4-4a22-82e6-83c0b02f42b8%40googlegroups.com.


[tryton-dev] Sao problems on reports generation from IOS

2016-08-02 Thread Diego Abad
I am testing report generation from many mobile devices, and I have found
that the reports cant be opened from IOS devices (iphone, ipad).

The problem seems to be exec_report (inside action.js) function on sao,
because to deliver data to client actually sao used createObjectUrl 
function.

This link related the problem: 
https://github.com/readium/readium-js/issues/72

Reports generation works fine If I replace the use of createObjectURL by 
the readAsDataURL
(fileapi) as suggested on:
http://stackoverflow.com/questions/24485077/how-to-open-blob-url-on-chrome-ios

But with this solution, report data is received as base64, but I'm not 
sure, any disadvantage
of using fileapi.

-- 
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/588fb10d-9c73-4ae8-beb5-a16982eddfda%40googlegroups.com.


Re: [tryton-dev] Error on web client sao

2015-12-13 Thread Diego Abad
To reproduce the error, I am using:
Trytond 3.8.0
Sao from hg -> commit: 9635.  The last commit at time
Chromium 47.0.2526.80

I debug the code and see that the problem is on call to function 
String.fromCharCode.apply(null, value) on tryton-sao.js:676  inside  
Sao.rpc.prepareObject.
I found this info concerning:
https://github.com/michael/github/issues/137
https://github.com/mathiasbynens/String.fromCodePoint/issues/1

I can confirm that Firefox dont produce this error.

Regards.

-- 
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/c0c8679c-9dde-4dc3-a947-b4ffd13ded09%40googlegroups.com.


Re: [tryton-dev] Error on web client sao

2015-12-13 Thread Diego Abad
About this topic...

BIG_IMAGE_SIZE value is set to  Math.pow(10, 6) -> 1MB

however apparently the error is that the comparison 
 if (value > Sao.common.BIG_IMAGE_SIZE) is true 
although my image size is 482kB.

I test changing BIG_IMAGE_SIZE to Math.pow(10, 7) and works.
But I when I return BIG_IMAGE_SIZE to original value Math.pow(10, 6) now 
also works... 

El viernes, 4 de diciembre de 2015, 17:05:03 (UTC-5), Cédric Krier escribió:
>
> On 2015-12-04 09:52, Diego Abad wrote: 
> > Hello, 
> > 
> > I am testing sao client with an application.  One form of my app have a 
> > binary field with image widget. 
> > When I want to upload a file biggest than 100Kb and try to save the 
> > registry, sao show "processing..." message indefinitely. 
> > When I upload a file smallest than 100Kb this work. 
> > 
> > I am using version 3.8 on Archlinux. 
>
> I think you should report an bug. 
> I suspect a limitation on the size for Blob or createObjectURL creation. 
> Please check the browser log if there is no error message and include it 
> on the bug report (usually when "processing..." stays is because an 
> exception was raised at an unexpected place). 
>
> -- 
> Cédric Krier - B2CK SPRL 
> Email/Jabber: cedric...@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/7f9525cd-ad4b-43bc-bfd2-cc886ba78f7e%40googlegroups.com.


[tryton-dev] Error on web client sao

2015-12-04 Thread Diego Abad
Hello,

I am testing sao client with an application.  One form of my app have a 
binary field with image widget.
When I want to upload a file biggest than 100Kb and try to save the 
registry, sao show "processing..." message indefinitely.
When I upload a file smallest than 100Kb this work.

I am using version 3.8 on Archlinux.

Grettings...

-- 
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/cc1f48c8-52fc-458f-bf59-112fad3978fd%40googlegroups.com.