Skip to content

Commit

Permalink
Update from template
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Nov 2, 2023
1 parent 55ed2fc commit f9b203a
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 155 deletions.
14 changes: 6 additions & 8 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.14.2
_commit: v1.17.2
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
github_check_license: true
github_check_license: false
github_ci_extra_env: {}
github_enable_codecov: true
github_enable_makepot: false
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
github_enable_stale_action: false
github_enforce_dev_status_compatibility: false
include_wkhtmltopdf: false
odoo_test_flavor: Both
odoo_version: 14.0
org_name: CreuBlanca
org_slug: tegin
rebel_module_groups: []
repo_description: null
repo_description: TODO
repo_name: CB Maintenance modules
repo_slug: cb-maintenance
repo_website: https://github.com/tegin/cb-maintenance
travis_apt_packages: []
travis_apt_sources: []

1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ globals:
odoo: readonly
openerp: readonly
owl: readonly
luxon: readonly

# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
Expand All @@ -25,6 +27,15 @@ jobs:
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/stale.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest
makepot: "false"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest
name: test with OCB
makepot: "false"
services:
postgres:
image: postgres:9.6
Expand All @@ -33,15 +33,17 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
run: oca_install_addons
- name: Check licenses
run: manifestoo -d . check-licenses
continue-on-error: true
- name: Check development status
run: manifestoo -d . check-dev-status --default-dev-status=Beta
continue-on-error: true
- name: Initialize test db
run: oca_init_test_database
- name: Run tests
Expand Down
16 changes: 15 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exclude: |
/static/(src/)?lib/|
# Repos using Sphinx to generate docs don't need prettying
^docs/_templates/.*\.html$|
# Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
Expand All @@ -33,12 +35,24 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
rev: 969238e47c07d0c40573acff81d170f63245d738
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://github.com/tegin/cb-maintenance"]
- id: oca-gen-addon-readme
args:
- --addons-dir=.
- --branch=14.0
- --org-name=tegin
- --repo-name=cb-maintenance
- --if-source-changed
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25
hooks:
- id: oca-checks-odoo-module
- id: oca-checks-po
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
Expand Down
84 changes: 41 additions & 43 deletions cb_maintenance_report/report/maintenance_request_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
<!-- Copyright 2019 Creu Blanca
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<record
id="base_maintenance.action_report_maintenance_request"
model="ir.actions.report"
>
id="base_maintenance.action_report_maintenance_request"
model="ir.actions.report"
>
<field
name="print_report_name"
>'MaintenanceRequest-%s' % (object.code)</field>
name="print_report_name"
>'MaintenanceRequest-%s' % (object.code)</field>
<field name="name">Print Maintenance Request</field>
<field
name="groups_id"
eval="[(4, ref('maintenance.group_equipment_manager'))]"
/>
name="groups_id"
eval="[(4, ref('maintenance.group_equipment_manager'))]"
/>
</record>
<template id="maintenance_request_template">
<t t-call="web.internal_layout">
Expand All @@ -26,26 +25,26 @@
</h4>
<h3>
<i
class="fa fa-home"
t-if="doc.maintenance_type == 'preventive' and not doc.is_project"
/>
class="fa fa-home"
t-if="doc.maintenance_type == 'preventive' and not doc.is_project"
/>
<i
class="fa fa-tools"
t-if="doc.maintenance_type == 'corrective' and not doc.is_project"
/>
class="fa fa-tools"
t-if="doc.maintenance_type == 'corrective' and not doc.is_project"
/>
<i
class="fa fa-project-diagram"
t-if="doc.is_project"
/>
class="fa fa-project-diagram"
t-if="doc.is_project"
/>
<strong t-field="doc.name" />
</h3>
</div>
<div class="col-2">
<span class="label label-primary pull-right">
<span
style="font-size: 12px;margin-top: 6px"
t-field="doc.stage_id"
/>
style="font-size: 12px;margin-top: 6px"
t-field="doc.stage_id"
/>
</span>
</div>
</div>
Expand All @@ -70,9 +69,9 @@
<br />
<b>Equipment:</b>
<span
t-if="doc.equipment_id"
t-field="doc.equipment_id"
/>
t-if="doc.equipment_id"
t-field="doc.equipment_id"
/>
<br />
<br />
<b>Category:</b>
Expand All @@ -81,9 +80,9 @@
<br />
<b>Maintenance Type:</b>
<span
t-if="doc.maintenance_type"
t-field="doc.maintenance_type"
/>
t-if="doc.maintenance_type"
t-field="doc.maintenance_type"
/>
<br />
<br />
</div>
Expand All @@ -98,9 +97,9 @@
<br />
<b>Technician:</b>
<span
t-if="doc.technician_id"
t-field="doc.technician_id"
/>
t-if="doc.technician_id"
t-field="doc.technician_id"
/>
<br />
<br />
<b>Last Updated on:</b>
Expand Down Expand Up @@ -151,20 +150,20 @@
</td>
<td>
<div t-if="msg.subject"><span
t-field="msg.subject"
/>: </div>
t-field="msg.subject"
/>: </div>
<div t-if="msg.message_type == 'notification'">
<span t-field="msg.subtype_id.name" />
<t
t-foreach='msg.sudo().tracking_value_ids'
t-as='value'
>
t-foreach='msg.sudo().tracking_value_ids'
t-as='value'
>
<li>
<t t-esc="value.field_desc" />:
<span>
<t
t-esc="value.new_value_char"
/>
t-esc="value.new_value_char"
/>
</span>
</li>
</t>
Expand All @@ -179,14 +178,13 @@
</t>
</template>
<template
id="report_maintenance_request"
inherit_id="base_maintenance.report_maintenance_request"
>
id="report_maintenance_request"
inherit_id="base_maintenance.report_maintenance_request"
>
<xpath expr="//t/t/t" position="attributes">
<attribute
name="t-call"
>cb_maintenance_report.maintenance_request_template</attribute>
name="t-call"
>cb_maintenance_report.maintenance_request_template</attribute>
</xpath>
</template>
</data>
</odoo>
Loading

0 comments on commit f9b203a

Please sign in to comment.