Re: [tryton] Adding validity dates for product supplier price

2016-07-21 Thread Richard PALO
Le 22/07/16 07:08, Cédric Krier a écrit :
>> That highly depends on the industry. In some of them, suppliers update
>> prices yearly and the company want the new prices to take effect on the
>> right date. It is also interesting in some cases to know when the new
>> prices where given by the supplier and what is the expected "expiry" date
>> of the price to know if you need to ask for a new quotation or you can
>> count on the price you have to make a sale quotation for example.
> 
> Please can you give me an example of such industry?
> 
One common example is any installation service company (electricity, plumbing, 
HVAC, etc...)

-- 
Richard PALO

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/5791AD52.6080104%40netbsd.org.


Re: [tryton] Default rules on purchase and sale

2016-07-21 Thread Cédric Krier
On 2016-07-21 10:18, Diego Abad wrote:
> I think purchase module should use the same domain on rules similar to 
> account module.

Please read 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" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160722051014.GW6791%40tetsuo.


Re: [tryton] Adding validity dates for product supplier price

2016-07-21 Thread Cédric Krier
On 2016-07-21 23:46, Albert Cervera i Areny wrote:
> 2016-07-19 18:08 GMT+02:00 Cédric Krier :
> 
> > On 2016-07-06 06:40, Maxime Richez wrote:
> > > Don't understand, today it's working correctly but i didn't change
> > anything
> > > in my code...
> > >
> > > Should this little feature suggested to the community, or keep it as a
> > > local change ?
> >
> > The problem I see with such feature is that the price list is going to
> > grow indefinitely. Also usually you can not anticipate the change in
> > prices of the supplier so editing with the current price should be good
> > enough.
> >
> 
> That highly depends on the industry. In some of them, suppliers update
> prices yearly and the company want the new prices to take effect on the
> right date. It is also interesting in some cases to know when the new
> prices where given by the supplier and what is the expected "expiry" date
> of the price to know if you need to ask for a new quotation or you can
> count on the price you have to make a sale quotation for example.

Please can you give me an example of such industry?

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

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160722050829.GV6791%40tetsuo.


Re: [tryton] Error when connecting from tryton4 to trytond4

2016-07-21 Thread Marko Randjelovic
On Thursday, July 21, 2016 at 9:59:22 AM UTC+2, Sergi Almacellas Abellana 
wrote:
>
> El 20/07/16 a les 13:26, Marko Randjelovic ha escrit: 
> > Hi, 
> > 
> > When I tried to connect from tryton4 client to trytond4, I've got this 
> > two errors. First error is occuring twice (it occurs again after i press 
> > 'Close' and after I press 'Close' again it occurs the second error. 
> > Tryton 3.8 was working fine. 
> > 
> > 
> > 
> > Traceback (most recent call last): 
> >   File "/trytond/wsgi.py", line 47, in dispatch_request 
> > return endpoint(request, **request.view_args) 
> >   File "/trytond/protocols/dispatcher.py", line 59, in rpc 
> > request, database_name, *request.params) 
> >   File "/trytond/wsgi.py", line 39, in auth_required 
> > return wrapped(*args, **kwargs) 
> >   File "/trytond/protocols/dispatcher.py", line 40, in wrapper 
> > return func(request, pool, *args, **kwargs) 
> >   File "/trytond/protocols/dispatcher.py", line 201, in _dispatch 
> > result = rpc.result(meth(*c_args, **c_kwargs)) 
> >   File "/trytond/res/user.py", line 359, in get_preferences 
> > preferences = cls._get_preferences(user, context_only=context_only) 
> >   File "/trytond/modules/company/company.py", line 165, in 
> _get_preferences 
> > context_only=context_only) 
> >   File "/trytond/res/user.py", line 336, in _get_preferences 
> > res[field] = getattr(user, field) 
> >   File "/trytond/model/fields/field.py", line 234, in __get__ 
> > return inst.__getattr__(self.name) 
> >   File "/trytond/model/modelstorage.py", line 1352, in __getattr__ 
> > read_data = self.read(list(ids), ffields.keys()) 
> >   File "/trytond/modules/company/company.py", line 214, in read 
> > result = super(User, cls).read(ids, fields_names=fields_names) 
> >   File "/trytond/model/modelsql.py", line 762, in read 
> > getter_results = field.get(ids, cls, field_list, values=result) 
> >   File "/trytond/model/fields/function.py", line 92, in get 
> > return dict((name, call(name)) for name in names) 
> >   File "/trytond/model/fields/function.py", line 92, in  
> > return dict((name, call(name)) for name in names) 
> >   File "/trytond/model/fields/function.py", line 86, in call 
> > return dict((r.id, method(r, name)) for r in records) 
> >   File "/trytond/model/fields/function.py", line 86, in  
> > return dict((r.id, method(r, name)) for r in records) 
> >   File "/trytond/res/user.py", line 172, in get_pyson_menu 
> > Action.get_action_values(self.menu.type, [self.menu.id])[0]) 
> >   File "/trytond/ir/action.py", line 97, in get_action_values 
> > return Action.read(action_ids, list(columns)) 
> >   File "/trytond/model/modelsql.py", line 692, in read 
> > order_by=history_order, limit=history_limit)) 
> > OperationalError: no such column: a.context_model 
>
> It seems that your database is not sync with the running code, so you 
> must upgrade all the modules in the database using: 
>
> trytond-admin -d  --all -c  
>
> Where  is the name or your database and  the 
> configuration file you are using to run trytond. 
>

