Skip to content

Commit

Permalink
[2833][ADD] account_move_obc_csv (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
yostashiro authored Mar 15, 2023
1 parent 2fd2750 commit 506b9dd
Show file tree
Hide file tree
Showing 22 changed files with 1,046 additions and 0 deletions.
72 changes: 72 additions & 0 deletions account_move_obc_csv/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
====================
Account Move OBC CSV
====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-qrtl%2Faxls--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/axls-custom/tree/16.0/account_move_obc_csv
:alt: qrtl/axls-custom

|badge1| |badge2| |badge3|

This module does the following:

- Let users export journal entries in CSV format to be uploaded to OBC accounting system.

This module depends on report_csv module from OCA.

**Table of contents**

.. contents::
:local:

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

Following settings should be updated:

* Set Plan Type in relevant analytic plans. Plan Type decides which column of the OBC
data the analytic account will be mapped to.
* Set 'OBC Tax Category' and 'OBC Tax Rate Type' in tax records. These settings are
used to show in the corresponding columns in the exported CSV file.

Usage
=====

Select journal entries that should be exported, and then go to *Print > OBC CSV* to
export the data.

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

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/axls-custom/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/qrtl/axls-custom/issues/new?body=module:%20account_move_obc_csv%0Aversion:%2016.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
~~~~~~~

* Quartile Limited

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

This module is part of the `qrtl/axls-custom <https://github.com/qrtl/axls-custom/tree/16.0/account_move_obc_csv>`_ project on GitHub.

You are welcome to contribute.
2 changes: 2 additions & 0 deletions account_move_obc_csv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import report
21 changes: 21 additions & 0 deletions account_move_obc_csv/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Move OBC CSV",
"version": "16.0.1.0.0",
"category": "Accounting",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
"license": "AGPL-3",
"depends": [
"account",
"report_csv",
],
"data": [
"data/obc_csv_report_data.xml",
"views/account_analytic_plan_views.xml",
"views/account_move_views.xml",
"views/account_tax_views.xml",
],
"installable": True,
}
14 changes: 14 additions & 0 deletions account_move_obc_csv/data/obc_csv_report_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="report_obc_csv" model="ir.actions.report">
<field name="name">OBC CSV</field>
<field name="model">account.move</field>
<field name="report_type">csv</field>
<field name="encoding">cp932</field>
<field name="encode_error_handling">replace</field>
<field name="report_name">account_move_obc_csv.report_obc_csv</field>
<field name="report_file">account_move_obc_csv.report_obc_csv</field>
<field name="print_report_name">'OBC_%s' % (time.strftime('%Y%m%d'))</field>
<field name="binding_model_id" ref="model_account_move" />
</record>
</odoo>
141 changes: 141 additions & 0 deletions account_move_obc_csv/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_obc_csv
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-28 01:06+0000\n"
"PO-Revision-Date: 2023-02-28 01:06+0000\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: account_move_obc_csv
#: model:ir.actions.report,print_report_name:account_move_obc_csv.report_obc_csv
msgid "'OBC_%s' % (time.strftime('%Y%m%d'))"
msgstr ""

#. module: account_move_obc_csv
#: model:ir.model.fields.selection,name:account_move_obc_csv.selection__account_tax__obc_tax_rate_type__0
msgid "0: Standard"
msgstr "0: 標準"

#. module: account_move_obc_csv
#: model:ir.model.fields.selection,name:account_move_obc_csv.selection__account_tax__obc_tax_rate_type__1
msgid "1: Reduced"
msgstr "1: 軽減"

#. module: account_move_obc_csv
#: model:ir.model,name:account_move_obc_csv.model_account_analytic_line
msgid "Analytic Line"
msgstr "分析行"

#. module: account_move_obc_csv
#: model:ir.model,name:account_move_obc_csv.model_account_analytic_plan
msgid "Analytic Plans"
msgstr "分析プラン"

#. module: account_move_obc_csv
#: model:ir.model.fields.selection,name:account_move_obc_csv.selection__account_analytic_plan__plan_type__department
msgid "Department"
msgstr "部門"

#. module: account_move_obc_csv
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_bank_statement_line__is_exported
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_move__is_exported
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_payment__is_exported
#: model_terms:ir.ui.view,arch_db:account_move_obc_csv.view_account_move_filter
msgid "Exported"
msgstr "出力済"

#. module: account_move_obc_csv
#. odoo-python
#: code:addons/account_move_obc_csv/report/report_account_move_obc_csv.py:0
#, python-format
msgid ""
"Following records are not in a valid state (posted) for export.\n"
"%s"
msgstr ""
"次のレコードは出力処理可能な状態(記帳済)ではありません。\n"
"%s"

#. module: account_move_obc_csv
#. odoo-python
#: code:addons/account_move_obc_csv/report/report_account_move_obc_csv.py:0
#, python-format
msgid ""
"Following records have been exported already. Please unselect 'Exported' as necessary to export them again.\n"
"%s"
msgstr ""
"次のレコードはすでに出力済です。必要に応じて「出力済」の選択を外した上で再出力してください。\n"
"%s"

