[ADD] Notes to ServPro, add ServPro to Agreement

[IMP] Flake8

[IMP] github changes

[IMP] Placeholder in notes remove <p><br></p>

[UPD] Update agreement_serviceprofile.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-12.0/contract-12.0-agreement_serviceprofile
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_serviceprofile/

[UPD] README.rst
This commit is contained in:
scampbell
2019-06-10 12:33:51 -07:00
committed by Patrick Wilson
parent 71556449a0
commit 7149c46060
10 changed files with 95 additions and 8 deletions

View File

@@ -15,6 +15,7 @@
'data': [
'security/ir.model.access.csv',
'views/agreement_serviceprofile.xml',
'views/agreement.xml'
],
'development_status': 'Beta',
'maintainers': [

View File

@@ -19,6 +19,12 @@ msgid "Active"
msgstr ""
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
msgid "Add Notes Here..."
msgstr ""
#. module: agreement_serviceprofile
#: model:ir.model,name:agreement_serviceprofile.model_agreement
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__agreement_id
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_search
msgid "Agreement"
@@ -74,6 +80,12 @@ msgstr ""
msgid "Name"
msgstr ""
#. module: agreement_serviceprofile
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__notes
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Notes"
msgstr ""
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Service Profile"
@@ -81,7 +93,9 @@ msgstr ""
#. module: agreement_serviceprofile
#: model:ir.actions.act_window,name:agreement_serviceprofile.agreement_serviceprofile_action
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement__serviceprofile_ids
#: model:ir.ui.menu,name:agreement_serviceprofile.agreement_serviceprofiles
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_tree
msgid "Service Profiles"
msgstr ""

View File

@@ -22,6 +22,12 @@ msgid "Active"
msgstr ""
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
msgid "Add Notes Here..."
msgstr ""
#. module: agreement_serviceprofile
#: model:ir.model,name:agreement_serviceprofile.model_agreement
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__agreement_id
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_search
msgid "Agreement"
@@ -79,6 +85,12 @@ msgstr ""
msgid "Name"
msgstr ""
#. module: agreement_serviceprofile
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__notes
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Notes"
msgstr ""
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Service Profile"
@@ -86,7 +98,9 @@ msgstr ""
#. module: agreement_serviceprofile
#: model:ir.actions.act_window,name:agreement_serviceprofile.agreement_serviceprofile_action
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement__serviceprofile_ids
#: model:ir.ui.menu,name:agreement_serviceprofile.agreement_serviceprofiles
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_tree
msgid "Service Profiles"
msgstr ""

View File

@@ -22,6 +22,12 @@ msgid "Active"
msgstr "Actif"
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
msgid "Add Notes Here..."
msgstr ""
#. module: agreement_serviceprofile
#: model:ir.model,name:agreement_serviceprofile.model_agreement
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__agreement_id
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_search
msgid "Agreement"
@@ -54,7 +60,9 @@ msgstr "ID"
#. module: agreement_serviceprofile
#: model:ir.model.fields,help:agreement_serviceprofile.field_agreement_serviceprofile__active
msgid "If unchecked, it will allow you to hide this service profile without removing it."
msgid ""
"If unchecked, it will allow you to hide this service profile without "
"removing it."
msgstr ""
"Si cette case est décochée, cela vous permettra de masquer ce profil de "
"service sans le supprimer."
@@ -79,6 +87,12 @@ msgstr "Dernière mise à jour le"
msgid "Name"
msgstr "Nom"
#. module: agreement_serviceprofile
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement_serviceprofile__notes
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Notes"
msgstr ""
#. module: agreement_serviceprofile
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_form
msgid "Service Profile"
@@ -86,7 +100,9 @@ msgstr "Profil de service"
#. module: agreement_serviceprofile
#: model:ir.actions.act_window,name:agreement_serviceprofile.agreement_serviceprofile_action
#: model:ir.model.fields,field_description:agreement_serviceprofile.field_agreement__serviceprofile_ids
#: model:ir.ui.menu,name:agreement_serviceprofile.agreement_serviceprofiles
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_fsm_order_form_view
#: model_terms:ir.ui.view,arch_db:agreement_serviceprofile.agreement_serviceprofile_tree
msgid "Service Profiles"
msgstr "Profils de service"

View File

@@ -1 +1,2 @@
from . import agreement_serviceprofile
from . import agreement

View File

@@ -0,0 +1,12 @@
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Agreement(models.Model):
_inherit = 'agreement'
serviceprofile_ids = fields.One2many('agreement.serviceprofile',
'agreement_id',
string="Service Profiles")

View File

@@ -12,8 +12,10 @@ class AgreementServiceProfile(models.Model):
name = fields.Char(string="Name", required=True)
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
active = fields.Boolean(
string="Active",
active = fields.Boolean(string="Active",
default=True,
help="If unchecked, it will allow you to hide this service profile"
help="If unchecked, it will allow you " +
"to hide this service profile"
" without removing it.")
notes = fields.Text(string="Notes")

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Agreement Service Profile</title>
<style type="text/css">

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Agreement Form View -->
<record id="agreement_fsm_order_form_view" model="ir.ui.view">
<field name="name">agreement.form.fsm.order.view</field>
<field name="model">agreement</field>
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">
<page name="serviceprofiles" string="Service Profiles">
<field name="serviceprofile_ids">
<tree>
<field name="name"/>
</tree>
<form>
<field name="name"/>
<field name="notes" placeholder="Add Notes Here..."/>
</form>
</field>
</page>
</notebook>
</field>
</record>
</odoo>

View File

@@ -40,6 +40,9 @@
</group>
<group></group>
</group>
<group string="Notes">
<field name="notes" nolabel="1" widget="html"/>
</group>
</sheet>
</form>
</field>