diff --git a/pad_hedgedoc_leads/__init__.py b/pad_hedgedoc_leads/__init__.py new file mode 100644 index 0000000..3616b30 --- /dev/null +++ b/pad_hedgedoc_leads/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import models +from . import wizard \ No newline at end of file diff --git a/pad_hedgedoc_leads/__manifest__.py b/pad_hedgedoc_leads/__manifest__.py new file mode 100644 index 0000000..cb56606 --- /dev/null +++ b/pad_hedgedoc_leads/__manifest__.py @@ -0,0 +1,79 @@ +# Copyright 2021 Elabore () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Pad Hedgedoc Leads", + "version": "14.0.1.0.0", + "author": "Elabore", + "maintainer": "False", + "website": "False", + "license": "AGPL-3", + "category": "False", + "summary": "Add hedgedoc pad to CRM leads", + "description": """ + :image: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +================== +Pad Hedgedoc Leads +================== +Add hedgedoc pad to CRM leads + +Installation +============ +Just install Pad Hedgedoc Leads, all dependencies will be installed by default. + +Known issues / Roadmap +====================== + +Bug Tracker +=========== +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ +* Elabore: `Icon `_. + +Contributors +------------ +* Stéphan Sainléger + +Funders +------- +The development of this module has been financially supported by: +* Elabore (https://elabore.coop) + + +Maintainer +---------- +This module is maintained by ELABORE. + +""", + # any module necessary for this one to work correctly + "depends": [ + "base", + "pad_hedgedoc_connector", + "crm", + ], + "external_dependencies": { + "python": [], + }, + # always loaded + "data": ["views/crm_lead.xml"], + # only loaded in demonstration mode + "demo": [], + "js": [], + "css": [], + "qweb": [], + "installable": True, + # Install this module automatically if all dependency have been previously + # and independently installed. Used for synergetic or glue modules. + "auto_install": False, + "application": False, +} diff --git a/pad_hedgedoc_leads/i18n/fr.po b/pad_hedgedoc_leads/i18n/fr.po new file mode 100644 index 0000000..be94d82 --- /dev/null +++ b/pad_hedgedoc_leads/i18n/fr.po @@ -0,0 +1,79 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * pad_hedgedoc_leads +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-08-10 06:29+0000\n" +"PO-Revision-Date: 2022-08-10 06:29+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: pad_hedgedoc_leads +#: code:addons/pad_hedgedoc_leads/models/hedgedoc_pad.py:0 +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_hedgedoc_pad__lead_id +#, python-format +msgid "Associated opportunity" +msgstr "Opportunité associée" + +#. module: pad_hedgedoc_leads +#: model:ir.model,name:pad_hedgedoc_leads.model_create_hedgedoc_pad_wizard +msgid "Create a Hedgedoc Pad" +msgstr "Créer un pad Hedgedoc" + +#. module: pad_hedgedoc_leads +#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_leads.crm_lead_view_form_hedgedoc +msgid "Create a pad" +msgstr "Créer un pad" + +#. module: pad_hedgedoc_leads +#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_leads.crm_lead_view_form_hedgedoc +msgid "Current linked pads" +msgstr "Pads liés" + +#. module: pad_hedgedoc_leads +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_create_hedgedoc_pad_wizard__display_name +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_crm_lead__display_name +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_hedgedoc_pad__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: pad_hedgedoc_leads +#: model:ir.model,name:pad_hedgedoc_leads.model_hedgedoc_pad +msgid "Hedgedoc Pad" +msgstr "Pad Hedgedoc" + +#. module: pad_hedgedoc_leads +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_crm_lead__hedgedoc_pads +msgid "Hedgedoc Pads" +msgstr "Pads Hedgedoc" + +#. module: pad_hedgedoc_leads +#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_leads.crm_lead_view_form_hedgedoc +msgid "Hedgedoc pads" +msgstr "Pads Hedgedoc" + +#. module: pad_hedgedoc_leads +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_create_hedgedoc_pad_wizard__id +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_crm_lead__id +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_hedgedoc_pad__id +msgid "ID" +msgstr "ID" + +#. module: pad_hedgedoc_leads +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_create_hedgedoc_pad_wizard____last_update +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_crm_lead____last_update +#: model:ir.model.fields,field_description:pad_hedgedoc_leads.field_hedgedoc_pad____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: pad_hedgedoc_leads +#: model:ir.model,name:pad_hedgedoc_leads.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Piste/opportunité" diff --git a/pad_hedgedoc_leads/models/__init__.py b/pad_hedgedoc_leads/models/__init__.py new file mode 100644 index 0000000..cacf6c3 --- /dev/null +++ b/pad_hedgedoc_leads/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import crm_lead +from . import hedgedoc_pad diff --git a/pad_hedgedoc_leads/models/crm_lead.py b/pad_hedgedoc_leads/models/crm_lead.py new file mode 100644 index 0000000..a934ad4 --- /dev/null +++ b/pad_hedgedoc_leads/models/crm_lead.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields + + +class Lead(models.Model): + _inherit = "crm.lead" + + hedgedoc_pads = fields.One2many("hedgedoc.pad", "lead_id") + + def create_hedgedoc_pad(self): + return { + "name": "Create a Hedgedoc pad", + "type": "ir.actions.act_window", + "view_mode": "form", + "res_model": "create.hedgedoc.pad.wizard", + "target": "new", + } \ No newline at end of file diff --git a/pad_hedgedoc_leads/models/hedgedoc_pad.py b/pad_hedgedoc_leads/models/hedgedoc_pad.py new file mode 100644 index 0000000..0d2f956 --- /dev/null +++ b/pad_hedgedoc_leads/models/hedgedoc_pad.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from odoo import models, fields, _ + + +class HedgedocPad(models.Model): + _inherit = "hedgedoc.pad" + + lead_id = fields.Many2one("crm.lead", string=_("Associated opportunity"), copy=True) diff --git a/pad_hedgedoc_leads/views/crm_lead.xml b/pad_hedgedoc_leads/views/crm_lead.xml new file mode 100644 index 0000000..937f158 --- /dev/null +++ b/pad_hedgedoc_leads/views/crm_lead.xml @@ -0,0 +1,23 @@ + + + + crm.lead.view.form.hedgedoc + crm.lead + + + + + +