#. module: account_move_obc_csv
#: model:ir.model,name:account_move_obc_csv.model_account_move
msgid "Journal Entry"
msgstr "仕訳"

#. module: account_move_obc_csv
#: model_terms:ir.ui.view,arch_db:account_move_obc_csv.view_account_move_filter
msgid "Not exported"
msgstr "未出力"

#. module: account_move_obc_csv
#: model:ir.actions.report,name:account_move_obc_csv.report_obc_csv
msgid "OBC CSV"
msgstr ""

#. module: account_move_obc_csv
#: model_terms:ir.ui.view,arch_db:account_move_obc_csv.view_tax_form
msgid "OBC Settings"
msgstr "OBC設定"

#. module: account_move_obc_csv
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_tax__obc_tax_category
msgid "OBC Tax Category"
msgstr "OBC消費税区分"

#. module: account_move_obc_csv
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_tax__obc_tax_rate_type
msgid "OBC Tax Rate Type"
msgstr "OBC消費税率種別"

#. module: account_move_obc_csv
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_analytic_line__plan_type
#: model:ir.model.fields,field_description:account_move_obc_csv.field_account_analytic_plan__plan_type
msgid "Plan Type"
msgstr "プランタイプ"

#. module: account_move_obc_csv
#: model:ir.model.fields.selection,name:account_move_obc_csv.selection__account_analytic_plan__plan_type__project
msgid "Project"
msgstr "プロジェクト"

#. module: account_move_obc_csv
#: model:ir.model,name:account_move_obc_csv.model_account_tax
msgid "Tax"
msgstr "税"

#. module: account_move_obc_csv
#: model:ir.model.fields,help:account_move_obc_csv.field_account_tax__obc_tax_category
#: model:ir.model.fields,help:account_move_obc_csv.field_account_tax__obc_tax_rate_type
msgid "The set value will be used in OBC data export."
msgstr "設定値はOBCデータ出力で使用されます。"

#. module: account_move_obc_csv
#: model:ir.model.fields,help:account_move_obc_csv.field_account_analytic_line__plan_type
#: model:ir.model.fields,help:account_move_obc_csv.field_account_analytic_plan__plan_type
msgid ""
"This selection will affect which column the analytic account will be mapped "
"to in the OBC data export."
msgstr "この選択はOBCデータ出力で分析勘定をどのカラムに表示するかに影響します。"

#. module: account_move_obc_csv
#: model:ir.model,name:account_move_obc_csv.model_report_account_move_obc_csv_report_obc_csv
msgid "report.account_move_obc_csv.report_obc_csv"
msgstr ""
4 changes: 4 additions & 0 deletions account_move_obc_csv/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import account_analytic_line
from . import account_analytic_plan
from . import account_move
from . import account_tax
10 changes: 10 additions & 0 deletions account_move_obc_csv/models/account_analytic_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountAnalylticLine(models.Model):
_inherit = "account.analytic.line"

plan_type = fields.Selection(related="plan_id.plan_type", store=True)
17 changes: 17 additions & 0 deletions account_move_obc_csv/models/account_analytic_plan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountAnalylticPlan(models.Model):
_inherit = "account.analytic.plan"

plan_type = fields.Selection(
selection=[
("project", "Project"),
("department", "Department"),
],
help="This selection will affect which column the analytic account will be "
"mapped to in the OBC data export.",
)
10 changes: 10 additions & 0 deletions account_move_obc_csv/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountMove(models.Model):
_inherit = "account.move"

is_exported = fields.Boolean("Exported", copy=False)
18 changes: 18 additions & 0 deletions account_move_obc_csv/models/account_tax.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountTax(models.Model):
_inherit = "account.tax"

obc_tax_category = fields.Char(
"OBC Tax Category",
help="The set value will be used in OBC data export.",
)
obc_tax_rate_type = fields.Selection(
selection=[("0", "0: Standard"), ("1", "1: Reduced")],
string="OBC Tax Rate Type",
help="The set value will be used in OBC data export.",
)
6 changes: 6 additions & 0 deletions account_move_obc_csv/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Following settings should be updated:

* Set Plan Type in relevant analytic plans. Plan Type decides which column of the OBC
data the analytic account will be mapped to.
* Set 'OBC Tax Category' and 'OBC Tax Rate Type' in tax records. These settings are
used to show in the corresponding columns in the exported CSV file.
5 changes: 5 additions & 0 deletions account_move_obc_csv/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module does the following:

- Let users export journal entries in CSV format to be uploaded to OBC accounting system.

This module depends on report_csv module from OCA.
2 changes: 2 additions & 0 deletions account_move_obc_csv/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Select journal entries that should be exported, and then go to *Print > OBC CSV* to
export the data.
1 change: 1 addition & 0 deletions account_move_obc_csv/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import report_account_move_obc_csv
Loading

0 comments on commit 506b9dd

Please sign in to comment.