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

Syncing from upstream OCA/field-service (17.0) #786

Merged
merged 3 commits into from
Nov 27, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ addon | version | maintainers | summary
[fieldservice_sale_stock](fieldservice_sale_stock/) | 17.0.1.0.0 | [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) | Sell stockable items linked to field service orders.
[fieldservice_size](fieldservice_size/) | 17.0.1.0.0 | [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) | Manage Sizes for Field Service Locations and Orders
[fieldservice_stage_server_action](fieldservice_stage_server_action/) | 17.0.1.3.0 | [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) [![osi-scampbell](https://github.com/osi-scampbell.png?size=30px)](https://github.com/osi-scampbell) | Execute server actions when reaching a Field Service stage
[fieldservice_stage_validation](fieldservice_stage_validation/) | 17.0.1.0.0 | [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | Validate input data when reaching a Field Service stage
[fieldservice_stage_validation](fieldservice_stage_validation/) | 17.0.1.1.0 | [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | Validate input data when reaching a Field Service stage
[fieldservice_stock](fieldservice_stock/) | 17.0.1.0.0 | [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) [![smangukiya](https://github.com/smangukiya.png?size=30px)](https://github.com/smangukiya) | Integrate the logistics operations with Field Service
[fieldservice_stock_request](fieldservice_stock_request/) | 17.0.1.0.0 | [![brian10048](https://github.com/brian10048.png?size=30px)](https://github.com/brian10048) [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) [![smangukiya](https://github.com/smangukiya.png?size=30px)](https://github.com/smangukiya) | Integrate Stock Requests with Field Service Orders
[fieldservice_vehicle](fieldservice_vehicle/) | 17.0.1.0.0 | [![wolfhall](https://github.com/wolfhall.png?size=30px)](https://github.com/wolfhall) [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | Manage Field Service vehicles and assign drivers
Expand Down
20 changes: 10 additions & 10 deletions fieldservice_stage_validation/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FSM Stage Validation
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1ced40d5e26a6495ac55732e9d6ba749aa76729869fa24363ba8b7d8ccaa03b1
!! source digest: sha256:7fa9a31f4e7c1c88e82c034446dde98d5561190967fd4b8274010856ad8fcc46
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -47,16 +47,16 @@ is available to be applied to each document type.
Configuration
=============

- Go to Field Service > Configuration > Stages
- Create or select a stage
- Select one or more fields to be validated
- Go to Field Service > Configuration > Stages
- Create or select a stage
- Select one or more fields to be validated

Usage
=====

- Follow steps outlined in Configuration.
- User will receive validation error if a field is not set when
attempting to move to a new stage.
- Follow steps outlined in Configuration.
- User will receive validation error if a field is not set when
attempting to move to a new stage.

Known issues / Roadmap
======================
Expand Down Expand Up @@ -85,10 +85,10 @@ Authors
Contributors
------------

- Brian McMaster <[email protected]>
- `APSL <https://apsl.tech>`__:
- Brian McMaster <[email protected]>
- `APSL <https://apsl.tech>`__:

- Antoni Marroig <[email protected]>
- Antoni Marroig <[email protected]>

Maintainers
-----------
Expand Down
7 changes: 5 additions & 2 deletions fieldservice_stage_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
{
"name": "FSM Stage Validation",
"summary": "Validate input data when reaching a Field Service stage",
"version": "17.0.1.0.0",
"version": "17.0.1.1.0",
"category": "Field Service",
"author": "Brian McMaster, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": ["fieldservice"],
"data": ["views/fsm_stage.xml"],
"data": [
"security/ir.model.access.csv",
"views/fsm_stage.xml",
],
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["brian10048", "max3903"],
Expand Down
1 change: 0 additions & 1 deletion fieldservice_stage_validation/models/fsm_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class FSMStage(models.Model):
string="Fields to Validate",
help="Select fields which must be set on the document in this stage",
)

stage_type_model_id = fields.Many2one(
"ir.model",
compute="_compute_stage_model",
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_stage_validation/models/validate_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def validate_stage_fields(records):
for rec in records:
stage = rec.stage_id
field_ids = stage.validate_field_ids
field_ids = stage.sudo().validate_field_ids
field_names = [x.name for x in field_ids]
values = rec.read(field_names)

Expand Down
2 changes: 2 additions & 0 deletions fieldservice_stage_validation/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_model_field,ir_model_fields fsm,base.model_ir_model_fields,fieldservice.group_fsm_user_own,1,0,0,0
13 changes: 8 additions & 5 deletions fieldservice_stage_validation/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -274,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">FSM Stage Validation</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1ced40d5e26a6495ac55732e9d6ba749aa76729869fa24363ba8b7d8ccaa03b1
!! source digest: sha256:7fa9a31f4e7c1c88e82c034446dde98d5561190967fd4b8274010856ad8fcc46
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/17.0/fieldservice_stage_validation"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_stage_validation"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/field-service&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>As the stage of a field service document progresses, it may be important
Expand Down Expand Up @@ -442,7 +443,9 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
Loading