├── .gitignore ├── crm_campaign_addons ├── __init__.py ├── security │ └── ir.model.access.csv ├── __openerp__.py ├── crm.py └── crm_view.xml ├── crm_campaign_blog ├── __init__.py ├── __openerp__.py └── blog.py ├── crm_campaign_phase ├── __init__.py ├── security │ └── ir.model.access.csv ├── __openerp__.py ├── crm_view.xml └── crm.py ├── README.md ├── crm_campaign_product ├── __init__.py ├── security │ └── ir.model.access.csv ├── __openerp__.py ├── product_view.xml └── product.py ├── website_crm_campaign ├── __init__.py ├── __openerp__.py ├── i18n │ └── sv.po ├── campaign_view.xml ├── campaign.py └── static │ └── src │ └── css │ └── sale_campaign.css ├── crm_campaign_supplier ├── __init__.py ├── __openerp__.py └── res_partner.py ├── marketing_paolos ├── __init__.py ├── marketing_campaign_view.xml ├── marketing_campaign.py └── __openerp__.py └── crm_campaign_phase_default_variant ├── __init__.py ├── __openerp__.py └── crm.py /.gitignore: -------------------------------------------------------------------------------- 1 | **.py[cod] 2 | -------------------------------------------------------------------------------- /crm_campaign_addons/__init__.py: -------------------------------------------------------------------------------- 1 | import crm 2 | -------------------------------------------------------------------------------- /crm_campaign_blog/__init__.py: -------------------------------------------------------------------------------- 1 | import blog 2 | -------------------------------------------------------------------------------- /crm_campaign_phase/__init__.py: -------------------------------------------------------------------------------- 1 | import crm 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # odoo-marketing 2 | Marketing addons 3 | -------------------------------------------------------------------------------- /crm_campaign_product/__init__.py: -------------------------------------------------------------------------------- 1 | import product 2 | -------------------------------------------------------------------------------- /website_crm_campaign/__init__.py: -------------------------------------------------------------------------------- 1 | import campaign 2 | -------------------------------------------------------------------------------- /crm_campaign_supplier/__init__.py: -------------------------------------------------------------------------------- 1 | import res_partner 2 | -------------------------------------------------------------------------------- /marketing_paolos/__init__.py: -------------------------------------------------------------------------------- 1 | import marketing_campaign 2 | -------------------------------------------------------------------------------- /crm_campaign_phase_default_variant/__init__.py: -------------------------------------------------------------------------------- 1 | import crm 2 | -------------------------------------------------------------------------------- /crm_campaign_product/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink 2 | access_crm_campaign_product,crm.campaign.product,model_crm_campaign_product,,1,1,1,0 3 | access_crm_campaign_product_manager,crm.campaign.product.manager,model_crm_campaign_product,base.group_sale_manager,1,1,1,1 4 | -------------------------------------------------------------------------------- /crm_campaign_phase/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink 2 | access_crm_campaign_phase,crm.campaign.phase,model_crm_tracking_phase,,1,1,1,1 3 | access_crm_campaign_phase_type,crm.campaign.phase,model_crm_tracking_phase_type,,1,0,0,0 4 | access_crm_campaign_phase_type_manager,crm.campaign.phase.manager,model_crm_tracking_phase_type,,1,1,1,1 5 | -------------------------------------------------------------------------------- /crm_campaign_addons/security/ir.model.access.csv: -------------------------------------------------------------------------------- 1 | id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink 2 | access_crm_campaign_object,crm.campaign.object,model_crm_campaign_object,,1,1,1,0 3 | access_crm_campaign_object_manager,crm.campaign.object.manager,model_crm_campaign_object,base.group_sale_manager,1,1,1,1 4 | access_crm_tracking_campaign_public,crm_tracking_campaign public,model_crm_tracking_campaign,,1,0,0,0 5 | -------------------------------------------------------------------------------- /marketing_paolos/marketing_campaign_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | marketing.campaign.form 6 | marketing.campaign 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /crm_campaign_blog/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign Blog', 24 | 'version': '0.2', 25 | 'category': 'crm', 26 | 'description': """ 27 | Extends Crm Campaign with blog 28 | 29 | """, 30 | 'author': 'Vertel AB', 31 | 'license': 'AGPL-3', 32 | 'website': 'http://www.vertel.se', 33 | 'depends': ['crm_campaign_addons','website_blog'], 34 | 'data': [ 35 | ], 36 | 'installable': True, 37 | } 38 | 39 | -------------------------------------------------------------------------------- /marketing_paolos/marketing_campaign.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2004-2016 Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | from openerp import models, fields, api, _ 22 | 23 | import logging 24 | _logger = logging.getLogger(__name__) 25 | 26 | 27 | class marketing_campaign(models.Model): 28 | _inherit = "marketing.campaign" 29 | 30 | cycle_id = fields.Many2one(comodel_name='sale.cycle', string='Sale cycle') 31 | 32 | 33 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: 34 | -------------------------------------------------------------------------------- /crm_campaign_supplier/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign Supplier', 24 | 'version': '0.2', 25 | 'category': 'crm', 26 | 'description': """ 27 | Extends Crm Campaign with supplier 28 | ================================== 29 | 30 | """, 31 | 'author': 'Vertel AB', 32 | 'license': 'AGPL-3', 33 | 'website': 'http://www.vertel.se', 34 | 'depends': ['crm_campaign_product'], 35 | 'data': [ 36 | ], 37 | 'installable': True, 38 | } 39 | 40 | -------------------------------------------------------------------------------- /crm_campaign_addons/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign', 24 | 'version': '0.2', 25 | 'category': 'crm', 26 | 'description': """ 27 | Base class that bind together crm.tracking.campaign with different object 28 | 29 | """, 30 | 'author': 'Vertel AB', 31 | 'license': 'AGPL-3', 32 | 'website': 'http://www.vertel.se', 33 | 'depends': ['crm',], 34 | 'data': [ 35 | 'crm_view.xml', 36 | 'security/ir.model.access.csv', 37 | ], 38 | 'installable': True, 39 | } 40 | 41 | -------------------------------------------------------------------------------- /crm_campaign_product/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign Product', 24 | 'version': '0.2', 25 | 'category': 'crm', 26 | 'description': """ 27 | Extends Crm Campaign with products 28 | 29 | """, 30 | 'author': 'Vertel AB', 31 | 'license': 'AGPL-3', 32 | 'website': 'http://www.vertel.se', 33 | 'depends': ['crm_campaign_addons','stock'], 34 | 'data': [ 35 | 'product_view.xml', 36 | 'security/ir.model.access.csv', 37 | 38 | ], 39 | 'installable': True, 40 | } 41 | 42 | -------------------------------------------------------------------------------- /crm_campaign_phase/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign Phase', 24 | 'version': '0.1', 25 | 'category': 'crm', 26 | 'description': """ 27 | Extends Crm Campaign with phases 28 | 29 | """, 30 | 'author': 'Vertel AB', 31 | 'license': 'AGPL-3', 32 | 'website': 'http://www.vertel.se', 33 | 'depends': ['website_crm_campaign','product_private'], 34 | 'sequence': 50, 35 | 'data': [ 36 | 'crm_view.xml', 37 | 'security/ir.model.access.csv', 38 | 39 | ], 40 | 'installable': True, 41 | } 42 | 43 | -------------------------------------------------------------------------------- /crm_campaign_phase_default_variant/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'CRM Campaign Phase Default Variant', 24 | 'version': '0.1', 25 | 'category': 'crm', 26 | 'description': """ 27 | Extends Crm Campaign with phases and new calucalatopn of default variant 28 | 29 | """, 30 | 'author': 'Vertel AB', 31 | 'license': 'AGPL-3', 32 | 'website': 'http://www.vertel.se', 33 | 'depends': ['crm_campaign_phase','website_sale_product_variant'], 34 | 'sequence': 50, 35 | 'data': [ 36 | ], 37 | 'installable': True, 38 | } 39 | 40 | -------------------------------------------------------------------------------- /marketing_paolos/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2004-2016 Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'Marketing Paolos', 24 | 'version': '0.1', 25 | 'category': 'marketing', 26 | 'summary': 'Marketing additions for Paolos', 27 | 'licence': 'AGPL-3', 28 | 'description': """ 29 | """, 30 | 'author': 'Vertel AB', 31 | 'website': 'http://www.vertel.se', 32 | 'depends': ['marketing_campaign','sales_cycle'], 33 | 'data': ['marketing_campaign_view.xml'], 34 | 'application': False, 35 | 'installable': True, 36 | 'auto_install': False, 37 | } 38 | # vim:expandtab:smartindent:tabstop=4s:softtabstop=4:shiftwidth=4: 39 | -------------------------------------------------------------------------------- /crm_campaign_phase_default_variant/crm.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | from openerp import models, fields, api, _ 22 | from datetime import datetime, timedelta 23 | import logging 24 | _logger = logging.getLogger(__name__) 25 | 26 | class product_template(models.Model): 27 | _inherit = "product.template" 28 | @api.multi 29 | def get_default_variant(self): 30 | self.ensure_one() 31 | intersect = self.product_variant_ids & self.get_campaign_variants(for_reseller=self.env.user.partner_id.commercial_partner_id.property_product_pricelist.for_reseller) 32 | if len(intersect)>0: 33 | return intersect[0] 34 | else: 35 | return super(product_template,self).get_default_variant() 36 | -------------------------------------------------------------------------------- /website_crm_campaign/__openerp__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | 22 | { 23 | 'name': 'Sale Campaign', 24 | 'version': '0.1', 25 | 'category': 'crm', 26 | 'description': """ 27 | Different pricelists on campaign 28 | ================================ 29 | * Hook product.template with crm.tracking.campaign 30 | * Start and stop date on a campaign 31 | * Show current campaign as first page on website 32 | 33 | crm_campaign 34 | crm.tracking.campaign 35 | crm.tracking.campaign.object (title,description,image) 36 | start/stop-date 37 | pricelists 38 | campaign_objects 39 | get_campaign_objs 40 | crm_campaign_product 41 | get_campaign_products 42 | crm_campaign_blog 43 | website_crm_campaign 44 | 45 | """, 46 | 'author': 'Vertel AB', 47 | 'license': 'AGPL-3', 48 | 'website': 'http://www.vertel.se', 49 | 'depends': ['website_sale', 'sale_crm', 'crm_campaign_product'], 50 | 'data': [ 51 | 'campaign_view.xml', 52 | ], 53 | 'installable': True, 54 | } 55 | 56 | -------------------------------------------------------------------------------- /crm_campaign_blog/blog.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | from openerp import models, fields, api, _ 22 | import re 23 | import logging 24 | _logger = logging.getLogger(__name__) 25 | 26 | 27 | class crm_campaign_object(models.Model): 28 | _inherit = 'crm.campaign.object' 29 | 30 | object_id = fields.Reference(selection_add=[('blog.post', 'BLog Post')]) 31 | @api.one 32 | @api.onchange('object_id') 33 | def get_object_value(self): 34 | if self.object_id: 35 | if self.object_id._name == 'blog.post': 36 | self.res_id = self.object_id.id 37 | self.name = self.object_id.name 38 | self.description = self.object_id.subtitle 39 | try: 40 | self.image = self.env['ir.attachment'].browse(int(re.search('ir.attachment/(.+?)_', self.object_id.background_image).group(1))).datas 41 | #~ self.image = self.env['ir.attachment'].search([('res_model', '=', self._name), ('res_id', '=', self.id)]).datas 42 | except AttributeError: 43 | self.image = None 44 | return super(crm_campaign_object, self).get_object_value() 45 | -------------------------------------------------------------------------------- /website_crm_campaign/i18n/sv.po: -------------------------------------------------------------------------------- 1 | # Translation of Odoo Server. 2 | # This file contains the translation of the following modules: 3 | # * website_crm_campaign 4 | # 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: Odoo Server 8.0-20170423\n" 8 | "Report-Msgid-Bugs-To: \n" 9 | "POT-Creation-Date: 2017-04-27 17:46+0000\n" 10 | "PO-Revision-Date: 2017-04-27 19:49+0200\n" 11 | "Last-Translator: <>\n" 12 | "Language-Team: \n" 13 | "MIME-Version: 1.0\n" 14 | "Content-Type: text/plain; charset=UTF-8\n" 15 | "Content-Transfer-Encoding: 8bit\n" 16 | "Plural-Forms: \n" 17 | "Language: sv\n" 18 | "X-Generator: Poedit 2.0.1\n" 19 | 20 | #. module: website_crm_campaign 21 | #: field:crm.tracking.campaign,website_published:0 22 | msgid "Available in the website" 23 | msgstr "Tillgänglig på webbplatsen" 24 | 25 | #. module: website_crm_campaign 26 | #: model:ir.model,name:website_crm_campaign.model_crm_tracking_campaign 27 | msgid "Campaign" 28 | msgstr "Kampanj" 29 | 30 | #. module: website_crm_campaign 31 | #: field:product.public.category,description:0 32 | msgid "Description" 33 | msgstr "Beskrivning" 34 | 35 | #. module: website_crm_campaign 36 | #: view:website:website_sale.products_item 37 | msgid "In stock" 38 | msgstr "I lager" 39 | 40 | #. module: website_crm_campaign 41 | #: field:product.public.category,mobile_icon:0 42 | msgid "Mobile Icon" 43 | msgstr "Mobil ikon" 44 | 45 | #. module: website_crm_campaign 46 | #: view:website:website_sale.products_item 47 | msgid "Not in stock" 48 | msgstr "Ej i lager" 49 | 50 | #. module: website_crm_campaign 51 | #: model:ir.model,name:website_crm_campaign.model_product_public_category 52 | msgid "Public Category" 53 | msgstr "Publik kategori" 54 | 55 | #. module: website_crm_campaign 56 | #: help:product.public.category,mobile_icon:0 57 | msgid "This icon will display on smaller devices" 58 | msgstr "Den här ikonen visas på mindre enheter" 59 | 60 | #. module: website_crm_campaign 61 | #: field:crm.tracking.campaign,website_description:0 62 | msgid "Website Description" 63 | msgstr "Webbplats beskrivning" 64 | 65 | #. module: website_crm_campaign 66 | #: field:crm.tracking.campaign,website_url:0 67 | msgid "Website url" 68 | msgstr "Webbplats url" 69 | -------------------------------------------------------------------------------- /crm_campaign_phase/crm_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | phase_type_form 6 | crm.tracking.phase.type 7 | 8 |
9 | 10 | 11 | 24 |
25 |
26 |
27 | 28 | crm.tracking.campaign.form.inherited.crm_campaign_product 29 | crm.tracking.campaign 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 |
53 | -------------------------------------------------------------------------------- /crm_campaign_supplier/res_partner.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ############################################################################## 3 | # 4 | # OpenERP, Open Source Management Solution, third party addon 5 | # Copyright (C) 2017- Vertel AB (). 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU Affero General Public License as 9 | # published by the Free Software Foundation, either version 3 of the 10 | # License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU Affero General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU Affero General Public License 18 | # along with this program. If not, see . 19 | # 20 | ############################################################################## 21 | from openerp import models, fields, api, _ 22 | import logging 23 | _logger = logging.getLogger(__name__) 24 | 25 | 26 | class crm_campaign_object(models.Model): 27 | _inherit = 'crm.campaign.object' 28 | 29 | object_id = fields.Reference(selection_add=[('res.partner', 'Supplier')]) 30 | @api.one 31 | @api.onchange('object_id') 32 | def get_object_value(self): 33 | if self.object_id and self.object_id._name == 'res.partner': 34 | self.name = self.object_id.name 35 | self.description = self.object_id.comment 36 | self.image = self.object_id.image 37 | return super(crm_campaign_object, self).get_object_value() 38 | 39 | 40 | @api.one 41 | def create_campaign_product(self,campaign): 42 | if self.object_id._name == 'res.partner': 43 | for product in self.env['product.template'].search([('seller_ids.name', '=', self.object_id.id)]): 44 | self.env['crm.campaign.product'].create({ 45 | 'campaign_id': campaign.id, 46 | 'product_id': product.id, 47 | 'sequence': len(campaign.product_ids) + 1, 48 | }) 49 | else: 50 | super(crm_campaign_object, self).create_campaign_product(campaign) 51 | -------------------------------------------------------------------------------- /crm_campaign_product/product_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | product.template.common.form.inherited.crm_campaign_product 7 | product.product 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | crm.tracking.campaign.form.inherited.crm_campaign_product 20 | crm.tracking.campaign 21 | 22 | 23 | 24 | 25 |