In meantime I was using tryton 3.8 and imported all modules. When I run 
your command I get:

(venv) mr@debian:~/training/trytond4$ bin/trytond-admin -d test4 --all -c 
../trytond4.conf
Traceback (most recent call last):
  File "bin/trytond-admin", line 21, in 
admin.run(options)
  File "/home/mr/training/trytond4/trytond/admin.py", line 48, in run
Pool(db_name).init(update=options.update, lang=lang)
  File "/home/mr/training/trytond4/trytond/pool.py", line 155, in init
lang=lang)
  File "/home/mr/training/trytond4/trytond/modules/__init__.py", line 429, 
in load_modules
_load_modules()
  File "/home/mr/training/trytond4/trytond/modules/__init__.py", line 396, 
in _load_modules
graph = create_graph(module_list)[0]
  File "/home/mr/training/trytond4/trytond/modules/__init__.py", line 191, 
in create_graph
- set((p[0] for p in packages
Exception: Missing dependencies: [u'purchase_request']



When I try to import purchase_request:

(venv) mr@debian:~/training/trytond4$ bin/trytond-admin -d test4 -c 
../trytond4.conf --all -u purchase_request
5083 3530041120512 [2016-07-21 17:53:37,199] ERROR trytond.convert Error 
while parsing xml file:
In tag record: model ir.action.act_window with id act_purchase_request_form.
Traceback (most recent call last):
  File "/home/mr/training/trytond4/trytond/convert.py", line 447, in 
parse_xmlstream
self.sax_parser.parse(source)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.7/xml/sax/expatreader.py", line 304, in end_element
self._cont_handler.endElement(name)
  File 

[tryton] Default rules on purchase and sale

2016-07-21 Thread Diego Abad
I want to view all purchases on a company that have childs, in this case I 
need
to use "in companies" instead of "= company" on rules.

I see the followin rule on purchase:









Account module instead use this rule:
 








I think purchase module should use the same domain on rules similar to 
account module.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/6bc7203e-5719-41f4-a305-983220b6dc1d%40googlegroups.com.


Re: [tryton] Help with importing csv data please

2016-07-21 Thread ferreave

>
> You have to click on the tools icon, to open a menu where you will see 
> the missing options. 
>
Thanks Sergi. The answer was too simple :) . 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/d637decc-c4b6-46eb-82fc-d72251ba5f7d%40googlegroups.com.


Re: [tryton] Help with importing csv data please

2016-07-21 Thread ferreave


> Use the menu by clicking the Spanner icon above the new button. It has all 
> those options.
>
> Regards,
> Prayash Mohapatra
>
Oh, my gosh! I missed it completely. Thank you very much. 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/93624a54-67c3-422c-9d5f-6478a497c7ee%40googlegroups.com.


Re: [tryton] pyson and '~'

2016-07-21 Thread Sergi Almacellas Abellana

El 20/07/16 a les 17:11, Marko Randjelovic ha escrit:

Let us look at pyson expresson:

If(~Eval('end_date', None)

What is ~? Experimenting with Python interpreter, ~True is -2 and ~False
is -1. I thought ~ is for negation, but -1 and -2 are not boolean values
even in C they are 0 or >0.


In python ~ is the shourcut of Bitwise Inversion [1].
In PySON is the shourtcut of the Not operator: So your statement means:

> If(Not(Eval('end_date', None))

Which I think you will understand :)

[1] 
https://docs.python.org/2/library/operator.html#mapping-operators-to-functions

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

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/c459b6c8-f66a-f17b-9bb9-9c453da3967c%40koolpi.com.


Re: [tryton] Error when connecting from tryton4 to trytond4

2016-07-21 Thread Sergi Almacellas Abellana

El 20/07/16 a les 13:26, Marko Randjelovic ha escrit:

Hi,

When I tried to connect from tryton4 client to trytond4, I've got this
two errors. First error is occuring twice (it occurs again after i press
'Close' and after I press 'Close' again it occurs the second error.
Tryton 3.8 was working fine.



Traceback (most recent call last):
  File "/trytond/wsgi.py", line 47, in dispatch_request
return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 59, in rpc
request, database_name, *request.params)
  File "/trytond/wsgi.py", line 39, in auth_required
return wrapped(*args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 40, in wrapper
return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 201, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/res/user.py", line 359, in get_preferences
preferences = cls._get_preferences(user, context_only=context_only)
  File "/trytond/modules/company/company.py", line 165, in _get_preferences
context_only=context_only)
  File "/trytond/res/user.py", line 336, in _get_preferences
res[field] = getattr(user, field)
  File "/trytond/model/fields/field.py", line 234, in __get__
return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1352, in __getattr__
read_data = self.read(list(ids), ffields.keys())
  File "/trytond/modules/company/company.py", line 214, in read
result = super(User, cls).read(ids, fields_names=fields_names)
  File "/trytond/model/modelsql.py", line 762, in read
getter_results = field.get(ids, cls, field_list, values=result)
  File "/trytond/model/fields/function.py", line 92, in get
return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 92, in 
return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 86, in call
return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 86, in 
return dict((r.id, method(r, name)) for r in records)
  File "/trytond/res/user.py", line 172, in get_pyson_menu
Action.get_action_values(self.menu.type, [self.menu.id])[0])
  File "/trytond/ir/action.py", line 97, in get_action_values
return Action.read(action_ids, list(columns))
  File "/trytond/model/modelsql.py", line 692, in read
order_by=history_order, limit=history_limit))
OperationalError: no such column: a.context_model


It seems that your database is not sync with the running code, so you 
must upgrade all the modules in the database using:


trytond-admin -d  --all -c 

Where  is the name or your database and  the 
configuration file you are using to run trytond.


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

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/78fe9e3e-19be-50e0-7772-4c7b529143f7%40koolpi.com.


[tryton] TUB 2016 Dates

2016-07-21 Thread Albert Cervera i Areny
Hi!

Eventually, we can confirm that the next Tryton Unconference in Barcelona
will be held on October 17th till 21st.

The first two days (Monday and Tuesday) will have a conference format and
the days following will be a codesprint.

The (un)conference days will be at the Mobile World Centre [1], an
excellent place where we recently held the Spanish conference and offered
by the Mobile World Capital and Movistar.

The codesprint will possibly be held in another place yet to be determined
and it may not be in Barcelona City.

With this information you can hopefully reserve the travel tickets. If you
need to book a place to sleep before we confirm the codesprint location,
contact me for updated information.

The first two nights can, for sure, be reserved in any hotel/hostel/room
near MWC. It is in the very center in Barcelona, at Plaça Catalunya, so you
should have no problems to find a good location. It's plenty of places, so
I don't think it is necessary we provide a list of possible locations.

Any other information you need, just contact me.

See you soon!

[1] https://www.mobileworldcentre.com/

-- 
Albert Cervera i Areny
http://www.NaN-tic.com
Tel. 93 553 18 03

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CADWJ7GkZ%2BAr_LfWV8niSpoWD32g0tBrdn1XN%3Du1VqvQ%3Di_H5tg%40mail.gmail.com.


[tryton] Error when connecting from tryton4 to trytond4

2016-07-21 Thread Marko Randjelovic
Hi,

When I tried to connect from tryton4 client to trytond4, I've got this two 
errors. First error is occuring twice (it occurs again after i press 
'Close' and after I press 'Close' again it occurs the second error. Tryton 
3.8 was working fine.



Traceback (most recent call last):
  File "/trytond/wsgi.py", line 47, in dispatch_request
return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 59, in rpc
request, database_name, *request.params)
  File "/trytond/wsgi.py", line 39, in auth_required
