I find it a bit strange that the `key2` column is defined as 128c wide, and the 
string put into it @449 of the diff is cut off at 200 characters. Not only do 
they mismatch, there's not even a warning. Would it not be better to have the 
same limit on both, and maybe to remove the limit altogether? (it won't bother 
postgres, though I'm not sure the ORM can do that).

I also think it would be better to raise some sort of error if the value 
tentatively set is wider than the field, instead of just removing everything 
which sticks out silently and potentially storing an invalid condition.

The `object` key seems completely unused (it's set to `False` in set_default 
and to `True` in set_action, and it does not seem used at all in the code, is 
there really a need to keep setting it in default values & al? Can't it just be 
made into a function field writing to nothing and reading from itself being a 
default or an action?


The `get_defaults` documentation talks about priority and links to 
`set_defaults`, which reads like `set_defaults` will talk further about 
priority setting, but that does not seem to be the case. It should also 
indicate that setting a default for a given company has a higher priority than 
for none. And the precedence between user_id and company_id priorities is not 
explained. From my reading, it's `Nothing < company_id < user_id < (user_id, 
company_id)`. Is that correct?


It's also unclear what the condition is supposed to be exactly: a domain? Or a 
Python expression? Or some sort of weird custom format? From the get_defaults 
code (diff line 482) it looks like it's just some sort of tag, with a strict 
identity match, is that it?



-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-cleanup-ir-values/+merge/73809
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-cleanup-ir-values.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to