[IMP] agreement_serviceprofile: add stage

- Add stage_type to agreement.stage
- Track stage of service profile
- Add Kanban view for service profiles to the dashboard
- Add product_id field to service profile

[UPD] Update agreement_legal.pot

Update translation files

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

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

Added translation using Weblate (Chinese (Simplified))

Translated using Weblate (Chinese (Simplified))

Currently translated at 4.5% (13 of 287 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 39.4% (113 of 287 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 53.0% (152 of 287 strings)

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

Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (287 of 287 strings)

Translation: contract-12.0/contract-12.0-agreement_legal
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal/zh_CN/
This commit is contained in:
brian10048
2019-07-17 22:23:30 -04:00
committed by Patrick Wilson
parent b52b822a3c
commit 4916c1d1d0
9 changed files with 1790 additions and 15 deletions

View File

@@ -4,46 +4,55 @@
<record id="agreement_stage_new" model="agreement.stage">
<field name="name">New</field>
<field name="sequence">10</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_draft" model="agreement.stage">
<field name="name">Draft</field>
<field name="sequence">20</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_reviewed" model="agreement.stage">
<field name="name">Reviewed</field>
<field name="sequence">30</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_negotiation" model="agreement.stage">
<field name="name">Negotiation</field>
<field name="sequence">40</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_out" model="agreement.stage">
<field name="name">Out for Customer Signature</field>
<field name="sequence">50</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_internal" model="agreement.stage">
<field name="name">Waiting Internal Signature</field>
<field name="sequence">60</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_active" model="agreement.stage">
<field name="name">Active</field>
<field name="sequence">70</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_expired" model="agreement.stage">
<field name="name">Expired</field>
<field name="sequence">80</field>
<field name="stage_type">agreement</field>
</record>
<record id="agreement_stage_cancelled" model="agreement.stage">
<field name="name">Cancelled</field>
<field name="sequence">100</field>
<field name="fold">True</field>
<field name="stage_type">agreement</field>
</record>
</odoo>

View File

@@ -77,6 +77,7 @@ msgid "Advanced Features"
msgstr ""
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
#: model:ir.model,name:agreement_legal.model_agreement
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_appendix__agreement_id
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_clause__agreement_id
@@ -930,8 +931,8 @@ msgstr ""
#. module: agreement_legal
#: code:addons/agreement_legal/models/agreement.py:84
#: code:addons/agreement_legal/models/agreement.py:364
#: code:addons/agreement_legal/models/agreement.py:367
#: code:addons/agreement_legal/models/agreement.py:365
#: code:addons/agreement_legal/models/agreement.py:368
#, python-format
msgid "New"
msgstr ""
@@ -1338,6 +1339,11 @@ msgstr ""
msgid "Sequence"
msgstr ""
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
msgid "Service Profile"
msgstr ""
#. module: agreement_legal
#: model:ir.actions.act_window,name:agreement_legal.action_agreement_config
#: model:ir.ui.menu,name:agreement_legal.agreement_settings
@@ -1539,7 +1545,7 @@ msgstr ""
#. module: agreement_legal
#: model:ir.model.fields,help:agreement_legal.field_agreement_stage__fold
msgid "This stage is folded in the kanban view by deafault."
msgid "This stage is folded in the kanban view by default."
msgstr ""
#. module: agreement_legal
@@ -1558,6 +1564,11 @@ msgstr ""
msgid "Title:"
msgstr ""
#. module: agreement_legal
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_stage__stage_type
msgid "Type"
msgstr ""
#. module: agreement_legal
#: model_terms:ir.ui.view,arch_db:agreement_legal.partner_agreement_type_list_view
msgid "Type Name"

View File

@@ -81,6 +81,7 @@ msgid "Advanced Features"
msgstr "Fonctionnalités avancées"
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
#: model:ir.model,name:agreement_legal.model_agreement
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_appendix__agreement_id
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_clause__agreement_id
@@ -966,8 +967,8 @@ msgstr "Nom :"
#. module: agreement_legal
#: code:addons/agreement_legal/models/agreement.py:84
#: code:addons/agreement_legal/models/agreement.py:364
#: code:addons/agreement_legal/models/agreement.py:367
#: code:addons/agreement_legal/models/agreement.py:365
#: code:addons/agreement_legal/models/agreement.py:368
#, python-format
msgid "New"
msgstr "Nouveau"
@@ -1392,6 +1393,11 @@ msgstr "Acheter et vendre dans des unités de mesure différentes"
msgid "Sequence"
msgstr "Séquence"
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
msgid "Service Profile"
msgstr "Profil de service"
#. module: agreement_legal
#: model:ir.actions.act_window,name:agreement_legal.action_agreement_config
#: model:ir.ui.menu,name:agreement_legal.agreement_settings
@@ -1625,7 +1631,9 @@ msgstr ""
#. module: agreement_legal
#: model:ir.model.fields,help:agreement_legal.field_agreement_stage__fold
msgid "This stage is folded in the kanban view by deafault."
#, fuzzy
#| msgid "This stage is folded in the kanban view by deafault."
msgid "This stage is folded in the kanban view by default."
msgstr "Cette étape est repliée dans la vue kanban par défaut."
#. module: agreement_legal
@@ -1644,6 +1652,13 @@ msgstr "Titre"
msgid "Title:"
msgstr "Titre :"
#. module: agreement_legal
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_stage__stage_type
#, fuzzy
#| msgid "Types"
msgid "Type"
msgstr "Types"
#. module: agreement_legal
#: model_terms:ir.ui.view,arch_db:agreement_legal.partner_agreement_type_list_view
msgid "Type Name"
@@ -1959,9 +1974,6 @@ msgstr "| Créé le :"
#~ msgid "Service Order Lines"
#~ msgstr "Lignes de commande de service"
#~ msgid "Service Profile"
#~ msgstr "Profil de service"
#~ msgid "Service Profiles"
#~ msgstr "Profils de service"

View File

@@ -80,6 +80,7 @@ msgid "Advanced Features"
msgstr "Propriedades avançadas"
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
#: model:ir.model,name:agreement_legal.model_agreement
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_appendix__agreement_id
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_clause__agreement_id
@@ -945,8 +946,8 @@ msgstr ""
#. module: agreement_legal
#: code:addons/agreement_legal/models/agreement.py:84
#: code:addons/agreement_legal/models/agreement.py:364
#: code:addons/agreement_legal/models/agreement.py:367
#: code:addons/agreement_legal/models/agreement.py:365
#: code:addons/agreement_legal/models/agreement.py:368
#, python-format
msgid "New"
msgstr ""
@@ -1356,6 +1357,11 @@ msgstr ""
msgid "Sequence"
msgstr ""
#. module: agreement_legal
#: selection:agreement.stage,stage_type:0
msgid "Service Profile"
msgstr ""
#. module: agreement_legal
#: model:ir.actions.act_window,name:agreement_legal.action_agreement_config
#: model:ir.ui.menu,name:agreement_legal.agreement_settings
@@ -1570,7 +1576,7 @@ msgstr ""
#. module: agreement_legal
#: model:ir.model.fields,help:agreement_legal.field_agreement_stage__fold
msgid "This stage is folded in the kanban view by deafault."
msgid "This stage is folded in the kanban view by default."
msgstr ""
#. module: agreement_legal
@@ -1589,6 +1595,11 @@ msgstr ""
msgid "Title:"
msgstr ""
#. module: agreement_legal
#: model:ir.model.fields,field_description:agreement_legal.field_agreement_stage__stage_type
msgid "Type"
msgstr ""
#. module: agreement_legal
#: model_terms:ir.ui.view,arch_db:agreement_legal.partner_agreement_type_list_view
msgid "Type Name"

File diff suppressed because it is too large Load Diff

View File

@@ -329,7 +329,8 @@ class Agreement(models.Model):
# Used for Kanban grouped_by view
@api.model
def _read_group_stage_ids(self, stages, domain, order):
stage_ids = self.env["agreement.stage"].search([])
stage_ids = self.env["agreement.stage"].search(
[('stage_type', '=', 'agreement')])
return stage_ids
stage_id = fields.Many2one(

View File

@@ -24,5 +24,8 @@ class AgreementStage(models.Model):
fold = fields.Boolean(
string="Is Folded",
required=False,
help="This stage is folded in the kanban view by deafault.",
help="This stage is folded in the kanban view by default.",
)
stage_type = fields.Selection(
[('agreement', 'Agreement')],
string='Type', required=True)

View File

@@ -28,7 +28,7 @@
<header>
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}" domain="[('stage_type', '=', 'agreement')]"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">

View File

@@ -9,6 +9,7 @@
<tree default_order='sequence, name'>
<field name="sequence" widget="handle"/>
<field name="name" string="Stage Name"/>
<field name="stage_type"/>
</tree>
</field>
</record>
@@ -26,6 +27,7 @@
</div>
<group>
<field name="sequence"/>
<field name="stage_type"/>
<field name="fold"/>
</group>
</sheet>