summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function_view.xml
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2014-09-15 16:59:38 +0200
committerMartin Trigaux <mat@openerp.com>2014-09-16 14:10:29 +0200
commitf7c45c5e31623b881ff15f36ce74d41509b9fe69 (patch)
tree8bcae87aadf15952730b37c31655df4f14d4901c /addons/analytic_user_function/analytic_user_function_view.xml
parenta1ab124469a3ebd4f09d99299fcb95c720cc9a1c (diff)
[FIX] base: do not drop sql constraints during update
When a module is updated, the sql constraints were checked against postgres pg_get_constraintdef() to see if they have diverged from the one defined in python code. However this check was failing as the syntax returned by pg_get_constraintdef() (e.g. "CHECK ((credit * debit) = 0::numeric)") differs from the one returned by `unify_cons_text` method (e.g. "check(debit*credit = 0")) so the constraints were always dropped and recomputed. This adds a definition column on ir.model.constraint (storing original defintion) to detect changes. The pg_constraint is still inspected to make sure we detect constraint without ir_model_constraint but with postgres constraint defined (e.g. name_uniq defined in base.sql). This changes also the date_update field when the definition changes.
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function_view.xml')
0 files changed, 0 insertions, 0 deletions