Skip to content

Commit

Permalink
Merge PR #621 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by alexey-pelykh
  • Loading branch information
OCA-git-bot committed Nov 28, 2019
2 parents 7db7b3b + 1666267 commit 4cf3f2c
Show file tree
Hide file tree
Showing 26 changed files with 1,076 additions and 0 deletions.
85 changes: 85 additions & 0 deletions hr_expense_sequence/README.rst
@@ -0,0 +1,85 @@
===================
HR expense sequence
===================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/12.0/hr_expense_sequence
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_expense_sequence
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/116/12.0
:alt: Try me on Runbot

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

This module adds the possibility to define a sequence for the expense report's reference.
This reference is then set as default when you create a new expense report, using the defined sequence.

**Table of contents**

.. contents::
:local:

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

You can change the default sequence (EX0001) by the one of your choice
going to *Settings > Technical > Sequences & Identifiers > Sequences*, and
editing the record `Expense Report sequence`.

You will only have access to that section if your section has `Technical features`
permission check marked.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/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/hr/issues/new?body=module:%20hr_expense_sequence%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
~~~~~~~

* Serv. Tecnol. Avanzados - Pedro M. Baeza

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

* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>

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.

This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/12.0/hr_expense_sequence>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
14 changes: 14 additions & 0 deletions hr_expense_sequence/__init__.py
@@ -0,0 +1,14 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from odoo import api, SUPERUSER_ID


def assign_old_sequences(cr, registry):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
expense_obj = env['hr.expense.sheet']
sequence_obj = env['ir.sequence']
for expense in expense_obj.search([], order='id'):
expense.write({
'number': sequence_obj.next_by_code('hr.expense.sheet')})
23 changes: 23 additions & 0 deletions hr_expense_sequence/__manifest__.py
@@ -0,0 +1,23 @@
# Copyright 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
'name': 'HR expense sequence',
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'category': 'Human Resources',
'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza,'
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/hr',
'depends': [
'hr_expense',
],
'data': [
'data/hr_expense_data.xml',
'views/hr_expense_expense_view.xml',
'report/report_expense_sheet.xml',
],
'installable': True,
'post_init_hook': 'assign_old_sequences',
}
11 changes: 11 additions & 0 deletions hr_expense_sequence/data/hr_expense_data.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record model="ir.sequence" id="seq_expense">
<field name="name">Expense report sequence</field>
<field name="code">hr.expense.sheet</field>
<field name="padding" eval="4"/>
<field name="prefix">EX</field>
</record>

</odoo>
35 changes: 35 additions & 0 deletions hr_expense_sequence/i18n/cs_CZ.po
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# Lukáš Spurný <lukasspurny8@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 03:45+0000\n"
"PO-Revision-Date: 2018-02-23 03:45+0000\n"
"Last-Translator: Lukáš Spurný <lukasspurny8@gmail.com>, 2018\n"
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/"
"teams/23907/cs_CZ/)\n"
"Language: cs_CZ\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"

#. module: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr "Zpráva o výdajích"

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr "Zpráva o nákladech"

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Číslo"
35 changes: 35 additions & 0 deletions hr_expense_sequence/i18n/de.po
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-01 01:04+0000\n"
"PO-Revision-Date: 2018-12-18 15:58+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\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"
"X-Generator: Weblate 3.3\n"

#. module: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr "Spesen-Bericht"

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr "Spesen-Bericht"

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Nummer"
34 changes: 34 additions & 0 deletions hr_expense_sequence/i18n/es.po
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-01 01:04+0000\n"
"PO-Revision-Date: 2017-07-01 01:04+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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"

#. module: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Número"
34 changes: 34 additions & 0 deletions hr_expense_sequence/i18n/fi.po
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-01 01:04+0000\n"
"PO-Revision-Date: 2017-07-01 01:04+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n"
"Language: fi\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: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Numero"
35 changes: 35 additions & 0 deletions hr_expense_sequence/i18n/fr.po
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# guillaume bauer <guillaume.bauer@syentys.com>, 2017
# Alexandre Fayolle <alexandre.fayolle@camptocamp.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-23 03:45+0000\n"
"PO-Revision-Date: 2018-02-23 03:45+0000\n"
"Last-Translator: Alexandre Fayolle <alexandre.fayolle@camptocamp.com>, 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\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: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr "Rapport de dépenses"

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr "Rapport de dépenses"

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Numéro"
35 changes: 35 additions & 0 deletions hr_expense_sequence/i18n/hr.po
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
# Translators:
# Bole <bole@dajmi5.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-04 06:52+0000\n"
"PO-Revision-Date: 2017-07-04 06:52+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

#. module: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr "Izvještaj troškova"

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr "Izvještaji troškova"

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr "Broj"
30 changes: 30 additions & 0 deletions hr_expense_sequence/i18n/hr_expense_sequence.pot
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_expense_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.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: hr_expense_sequence
#: model:ir.model,name:hr_expense_sequence.model_hr_expense_sheet
msgid "Expense Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.ui.view,arch_db:hr_expense_sequence.report_expense_sheet
msgid "Expenses Report"
msgstr ""

#. module: hr_expense_sequence
#: model:ir.model.fields,field_description:hr_expense_sequence.field_hr_expense_sheet_number
msgid "Number"
msgstr ""

0 comments on commit 4cf3f2c

Please sign in to comment.