Skip to content

Commit 507653d

Browse files
committed
[FIX] tracking mail template
1 parent 50a7858 commit 507653d

File tree

8 files changed

+52
-47
lines changed

8 files changed

+52
-47
lines changed

hr_expense_substate/README.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
Expense Report Sub State
33
========================
44

5-
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
67
!! This file is generated by oca-gen-addon-readme !!
78
!! changes will be overwritten. !!
89
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:3a6399e3cc32fd585364d03e868abca9577218a017d7ccaf63675086dec82a30
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
912
1013
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1114
:target: https://odoo-community.org/page/development-status
@@ -14,18 +17,18 @@ Expense Report Sub State
1417
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1518
:alt: License: AGPL-3
1619
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github
17-
:target: https://github.com/OCA/hr-expense/tree/14.0/hr_expense_substate
20+
:target: https://github.com/OCA/hr-expense/tree/15.0/hr_expense_substate
1821
:alt: OCA/hr-expense
1922
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/hr-expense-14-0/hr-expense-14-0-hr_expense_substate
23+
:target: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_substate
2124
:alt: Translate me on Weblate
22-
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/289/14.0
24-
:alt: Try me on Runbot
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-expense&target_branch=15.0
27+
:alt: Try me on Runboat
2528

26-
|badge1| |badge2| |badge3| |badge4| |badge5|
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
2730

28-
This module allows to add a substate to expense report.
31+
This module allows to add a substate to an expense report.
2932
For each expense report state you can define a substate.
3033
We this module you can define substate which allow you to extend expense report workflow.
3134
For example, you can add substate "To Verify" if
@@ -51,8 +54,8 @@ Bug Tracker
5154

5255
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-expense/issues>`_.
5356
In case of trouble, please check there if your issue has already been reported.
54-
If you spotted it first, help us smashing it by providing a detailed and welcomed
55-
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_substate%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
57+
If you spotted it first, help us to smash it by providing a detailed and welcomed
58+
`feedback <https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_substate%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5659

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

@@ -82,6 +85,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8285
mission is to support the collaborative development of Odoo features and
8386
promote its widespread use.
8487

85-
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/14.0/hr_expense_substate>`_ project on GitHub.
88+
This module is part of the `OCA/hr-expense <https://github.com/OCA/hr-expense/tree/15.0/hr_expense_substate>`_ project on GitHub.
8689

8790
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

hr_expense_substate/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Expense Report Sub State",
66
"version": "15.0.1.0.0",
7-
"category": "Tools",
7+
"category": "Human Resources",
88
"author": "Ecosoft,Odoo Community Association (OCA)",
99
"website": "https://github.com/OCA/hr-expense",
1010
"license": "AGPL-3",

hr_expense_substate/data/hr_expense_substate_mail_template_data.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
<record id="mail_template_data_hr_expense_substate_verified" model="mail.template">
44
<field name="name">Verified</field>
55
<field name="model_id" ref="hr_expense.model_hr_expense_sheet" />
6-
<field name="subject">Your expense report ${object.name} is verified</field>
6+
<field name="subject">Your expense report {{ object.name }} is verified</field>
77
<field name="use_default_to" eval="True" />
88
<field name="body_html" type="html">
99
<div>
10-
Dear ${object.employee_id.name or 'requester'},<br />
11-
This email is to inform that your expense report ${object.name} was verified by approver team.
10+
Dear <t t-out="object.employee_id.name or 'Requester'" />,<br />
11+
This email is to inform that your expense report <t
12+
t-out="object.name"
13+
/> was verified by approver team.
1214
<br /><br />
1315
Thank you,
1416
<br />

hr_expense_substate/demo/hr_expense_substate_demo.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
<field name="name">To Verify</field>
66
<field name="sequence">1</field>
77
<field name="target_state_value_id" ref="target_state_value_submit" />
8-
<field name="active" eval="False" />
98
</record>
109
<record id="base_substate_checked" model="base.substate">
1110
<field name="name">Checked</field>
1211
<field name="sequence">2</field>
1312
<field name="target_state_value_id" ref="target_state_value_submit" />
14-
<field name="active" eval="False" />
1513
</record>
1614
<record id="base_substate_verified" model="base.substate">
1715
<field name="name">Verified</field>
@@ -21,6 +19,5 @@
2119
name="mail_template_id"
2220
ref="hr_expense_substate.mail_template_data_hr_expense_substate_verified"
2321
/>
24-
<field name="active" eval="False" />
2522
</record>
2623
</odoo>

hr_expense_substate/models/hr_expense.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class BaseSubstateType(models.Model):
1414

1515

1616
class HrExpenseSheet(models.Model):
17-
_inherit = ["hr.expense.sheet", "base.substate.mixin"]
1817
_name = "hr.expense.sheet"
18+
_inherit = ["hr.expense.sheet", "base.substate.mixin"]
1919
_state_field = "state"

