From b56148a4b64599ccb83811c08eb55687fc699570 Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Mon, 13 Feb 2017 20:29:12 +0100 Subject: [PATCH] Remove Add commande@bees-coop.be as follower --- beesdoo_purchase/models/purchase.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/beesdoo_purchase/models/purchase.py b/beesdoo_purchase/models/purchase.py index 1a64f56..dcc670e 100644 --- a/beesdoo_purchase/models/purchase.py +++ b/beesdoo_purchase/models/purchase.py @@ -3,16 +3,3 @@ from openerp import models, api class PurchaseOrder(models.Model): _inherit = 'purchase.order' - - @api.model - def create(self, vals): - purchase_order = super(PurchaseOrder, self).create(vals) - command_contact = self.env.ref('beesdoo_base.commande_beescoop', raise_if_not_found=False) - types = self.env['mail.message.subtype'].search(['|',('res_model','=','purchase.order'),('name','=','Discussions')]) - - if command_contact: - self.env['mail.followers'].create({'res_model' : 'purchase.order', - 'res_id' : purchase_order.id, - 'partner_id' : command_contact.id, - 'subtype_ids': [(6, 0, types.ids)]}) - return purchase_order