[IMP] Improve ospp_slide module
							parent
							
								
									9fb49fe9bb
								
							
						
					
					
						commit
						666e090ad7
					
				|  | @ -55,6 +55,7 @@ class SlideChannel(models.Model): | ||||||
|                 raise ValidationError(_("No Instance Arrangement or Base provided!")) |                 raise ValidationError(_("No Instance Arrangement or Base provided!")) | ||||||
| 
 | 
 | ||||||
|             partner_ids = partner_obj.search([('channel_id', '=', rec.id)]) |             partner_ids = partner_obj.search([('channel_id', '=', rec.id)]) | ||||||
|  |             print(partner_ids) | ||||||
| 
 | 
 | ||||||
|             rec.message_unsubscribe(partner_ids=[x.partner_id.id for x in partner_ids]) |             rec.message_unsubscribe(partner_ids=[x.partner_id.id for x in partner_ids]) | ||||||
| 
 | 
 | ||||||
|  | @ -116,6 +117,10 @@ class SlideChannel(models.Model): | ||||||
|                                 "demo_data": rec.shared_instance_demo_data |                                 "demo_data": rec.shared_instance_demo_data | ||||||
|                             } |                             } | ||||||
|                             vals.append(val) |                             vals.append(val) | ||||||
|  |                         else: | ||||||
|  |                             instance_id.write({ | ||||||
|  |                                 "user_scope": [(6, 0, partner_ids.ids)] | ||||||
|  |                             }) | ||||||
|                     if vals: |                     if vals: | ||||||
|                         instance_obj.create(vals) |                         instance_obj.create(vals) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Oliver Yuan
						Oliver Yuan