Tryton - Issues



Title Possible to fill invalid values when creating record for a m2o
Priority bug Status closed
Superseder Nosy List andres.politi, ced
Type behavior Components
Assigned To Keywords

Created on 2018-08-27.15:20:27 by andres.politi, last changed by ced.

msg44014 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-09-21.21:58:52
So I close it.
msg43105 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-08-27.15:39:05
This is an expected behavior because the domain on product are not reported to the template. I do not think we want to fix that because it will remove the possibility to override template fields on product.
msg43104 (view) Author: [hidden] (andres.politi) Date: 2018-08-27.15:20:27
In previous versions, if a many2one field have a domain, when creating a new record from the create option of the many2one, the fields affected by the domain would be autocompleted and readonly. 
In 4.8.2 this no longer happens and it's possible to fill invalid values.
-Create a new project
-In the product many2one field, create a new product
-Create a product with a unit of measure of type != time
-Press save in the product window

Traceback (most recent call last):
  File "/trytond/", line 71, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/", line 42, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/", line 172, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
  File "/trytond/model/", line 671, in on_change
  File "/trytond/model/", line 84, in wrapper
    result = func(self, *args, **kwargs)
  File "/trytond/model/fields/", line 114, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/modules/project_revenue/", line 195, in on_change_product
    self.product.list_price, hour_uom)
  File "/trytond/modules/product/", line 250, in compute_price
    % (,
ValueError: cannot convert between Unidades and Tiempo

This was tested in the desktop client in windows, linux, and in Sao.
Date User Action Args
2018-09-21 21:58:52cedsetstatus: chatting -> closed
messages: + msg44014
2018-08-27 15:39:05cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg43105
2018-08-27 15:20:27andres.politicreate

Showing 10 items. Show all history (warning: this could be VERY long)