Odoo-Touren auf konsumiert setzen
							parent
							
								
									1a391b5527
								
							
						
					
					
						commit
						3ac31cc25b
					
				|  | @ -127,6 +127,7 @@ def main(): | |||
|         #'update_special_values', | ||||
|         'set_sys_params', | ||||
|         #'setup_reports', | ||||
|         'consume_tours', | ||||
|     ] | ||||
| 
 | ||||
|     if cmd == 'setup': | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue