Fall 5558: Information - Neuer Kunde vom Portal
							parent
							
								
									b62a06750a
								
							
						
					
					
						commit
						8c5a3645c3
					
				|  | @ -99,7 +99,22 @@ class Partner(models.Model): | ||||||
|             vals['active'] = False |             vals['active'] = False | ||||||
|         vals['is_company'] = True |         vals['is_company'] = True | ||||||
|         vals['portal_pending'] = True |         vals['portal_pending'] = True | ||||||
|         self.create(vals) | 
 | ||||||
|  |         # send mail activity to usergroup(with group 'informieren bei neuem Portalkunden, if new company was created | ||||||
|  |         recordset = self.create(vals) | ||||||
|  |         users = self.env.ref('dp_custom.group_inform_on_new_partner').users | ||||||
|  | 
 | ||||||
|  |         for user in users: | ||||||
|  |             values = {'user_id': user.id, | ||||||
|  |                       'date_deadline': fields.datetime.now(), | ||||||
|  |                       'note': "New Company has been created", | ||||||
|  |                       'activity_type_id': self.env.ref('mail.mail_activity_data_email').id, | ||||||
|  |                       'res_id': recordset.id, | ||||||
|  |                       'res_model': recordset._name, | ||||||
|  |                       'res_model_id': self.env.ref('base_partner_sequence.model_res_partner').id | ||||||
|  |                       } | ||||||
|  |             self.env['mail.activity'].create(values) | ||||||
|  | 
 | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|     @api.model |     @api.model | ||||||
|  | @ -261,9 +276,10 @@ class Partner(models.Model): | ||||||
|             common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id']) |             common_list.extend(['name', 'name2', 'info_kundennr', 'info_uid', 'comment', 'retail_partner_id']) | ||||||
|             return common_list |             return common_list | ||||||
|         elif self.env.context.get('sst_11', False): |         elif self.env.context.get('sst_11', False): | ||||||
|             common_list.extend(['name', 'ref', 'partner_sector_id', 'info_uid', 'comment', 'vat', 'property_payment_term_id', |             common_list.extend( | ||||||
|                                 'date_vat_check', 'active', 'property_product_pricelist', 'retail_partner_id', |                 ['name', 'ref', 'partner_sector_id', 'info_uid', 'comment', 'vat', 'property_payment_term_id', | ||||||
|                                 'is_retailer', 'name2', 'carrier_id', 'collective_bill', 'fiscal_position']) |                  'date_vat_check', 'active', 'property_product_pricelist', 'retail_partner_id', | ||||||
|  |                  'is_retailer', 'name2', 'carrier_id', 'collective_bill', 'fiscal_position']) | ||||||
|             return common_list |             return common_list | ||||||
|         elif self.env.context.get('sst_14', False): |         elif self.env.context.get('sst_14', False): | ||||||
|             common_list = ['firstname', 'lastname', 'midname', 'email', 'company_odoo_id', 'portal_id', 'opt_out'] |             common_list = ['firstname', 'lastname', 'midname', 'email', 'company_odoo_id', 'portal_id', 'opt_out'] | ||||||
|  |  | ||||||
|  | @ -8,4 +8,8 @@ | ||||||
|         <field name="name">Löschen von Angeboten erlauben</field> |         <field name="name">Löschen von Angeboten erlauben</field> | ||||||
|         <field name="comment">Löschen von Angeboten erlauben</field> |         <field name="comment">Löschen von Angeboten erlauben</field> | ||||||
|     </record> |     </record> | ||||||
|  |         <record id="group_inform_on_new_company" model="res.groups"> | ||||||
|  |         <field name="name">Informieren bei neuem Portalkunden</field> | ||||||
|  |         <field name="comment">Informieren bei neuem Portalkunden</field> | ||||||
|  |     </record> | ||||||
| </odoo> | </odoo> | ||||||
|  |  | ||||||
|  | @ -1,3 +1,3 @@ | ||||||
| "id","name","implied_ids/id" | "id","name","implied_ids/id" | ||||||
| "role_sachbearbeiter","Sachbearbeiter","account.group_account_invoice,sales_team.group_sale_manager,stock.group_stock_user,base.group_partner_manager,stock.group_stock_manager,website.group_website_designer,purchase.group_purchase_manager" | "role_sachbearbeiter","Sachbearbeiter","dp_custom.group_inform_on_new_company,account.group_account_invoice,sales_team.group_sale_manager,stock.group_stock_user,base.group_partner_manager,stock.group_stock_manager,website.group_website_designer,purchase.group_purchase_manager" | ||||||
| "role_admin","Admin","base.group_partner_manager,base.group_system,account.group_account_manager,account.group_account_user,sales_team.group_sale_manager,stock.group_stock_manager,website.group_website_designer,connector.group_connector_manager,queue_job.group_queue_job_manager,purchase.group_purchase_manager,dp_custom.group_allow_delete_so_attachments,dp_custom.group_allow_delete_so_drafts" | "role_admin","Admin","base.group_partner_manager,base.group_system,account.group_account_manager,account.group_account_user,sales_team.group_sale_manager,stock.group_stock_manager,website.group_website_designer,connector.group_connector_manager,queue_job.group_queue_job_manager,purchase.group_purchase_manager,dp_custom.group_allow_delete_so_attachments,dp_custom.group_allow_delete_so_drafts" | ||||||
|  |  | ||||||
| 
 | 
|  | @ -48,6 +48,10 @@ ENVIRONMENTS = { | ||||||
|     'rw-tz'       : Environment('http://localhost',  '8080', 'tz-austria_1', 'tz-admin',     'x', 'admin', config = ConfigTZA()), |     'rw-tz'       : Environment('http://localhost',  '8080', 'tz-austria_1', 'tz-admin',     'x', 'admin', config = ConfigTZA()), | ||||||
|     'rw-glaser'   : Environment('http://localhost',  '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), |     'rw-glaser'   : Environment('http://localhost',  '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), | ||||||
| 
 | 
 | ||||||
|  |     'ab'          : Environment('http://localhost',  '8080', 'tz-austria_1', 'admin',        'x', 'admin', config = ConfigTZA()), | ||||||
|  |     'ab-tz'       : Environment('http://localhost',  '8080', 'tz-austria_1', 'tz-admin',     'x', 'admin', config = ConfigTZA()), | ||||||
|  |     'ab-glaser'   : Environment('http://localhost',  '8080', 'tz-austria_1', 'glaser-admin', 'x', 'admin', config = ConfigGlaser()), | ||||||
|  | 
 | ||||||
|     # Remote environments are always listed without passwords! |     # Remote environments are always listed without passwords! | ||||||
|     # Do not store them here, you have to type them anyway! |     # Do not store them here, you have to type them anyway! | ||||||
|     'test': Environment('https://erp.tzaustria.info', '443', 'odoo-test', 'admin', config = ConfigTZA()), |     'test': Environment('https://erp.tzaustria.info', '443', 'odoo-test', 'admin', config = ConfigTZA()), | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue