Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0] [MIG] fieldservice_stage_server_action #604

Merged
merged 14 commits into from
Nov 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions fieldservice_stage_server_action/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
=======================
FSM Stage Server Action
=======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
:target: https://github.com/OCA/field-service/tree/12.0/fieldservice_stage_server_action
:alt: OCA/field-service
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/field-service-12-0/field-service-12-0-fieldservice_stage_server_action
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/264/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to execute server actions when a FSM orders enters a
specific stage.

**Table of contents**

.. contents::
:local:

Configuration
=============

* Go to Field Service > Configuration > Stages
* Create or select a stage
* Select or create a server action

Usage
=====

* Go to Field Service
* Select or create a FSM orders
* Move it to the stage configured before to trigger the execution of the
server action

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/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 <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stage_server_action%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Open Source Integrators

Contributors
~~~~~~~~~~~~

* Open Source Integrators <https://www.opensourceintegrators.com>

* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Steve Campbell <scampbell@opensourceintegrators.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-wolfhall| image:: https://github.com/wolfhall.png?size=40px
:target: https://github.com/wolfhall
:alt: wolfhall
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
.. |maintainer-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px
:target: https://github.com/osi-scampbell
:alt: osi-scampbell

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-wolfhall| |maintainer-max3903| |maintainer-osi-scampbell|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/12.0/fieldservice_stage_server_action>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions fieldservice_stage_server_action/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
21 changes: 21 additions & 0 deletions fieldservice_stage_server_action/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2019, Open Source Integrators
# # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "FSM Stage Server Action",
"summary": "Execute server actions when reaching a Field Service stage",
"version": "13.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/ursais/osi-addons",
"depends": ["fieldservice", "base_automation"],
"data": [
"data/ir_server_action.xml",
"data/fsm_stage.xml",
"data/base_automation.xml",
"views/fsm_stage.xml",
],
"installable": True,
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["wolfhall", "max3903", "osi-scampbell"],
}
16 changes: 16 additions & 0 deletions fieldservice_stage_server_action/data/base_automation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<odoo>
<record id="fsm_order_email_sender" model="base.automation">
<field name="name">FSM Order Email Sender</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="trigger">on_create_or_write</field>
<field name="active" eval="True" />
<field name="state">multi</field>
<field
name="child_ids"
eval="[(6, 0, [
ref('fsm_order_parent_completed'),
ref('fsm_order_parent_canceled')])
]"
/>
</record>
</odoo>
8 changes: 8 additions & 0 deletions fieldservice_stage_server_action/data/fsm_stage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<odoo>
<record id="fieldservice.fsm_stage_completed" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_completed" />
</record>
<record id="fieldservice.fsm_stage_cancelled" model="fsm.stage">
<field name="action_id" ref="fsm_order_parent_canceled" />
</record>
</odoo>
12 changes: 12 additions & 0 deletions fieldservice_stage_server_action/data/ir_server_action.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<odoo>
<record id="fsm_order_parent_completed" model="ir.actions.server">
<field name="name">FSM Order Completed Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="state">multi</field>
</record>
<record id="fsm_order_parent_canceled" model="ir.actions.server">
<field name="name">FSM Order Canceled Parent</field>
<field name="model_id" ref="fieldservice.model_fsm_order" />
<field name="state">multi</field>
</record>
</odoo>
41 changes: 41 additions & 0 deletions fieldservice_stage_server_action/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stage_server_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_canceled
msgid "FSM Order Canceled Parent"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_completed
msgid "FSM Order Completed Parent"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:base.automation,name:fieldservice_stage_server_action.fsm_order_email_sender
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_email_sender_ir_actions_server
msgid "FSM Order Email Sender"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.model,name:fieldservice_stage_server_action.model_fsm_stage
msgid "Field Service Stage"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.model.fields,field_description:fieldservice_stage_server_action.field_fsm_stage__action_id
msgid "Server Action"
msgstr ""
43 changes: 43 additions & 0 deletions fieldservice_stage_server_action/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stage_server_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-12-10 21:04+0000\n"
"Last-Translator: Nelson Ram??rez S??nchez <info@konos.cl>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1\n"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_canceled
msgid "FSM Order Canceled Parent"
msgstr "Pedido FSM cancelado padre"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_completed
msgid "FSM Order Completed Parent"
msgstr "Pedido FSM Padre Completado"

#. module: fieldservice_stage_server_action
#: model:base.automation,name:fieldservice_stage_server_action.fsm_order_email_sender
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_email_sender_ir_actions_server
msgid "FSM Order Email Sender"
msgstr "Remitente de Correo de Pedido FSM"

#. module: fieldservice_stage_server_action
#: model:ir.model,name:fieldservice_stage_server_action.model_fsm_stage
msgid "Field Service Stage"
msgstr "Etapa de Servicio de Campo"

#. module: fieldservice_stage_server_action
#: model:ir.model.fields,field_description:fieldservice_stage_server_action.field_fsm_stage__action_id
msgid "Server Action"
msgstr "Acci??n de Servidor"
43 changes: 43 additions & 0 deletions fieldservice_stage_server_action/i18n/es_CL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stage_server_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-12-10 21:04+0000\n"
"Last-Translator: Nelson Ram??rez S??nchez <info@konos.cl>\n"
"Language-Team: none\n"
"Language: es_CL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.9.1\n"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_canceled
msgid "FSM Order Canceled Parent"
msgstr "Pedido FSM cancelado padre"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_completed
msgid "FSM Order Completed Parent"
msgstr "Pedido FSM Padre Completado"

#. module: fieldservice_stage_server_action
#: model:base.automation,name:fieldservice_stage_server_action.fsm_order_email_sender
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_email_sender_ir_actions_server
msgid "FSM Order Email Sender"
msgstr "Remitente de Correo de Pedido FSM"

#. module: fieldservice_stage_server_action
#: model:ir.model,name:fieldservice_stage_server_action.model_fsm_stage
msgid "Field Service Stage"
msgstr "Etapa de Servicio de Campo"

#. module: fieldservice_stage_server_action
#: model:ir.model.fields,field_description:fieldservice_stage_server_action.field_fsm_stage__action_id
msgid "Server Action"
msgstr "Acci??n de Servidor"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stage_server_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \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: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_canceled
msgid "FSM Order Canceled Parent"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_completed
msgid "FSM Order Completed Parent"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:base.automation,name:fieldservice_stage_server_action.fsm_order_email_sender
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_email_sender_ir_actions_server
msgid "FSM Order Email Sender"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.model,name:fieldservice_stage_server_action.model_fsm_stage
msgid "Field Service Stage"
msgstr ""

#. module: fieldservice_stage_server_action
#: model:ir.model.fields,field_description:fieldservice_stage_server_action.field_fsm_stage__action_id
msgid "Server Action"
msgstr ""

43 changes: 43 additions & 0 deletions fieldservice_stage_server_action/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fieldservice_stage_server_action
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-06-17 16:19+0000\n"
"Last-Translator: Fernando Colus <fcolus1@gmail.com>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_canceled
msgid "FSM Order Canceled Parent"
msgstr "Pai do pedido cancelado"

#. module: fieldservice_stage_server_action
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_parent_completed
msgid "FSM Order Completed Parent"
msgstr "Pai do pedido completado"

#. module: fieldservice_stage_server_action
#: model:base.automation,name:fieldservice_stage_server_action.fsm_order_email_sender
#: model:ir.actions.server,name:fieldservice_stage_server_action.fsm_order_email_sender_ir_actions_server
msgid "FSM Order Email Sender"
msgstr "Remetente do email do pedido"

#. module: fieldservice_stage_server_action
#: model:ir.model,name:fieldservice_stage_server_action.model_fsm_stage
msgid "Field Service Stage"
msgstr "Est??gio de Servi??o de Campo"

#. module: fieldservice_stage_server_action
#: model:ir.model.fields,field_description:fieldservice_stage_server_action.field_fsm_stage__action_id
msgid "Server Action"
msgstr "A????o do Servidor"
4 changes: 4 additions & 0 deletions fieldservice_stage_server_action/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import fsm_stage
Loading