hr_expense_substate/readme/DESCRIPTION.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This module allows to add a substate to expense report.
1+
This module allows to add a substate to an expense report.
22
For each expense report state you can define a substate.
33
We this module you can define substate which allow you to extend expense report workflow.
44
For example, you can add substate "To Verify" if

hr_expense_substate/static/description/index.html

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
54
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
5+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
76
<title>Expense Report Sub State</title>
87
<style type="text/css">
98

109
/*
1110
:Author: David Goodger ([email protected])
12-
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
11+
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
1615
17-
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
16+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1817
customize this style sheet.
1918
*/
2019

@@ -366,28 +365,30 @@ <h1 class="title">Expense Report Sub State</h1>
366365
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367366
!! This file is generated by oca-gen-addon-readme !!
368367
!! changes will be overwritten. !!
368+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369+
!! source digest: sha256:3a6399e3cc32fd585364d03e868abca9577218a017d7ccaf63675086dec82a30
369370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" 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" href="https://github.com/OCA/hr-expense/tree/14.0/hr_expense_substate"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/hr-expense-14-0/hr-expense-14-0-hr_expense_substate"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/289/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
371-
<p>This module allows to add a substate to expense report.
371+
<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/hr-expense/tree/15.0/hr_expense_substate"><img alt="OCA/hr-expense" src="https://img.shields.io/badge/github-OCA%2Fhr--expense-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_substate"><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/hr-expense&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p>This module allows to add a substate to an expense report.
372373
For each expense report state you can define a substate.
373374
We this module you can define substate which allow you to extend expense report workflow.
374375
For example, you can add substate “To Verify” if
375376
the order can not be approved without document checked and verified</p>
376377
<p><strong>Table of contents</strong></p>
377378
<div class="contents local topic" id="contents">
378379
<ul class="simple">
379-
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
380-
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
381-
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
382-
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
383-
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
384-
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
380+
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
381+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
382+
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
383+
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
384+
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
385+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
385386
</ul>
386387
</li>
387388
</ul>
388389
</div>
389390
<div class="section" id="usage">
390-
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
391+
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
391392
<ol class="arabic simple">
392393
<li><dl class="first docutils">
393394
<dt>Go to ** Settings &gt; Technical &gt; Database Structure ** and Add “Base substate”.</dt>
@@ -401,35 +402,35 @@ <h1><a class="toc-backref" href="#id1">Usage</a></h1>
401402
</ol>
402403
</div>
403404
<div class="section" id="bug-tracker">
404-
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
405+
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
405406
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/hr-expense/issues">GitHub Issues</a>.
406407
In case of trouble, please check there if your issue has already been reported.
407-
If you spotted it first, help us smashing it by providing a detailed and welcomed
408-
<a class="reference external" href="https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_substate%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
408+
If you spotted it first, help us to smash it by providing a detailed and welcomed
409+
<a class="reference external" href="https://github.com/OCA/hr-expense/issues/new?body=module:%20hr_expense_substate%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
409410
<p>Do not contact contributors directly about support or help with technical issues.</p>
410411
</div>
411412
<div class="section" id="credits">
412-
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
413+
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
413414
<div class="section" id="authors">
414-
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
415+
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
415416
<ul class="simple">
416417
<li>Ecosoft</li>
417418
</ul>
418419
</div>
419420
<div class="section" id="contributors">
420-
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
421+
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
421422
<ul class="simple">
422423
<li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li>
423424
</ul>
424425
</div>
425426
<div class="section" id="maintainers">
426-
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
427+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
427428
<p>This module is maintained by the OCA.</p>
428429
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
429430
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
430431
mission is to support the collaborative development of Odoo features and
431432
promote its widespread use.</p>
432-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/14.0/hr_expense_substate">OCA/hr-expense</a> project on GitHub.</p>
433+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr-expense/tree/15.0/hr_expense_substate">OCA/hr-expense</a> project on GitHub.</p>
433434
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
434435
</div>
435436
</div>

hr_expense_substate/views/hr_expense_views.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
<field name="model">hr.expense.sheet</field>
1414
<field name="inherit_id" ref="hr_expense.view_hr_expense_sheet_form" />
1515
<field name="arch" type="xml">
16-
<xpath expr="//header/field[@name='state']" position="before">
17-
<field
18-
name="substate_id"
19-
widget="statusbar"
20-
options="{'clickable': '1',}"
21-
/>
16+
<xpath expr="//header" position="after">
17+
<header name="substate">
18+
<field
19+
name="substate_id"
20+
widget="statusbar"
21+
options="{'clickable': '1',}"
22+
/>
23+
</header>
2224
</xpath>
2325
</field>
2426
</record>

0 commit comments

Comments
 (0)