Odoo-Touren auf konsumiert setzen

develop
Christian Hattemer 2016-11-10 15:52:43 +01:00
parent 1a391b5527
commit 3ac31cc25b
2 changed files with 21 additions and 1 deletions

View File

@ -127,7 +127,8 @@ def main():
#'update_special_values',
'set_sys_params',
#'setup_reports',
]
'consume_tours',
]
if cmd == 'setup':
methods = setup_methods

View File

@ -909,6 +909,25 @@ class DatenpolFunctions():
# except:
# print "Fehler Anlage ExtID " + 'cust_account_mapp_' + acc
return True
def consume_tours(self):
"""Odoo-Touren auf konsumiert setzen"""
tours = [
'crm_tour',
'mail_tour',
'sale_tour',
'rte',
'rte_inline',
]
for uid in self._execute('res.users', 'search', []):
for t in tours:
vals = {
'name': t,
'user_id': uid,
}
self._execute('web_tour.tour', 'create', vals)
return True