re-calculate values @ module install
This commit is contained in:
parent
206cd1e0e5
commit
65437bc52e
1 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,16 @@ class ValueStore(ModelSQL):
|
||||||
string='Digits', readonly=True),
|
string='Digits', readonly=True),
|
||||||
'on_change_with_valuedigits')
|
'on_change_with_valuedigits')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __register__(cls, module_name):
|
||||||
|
super(ValueStore, cls).__register__(module_name)
|
||||||
|
|
||||||
|
# clear value-store, re-calc
|
||||||
|
records = cls.search([])
|
||||||
|
if records:
|
||||||
|
cls.delete(records)
|
||||||
|
cls.maintenance_values()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
super(ValueStore, cls).__setup__()
|
super(ValueStore, cls).__setup__()
|
||||||
|
|
Loading…
Reference in a new issue