Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
62626d86d7 | ||
|
d5e7e5533d | ||
|
4e5893f588 | ||
|
1e32e8defb | ||
|
a6d16036ef | ||
|
0606229cb5 |
4
pad_hedgedoc_connector/__init__.py
Normal file
4
pad_hedgedoc_connector/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
64
pad_hedgedoc_connector/__manifest__.py
Executable file
64
pad_hedgedoc_connector/__manifest__.py
Executable file
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
"name": "Pad Hedgedoc Connector",
|
||||
"category": "Notes",
|
||||
"version": "13.0.1.0.0",
|
||||
"summary": "Connect Odoo to Hedgedoc server",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop/",
|
||||
"installable": True,
|
||||
"application": True,
|
||||
"auto_install": False,
|
||||
"description": """
|
||||
======================
|
||||
Pad Hedgedoc Connector
|
||||
======================
|
||||
This module provides the capacity to link Odoo to a Hedgedoc instance in order to generate and manage Hedgedoc documents
|
||||
|
||||
Installation
|
||||
============
|
||||
Just install pad_hedgedoc_connector, all dependencies will be installed by default.
|
||||
On your Hedgedoc server, the parameter CMD_ALLOW_FREEURL must be set to True
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/elabore-coop/pad-tools/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 <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Stéphan Sainléger <https://github.com/stephansainleger>
|
||||
|
||||
Funders
|
||||
-------
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by ELABORE.
|
||||
|
||||
""",
|
||||
"depends": [
|
||||
"base",
|
||||
"base_setup",
|
||||
],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/res_config_settings_view.xml",
|
||||
"wizard/create_pad.xml",
|
||||
],
|
||||
"qweb": [],
|
||||
}
|
135
pad_hedgedoc_connector/i18n/fr.po
Normal file
135
pad_hedgedoc_connector/i18n/fr.po
Normal file
@@ -0,0 +1,135 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pad_hedgedoc_connector
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-08-10 06:23+0000\n"
|
||||
"PO-Revision-Date: 2022-08-10 06:23+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_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.res_config_settings_view_form_hedgedoc
|
||||
msgid "<span class=\"o_form_label\">Hedgedoc URL</span>"
|
||||
msgstr "<span class=\"o_form_label\">Hedgedoc URL</span>"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.create_hedgedoc_pad_wizard
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model,name:pad_hedgedoc_connector.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Sociétés"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model,name:pad_hedgedoc_connector.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Paramètres de config"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.create_hedgedoc_pad_wizard
|
||||
msgid "Create"
|
||||
msgstr "Créer"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model,name:pad_hedgedoc_connector.model_create_hedgedoc_pad_wizard
|
||||
msgid "Create a Hedgedoc Pad"
|
||||
msgstr "Créer un pad Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__create_uid
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__create_date
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__display_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_company__display_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_config_settings__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.res_config_settings_view_form_hedgedoc
|
||||
msgid "Hedgedoc"
|
||||
msgstr "Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model,name:pad_hedgedoc_connector.model_hedgedoc_pad
|
||||
msgid "Hedgedoc Pad"
|
||||
msgstr "Pad Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_company__hedgedoc_server_url
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_config_settings__hedgedoc_server_url
|
||||
msgid "Hedgedoc Server URL"
|
||||
msgstr "URL du serveur Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.res_config_settings_view_form_hedgedoc
|
||||
msgid "Hedgedoc configuration"
|
||||
msgstr "Configuration Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__id
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__id
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_company__id
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_config_settings__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad____last_update
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_company____last_update
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_res_config_settings____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__write_uid
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Dernière mise à jour par"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__write_date
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière mise à jour le"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: code:addons/pad_hedgedoc_connector/models/hedgedoc_pad.py:0
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_create_hedgedoc_pad_wizard__pad_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__name
|
||||
#, python-format
|
||||
msgid "Title"
|
||||
msgstr "Titre"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: code:addons/pad_hedgedoc_connector/models/hedgedoc_pad.py:0
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_connector.field_hedgedoc_pad__url
|
||||
#, python-format
|
||||
msgid "URL"
|
||||
msgstr "URL"
|
||||
|
||||
#. module: pad_hedgedoc_connector
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_connector.create_hedgedoc_pad_wizard
|
||||
msgid "create a new Hedgedoc pad linked to the current task"
|
||||
msgstr "Créer un nouveau pad Hedgedoc lié à la tâche courrante"
|
5
pad_hedgedoc_connector/models/__init__.py
Normal file
5
pad_hedgedoc_connector/models/__init__.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import res_config_settings
|
||||
from . import company
|
||||
from . import hedgedoc_pad
|
9
pad_hedgedoc_connector/models/company.py
Normal file
9
pad_hedgedoc_connector/models/company.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class Company(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
hedgedoc_server_url = fields.Char(string="Hedgedoc Server URL")
|
11
pad_hedgedoc_connector/models/hedgedoc_pad.py
Normal file
11
pad_hedgedoc_connector/models/hedgedoc_pad.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class HedgedocPad(models.Model):
|
||||
_name = "hedgedoc.pad"
|
||||
_description = "Hedgedoc Pad"
|
||||
|
||||
name = fields.Char(string=_("Title"), required=True,)
|
||||
url = fields.Char(string=_("URL"))
|
14
pad_hedgedoc_connector/models/res_config_settings.py
Normal file
14
pad_hedgedoc_connector/models/res_config_settings.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
hedgedoc_server_url = fields.Char(
|
||||
related="company_id.hedgedoc_server_url",
|
||||
string="Hedgedoc Server URL",
|
||||
readonly=False,
|
||||
)
|
||||
|
2
pad_hedgedoc_connector/security/ir.model.access.csv
Normal file
2
pad_hedgedoc_connector/security/ir.model.access.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_hedgedoc_pad_user,hedgedoc.pad.user,pad_hedgedoc_connector.model_hedgedoc_pad,base.group_user,1,1,1,1
|
|
BIN
pad_hedgedoc_connector/static/description/icon.png
Normal file
BIN
pad_hedgedoc_connector/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
27
pad_hedgedoc_connector/views/res_config_settings_view.xml
Normal file
27
pad_hedgedoc_connector/views/res_config_settings_view.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form_hedgedoc" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.view.form.inherit.hedgedoc</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="99" />
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="hedgedoc" string="Hedgedoc" data-key="pad_hedgedoc_connector">
|
||||
<h2>Hedgedoc configuration</h2>
|
||||
<div class="row mt16 o_settings_container" id="hedgedoc_settings">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="hedgedoc_url">
|
||||
<div class="o_setting_left_pane" />
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Hedgedoc URL</span>
|
||||
<div class="text-muted">
|
||||
<field name="hedgedoc_server_url" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
3
pad_hedgedoc_connector/wizard/__init__.py
Normal file
3
pad_hedgedoc_connector/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import create_pad
|
20
pad_hedgedoc_connector/wizard/create_pad.py
Normal file
20
pad_hedgedoc_connector/wizard/create_pad.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class CreateHedgedocPadWizard(models.TransientModel):
|
||||
_name = "create.hedgedoc.pad.wizard"
|
||||
_description = "Create a Hedgedoc Pad"
|
||||
|
||||
pad_name = fields.Char(string="Title", required=True)
|
||||
|
||||
def _compute_pad_values(self):
|
||||
values = {
|
||||
"name": self.pad_name,
|
||||
"url": self.env.user.company_id.hedgedoc_server_url + "/" + self.pad_name
|
||||
}
|
||||
return values
|
||||
|
||||
def create_hedgedoc_pad(self):
|
||||
return True
|
20
pad_hedgedoc_connector/wizard/create_pad.xml
Normal file
20
pad_hedgedoc_connector/wizard/create_pad.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="create_hedgedoc_pad_wizard" model="ir.ui.view">
|
||||
<field name="name">create.hedgedoc.pad.wizard</field>
|
||||
<field name="model">create.hedgedoc.pad.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="create a new Hedgedoc pad linked to the current task">
|
||||
<group>
|
||||
<field name="pad_name" />
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Create" name="create_hedgedoc_pad" type="object" class="btn-primary" />
|
||||
<button string="Cancel" class="btn-secondary" special="cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
4
pad_hedgedoc_leads/__init__.py
Normal file
4
pad_hedgedoc_leads/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
83
pad_hedgedoc_leads/__manifest__.py
Normal file
83
pad_hedgedoc_leads/__manifest__.py
Normal file
@@ -0,0 +1,83 @@
|
||||
# Copyright 2021 Elabore ()
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Pad Hedgedoc Leads",
|
||||
"version": "13.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
|
||||
<https://github.com/elabore-coop/pad-tools/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 <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Stéphan Sainléger <https://github.com/stephansainleger>
|
||||
|
||||
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": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/crm_lead.xml",
|
||||
"wizard/create_pad.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,
|
||||
}
|
59
pad_hedgedoc_leads/i18n/fr.po
Normal file
59
pad_hedgedoc_leads/i18n/fr.po
Normal file
@@ -0,0 +1,59 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pad_hedgedoc_leads
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-08-10 06:40+0000\n"
|
||||
"PO-Revision-Date: 2022-08-10 06:40+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:9
|
||||
#: 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_case_form_view_oppor_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_case_form_view_oppor_hedgedoc
|
||||
msgid "Current linked pads"
|
||||
msgstr "Pads liés"
|
||||
|
||||
#. 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_case_form_view_oppor_hedgedoc
|
||||
msgid "Hedgedoc pads"
|
||||
msgstr "Pads Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_leads
|
||||
#: model:ir.model,name:pad_hedgedoc_leads.model_crm_lead
|
||||
msgid "Lead/Opportunity"
|
||||
msgstr "Piste/Opportunité"
|
||||
|
4
pad_hedgedoc_leads/models/__init__.py
Normal file
4
pad_hedgedoc_leads/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import crm_lead
|
||||
from . import hedgedoc_pad
|
19
pad_hedgedoc_leads/models/crm_lead.py
Normal file
19
pad_hedgedoc_leads/models/crm_lead.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class Lead(models.Model):
|
||||
_inherit = "crm.lead"
|
||||
|
||||
leads_hedgedoc_pads = fields.One2many("lead.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",
|
||||
"context": {'default_lead_id': self.id},
|
||||
}
|
10
pad_hedgedoc_leads/models/hedgedoc_pad.py
Normal file
10
pad_hedgedoc_leads/models/hedgedoc_pad.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, _
|
||||
|
||||
|
||||
class LeadHedgedocPad(models.Model):
|
||||
_name = "lead.hedgedoc.pad"
|
||||
_inherit = "hedgedoc.pad"
|
||||
|
||||
lead_id = fields.Many2one("crm.lead", string=_("Associated opportunity"), copy=True)
|
2
pad_hedgedoc_leads/security/ir.model.access.csv
Normal file
2
pad_hedgedoc_leads/security/ir.model.access.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_lead_hedgedoc_pad_user,lead.hedgedoc.pad.user,pad_hedgedoc_leads.model_lead_hedgedoc_pad,base.group_user,1,1,1,1
|
|
24
pad_hedgedoc_leads/views/crm_lead.xml
Normal file
24
pad_hedgedoc_leads/views/crm_lead.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="crm_case_form_view_oppor_hedgedoc" model="ir.ui.view">
|
||||
<field name="name">crm.case.form.view.oppor.hedgedoc</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_lead_view_form" />
|
||||
<field name="priority" eval="99" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page name="hedgedoc_pads" string="Hedgedoc pads">
|
||||
<button string="Create a pad" name="create_hedgedoc_pad" type="object"
|
||||
class="oe_stat_button" icon="fa-plus-circle" style="margin: 0px 4px 0px 0px" />
|
||||
<separator string="Current linked pads" />
|
||||
<field name="leads_hedgedoc_pads" nolabel="1" mode="tree">
|
||||
<tree create="0" delete="1">
|
||||
<field name="name" />
|
||||
<field name="url" widget="url" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
3
pad_hedgedoc_leads/wizard/__init__.py
Normal file
3
pad_hedgedoc_leads/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import create_pad
|
19
pad_hedgedoc_leads/wizard/create_pad.py
Normal file
19
pad_hedgedoc_leads/wizard/create_pad.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class CreateHedgedocPadWizard(models.TransientModel):
|
||||
_inherit = "create.hedgedoc.pad.wizard"
|
||||
|
||||
lead_id = fields.Many2one('crm.lead', string='Lead')
|
||||
|
||||
def _compute_pad_values(self):
|
||||
values = super(CreateHedgedocPadWizard, self)._compute_pad_values()
|
||||
values["lead_id"] = self.lead_id.id
|
||||
return values
|
||||
|
||||
def create_hedgedoc_pad(self):
|
||||
values = self._compute_pad_values()
|
||||
self.env["lead.hedgedoc.pad"].create(values)
|
||||
return super(CreateHedgedocPadWizard, self).create_hedgedoc_pad()
|
13
pad_hedgedoc_leads/wizard/create_pad.xml
Normal file
13
pad_hedgedoc_leads/wizard/create_pad.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="create_hedgedoc_pad_wizard_lead_inherit" model="ir.ui.view">
|
||||
<field name="name">create.hedgedoc.pad.wizard.lead.inherit</field>
|
||||
<field name="model">create.hedgedoc.pad.wizard</field>
|
||||
<field name="inherit_id" ref="pad_hedgedoc_connector.create_hedgedoc_pad_wizard" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pad_name']" position="after">
|
||||
<field name="lead_id" invisible="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
4
pad_hedgedoc_tasks/__init__.py
Normal file
4
pad_hedgedoc_tasks/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
83
pad_hedgedoc_tasks/__manifest__.py
Normal file
83
pad_hedgedoc_tasks/__manifest__.py
Normal file
@@ -0,0 +1,83 @@
|
||||
# Copyright 2021 Elabore ()
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Pad Hedgedoc Tasks",
|
||||
"version": "13.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"maintainer": "False",
|
||||
"website": "False",
|
||||
"license": "AGPL-3",
|
||||
"category": "False",
|
||||
"summary": "Add hedgedoc pad to Project tasks",
|
||||
"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 Tasks
|
||||
===============
|
||||
Add hedgedoc pad to Project tasks
|
||||
|
||||
Installation
|
||||
============
|
||||
Just install Pad Hedgedoc Tasks, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/elabore-coop/pad-tools/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 <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Stéphan Sainléger <https://github.com/stephansainleger>
|
||||
|
||||
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",
|
||||
"project",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"views/project_task.xml",
|
||||
"wizard/create_pad.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,
|
||||
}
|
79
pad_hedgedoc_tasks/i18n/fr.po
Normal file
79
pad_hedgedoc_tasks/i18n/fr.po
Normal file
@@ -0,0 +1,79 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * pad_hedgedoc_tasks
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-08-10 06:26+0000\n"
|
||||
"PO-Revision-Date: 2022-08-10 06:26+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_tasks
|
||||
#: code:addons/pad_hedgedoc_tasks/models/hedgedoc_pad.py:0
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_hedgedoc_pad__task_id
|
||||
#, python-format
|
||||
msgid "Associated task"
|
||||
msgstr "Tâche associée"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model,name:pad_hedgedoc_tasks.model_create_hedgedoc_pad_wizard
|
||||
msgid "Create a Hedgedoc Pad"
|
||||
msgstr "Créer un pad Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_tasks.view_task_form2_hedgedoc
|
||||
msgid "Create a pad"
|
||||
msgstr "Créer un pad"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_tasks.view_task_form2_hedgedoc
|
||||
msgid "Current linked pads"
|
||||
msgstr "Pads liés"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_create_hedgedoc_pad_wizard__display_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_hedgedoc_pad__display_name
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_project_task__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model,name:pad_hedgedoc_tasks.model_hedgedoc_pad
|
||||
msgid "Hedgedoc Pad"
|
||||
msgstr "Pad Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_project_task__hedgedoc_pads
|
||||
msgid "Hedgedoc Pads"
|
||||
msgstr "Pads Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model_terms:ir.ui.view,arch_db:pad_hedgedoc_tasks.view_task_form2_hedgedoc
|
||||
msgid "Hedgedoc pads"
|
||||
msgstr "Pads Hedgedoc"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_create_hedgedoc_pad_wizard__id
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_hedgedoc_pad__id
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_project_task__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_create_hedgedoc_pad_wizard____last_update
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_hedgedoc_pad____last_update
|
||||
#: model:ir.model.fields,field_description:pad_hedgedoc_tasks.field_project_task____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: pad_hedgedoc_tasks
|
||||
#: model:ir.model,name:pad_hedgedoc_tasks.model_project_task
|
||||
msgid "Task"
|
||||
msgstr "Tâche"
|
4
pad_hedgedoc_tasks/models/__init__.py
Normal file
4
pad_hedgedoc_tasks/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import project_task
|
||||
from . import hedgedoc_pad
|
10
pad_hedgedoc_tasks/models/hedgedoc_pad.py
Normal file
10
pad_hedgedoc_tasks/models/hedgedoc_pad.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, _
|
||||
|
||||
|
||||
class TaskHedgedocPad(models.Model):
|
||||
_name = "task.hedgedoc.pad"
|
||||
_inherit = "hedgedoc.pad"
|
||||
|
||||
task_id = fields.Many2one("project.task", string=_("Associated task"), copy=True)
|
19
pad_hedgedoc_tasks/models/project_task.py
Normal file
19
pad_hedgedoc_tasks/models/project_task.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class Task(models.Model):
|
||||
_inherit = "project.task"
|
||||
|
||||
task_hedgedoc_pads = fields.One2many("task.hedgedoc.pad", "task_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",
|
||||
"context": {'default_task_id': self.id},
|
||||
}
|
2
pad_hedgedoc_tasks/security/ir.model.access.csv
Normal file
2
pad_hedgedoc_tasks/security/ir.model.access.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_task_hedgedoc_pad_user,task.hedgedoc.pad.user,pad_hedgedoc_tasks.model_task_hedgedoc_pad,base.group_user,1,1,1,1
|
|
23
pad_hedgedoc_tasks/views/project_task.xml
Normal file
23
pad_hedgedoc_tasks/views/project_task.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_task_form2_hedgedoc" model="ir.ui.view">
|
||||
<field name="name">project.task.form.hedgedoc</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="inherit_id" ref="project.view_task_form2" />
|
||||
<field name="priority" eval="99" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page name="hedgedoc_pads" string="Hedgedoc pads">
|
||||
<button string="Create a pad" name="create_hedgedoc_pad" type="object" class="oe_stat_button" icon="fa-plus-circle" style="margin: 0px 4px 0px 0px" />
|
||||
<separator string="Current linked pads" />
|
||||
<field name="task_hedgedoc_pads" nolabel="1" mode="tree">
|
||||
<tree create="0" delete="1">
|
||||
<field name="name" />
|
||||
<field name="url" widget="url" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
3
pad_hedgedoc_tasks/wizard/__init__.py
Normal file
3
pad_hedgedoc_tasks/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import create_pad
|
19
pad_hedgedoc_tasks/wizard/create_pad.py
Normal file
19
pad_hedgedoc_tasks/wizard/create_pad.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class CreateHedgedocPadWizard(models.TransientModel):
|
||||
_inherit = "create.hedgedoc.pad.wizard"
|
||||
|
||||
task_id = fields.Many2one('project.task', string='Task')
|
||||
|
||||
def _compute_pad_values(self):
|
||||
values = super(CreateHedgedocPadWizard, self)._compute_pad_values()
|
||||
values["task_id"] = self.task_id.id
|
||||
return values
|
||||
|
||||
def create_hedgedoc_pad(self):
|
||||
values = self._compute_pad_values()
|
||||
self.env["task.hedgedoc.pad"].create(values)
|
||||
return super(CreateHedgedocPadWizard, self).create_hedgedoc_pad()
|
13
pad_hedgedoc_tasks/wizard/create_pad.xml
Normal file
13
pad_hedgedoc_tasks/wizard/create_pad.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="create_hedgedoc_pad_wizard_task_inherit" model="ir.ui.view">
|
||||
<field name="name">create.hedgedoc.pad.wizard.task.inherit</field>
|
||||
<field name="model">create.hedgedoc.pad.wizard</field>
|
||||
<field name="inherit_id" ref="pad_hedgedoc_connector.create_hedgedoc_pad_wizard" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='pad_name']" position="after">
|
||||
<field name="task_id" invisible="1" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
Reference in New Issue
Block a user