return wrapped(*args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 40, in wrapper
return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 201, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/res/user.py", line 359, in get_preferences
preferences = cls._get_preferences(user, context_only=context_only)
  File "/trytond/modules/company/company.py", line 165, in _get_preferences
context_only=context_only)
  File "/trytond/res/user.py", line 336, in _get_preferences
res[field] = getattr(user, field)
  File "/trytond/model/fields/field.py", line 234, in __get__
return inst.__getattr__(self.name)
  File "/trytond/model/modelstorage.py", line 1352, in __getattr__
read_data = self.read(list(ids), ffields.keys())
  File "/trytond/modules/company/company.py", line 214, in read
result = super(User, cls).read(ids, fields_names=fields_names)
  File "/trytond/model/modelsql.py", line 762, in read
getter_results = field.get(ids, cls, field_list, values=result)
  File "/trytond/model/fields/function.py", line 92, in get
return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 92, in 
return dict((name, call(name)) for name in names)
  File "/trytond/model/fields/function.py", line 86, in call
return dict((r.id, method(r, name)) for r in records)
  File "/trytond/model/fields/function.py", line 86, in 
return dict((r.id, method(r, name)) for r in records)
  File "/trytond/res/user.py", line 172, in get_pyson_menu
Action.get_action_values(self.menu.type, [self.menu.id])[0])
  File "/trytond/ir/action.py", line 97, in get_action_values
return Action.read(action_ids, list(columns))
  File "/trytond/model/modelsql.py", line 692, in read
order_by=history_order, limit=history_limit))
OperationalError: no such column: a.context_model



Traceback (most recent call last):
  File "/home/mr/training/tryton4/tryton/common/common.py", line 1287, in 
process
self.callback(return_)
  File "/home/mr/training/tryton4/tryton/gui/main.py", line 859, in 
_set_preferences
self.global_search_entry.set_placeholder_text(_('Search'))
AttributeError: 'NoneType' object has no attribute 'set_placeholder_text'



Regards,
Marko

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/55568d28-0d1e-4421-aa9b-eabde53bade5%40googlegroups.com.


[tryton] pyson and '~'

2016-07-21 Thread Marko Randjelovic
Let us look at pyson expresson:

If(~Eval('end_date', None)

What is ~? Experimenting with Python interpreter, ~True is -2 and ~False is 
-1. I thought ~ is for negation, but -1 and -2 are not boolean values even 
in C they are 0 or >0.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/b0d6996a-a6da-48c2-8d80-ec1f3f3c8511%40googlegroups.com.


Re: [tryton] Help with importing csv data please

2016-07-21 Thread Sergi Almacellas Abellana

El 20/07/16 a les 21:54, ferre...@gmail.com ha escrit:

Hi Sergi. Thank you very much for helping me. This is what I get on the
toolbar of the parties view: New, Save, Switch View, Reload/Undo,
Previous, Next, Attachment, Note, Actions, Relate, Report, E-mail, Print
and Search. I cannot see: Export, Import, Duplicate, Delete. Did I do
something wrong? I just checked, and my client says "4.0.2". I installed
from the jessie repositories.
You have to click on the tools icon, to open a menu where you will see 
the missing options.



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

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/94bceb6d-010d-6185-6764-7b855d9dd9a6%40koolpi.com.


Re: [tryton-dev] KeyError when running config.set_trytond method

2016-07-21 Thread Marko Randjelovic
On Wednesday, July 20, 2016 at 10:28:04 AM UTC+2, Sergi Almacellas Abellana 
wrote:
>
> El 20/07/16 a les 10:03, Marko Randjelovic ha escrit: 
> > > No, I have only this: 
> > > 
> > > TRYTOND_CONFIG=/home/mr/.trytond.conf 
> > 
> > And what is the content? 
> > 
> > 
> > What content? 
> The content of the file used as TRYTOND_CONFIG (/home/mr/.trytond.conf) 
>
>
[database]
uri = sqlite://
path = /home/mr/training/databases

[session]
super_pwd = x
 

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

-- 
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/f8e35c8c-ccf7-4c19-bcc3-871813c21384%40googlegroups.com.