mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Merge pull request #1367 from OCA/14.0-ocabot-update-dotfiles
[14.0] dotfiles update needs manual intervention
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
# Do NOT update manually; changes here will be overwritten by Copier
|
||||
_commit: v1.3.6
|
||||
_commit: v1.5.2
|
||||
_src_path: gh:oca/oca-addons-repo-template
|
||||
ci: Travis
|
||||
dependency_installation_mode: PIP
|
||||
generate_requirements_txt: true
|
||||
include_wkhtmltopdf: false
|
||||
odoo_version: 14.0
|
||||
org_name: Odoo Community Association (OCA)
|
||||
org_slug: OCA
|
||||
rebel_module_groups: []
|
||||
repo_description: 'TODO: add repo description.'
|
||||
repo_name: account-financial-tools
|
||||
repo_slug: account-financial-tools
|
||||
repo_website: https://github.com/OCA/account-financial-tools
|
||||
travis_apt_packages: []
|
||||
travis_apt_sources: []
|
||||
|
||||
@@ -4,7 +4,7 @@ env:
|
||||
|
||||
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
|
||||
parserOptions:
|
||||
ecmaVersion: 2017
|
||||
ecmaVersion: 2019
|
||||
|
||||
overrides:
|
||||
- files:
|
||||
|
||||
29
.github/workflows/pre-commit.yml
vendored
29
.github/workflows/pre-commit.yml
vendored
@@ -2,7 +2,12 @@ name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "14.0*"
|
||||
push:
|
||||
branches:
|
||||
- "14.0"
|
||||
- "14.0-ocabot-*"
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
@@ -10,11 +15,21 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- name: Get python version
|
||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
# The pylint-odoo version we use here does not support python 3.10
|
||||
# https://github.com/OCA/oca-addons-repo-template/issues/80
|
||||
# We also need to pin to an older version of python for older odoo versions
|
||||
# where we are not using black > 21. Older black versions won't work with
|
||||
# Python 3.9.8+, and we can't bump black without reformatting.
|
||||
python-version: "3.9.7"
|
||||
- uses: pre-commit/action@v2.0.0
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --all-files --show-diff-on-failure --color=always
|
||||
- name: Check that all files generated by pre-commit are in git
|
||||
run: |
|
||||
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
|
||||
if [ "$newfiles" != "" ] ; then
|
||||
echo "Please check-in the following files:"
|
||||
echo "$newfiles"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -46,7 +46,7 @@ repos:
|
||||
- --remove-duplicate-keys
|
||||
- --remove-unused-variables
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 20.8b1
|
||||
rev: 22.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
@@ -120,7 +120,7 @@ repos:
|
||||
name: flake8
|
||||
additional_dependencies: ["flake8-bugbear==20.1.4"]
|
||||
- repo: https://github.com/PyCQA/pylint
|
||||
rev: pylint-2.5.3
|
||||
rev: v2.11.1
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: pylint with optional checks
|
||||
@@ -129,7 +129,7 @@ repos:
|
||||
- --exit-zero
|
||||
verbose: true
|
||||
additional_dependencies: &pylint_deps
|
||||
- pylint-odoo==3.5.0
|
||||
- pylint-odoo==5.0.5
|
||||
- id: pylint
|
||||
name: pylint with mandatory checks
|
||||
args:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
[](https://runbot.odoo-community.org/runbot/repo/github-com-oca-account-financial-tools-92)
|
||||
|
||||
[](https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=14.0)
|
||||
[](https://travis-ci.com/OCA/account-financial-tools)
|
||||
[](https://codecov.io/gh/OCA/account-financial-tools)
|
||||
[](https://translation.odoo-community.org/engage/account-financial-tools-14-0/?utm_source=widget)
|
||||
@@ -59,12 +60,11 @@ addon | version | maintainers | summary
|
||||
|
||||
This repository is licensed under [AGPL-3.0](LICENSE).
|
||||
|
||||
However, each module can have a totally different license, as long as they adhere to OCA
|
||||
However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
|
||||
policy. Consult each module's `__manifest__.py` file, which contains a `license` key
|
||||
that explains its license.
|
||||
|
||||
----
|
||||
|
||||
OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
|
||||
organization whose mission is to support the collaborative development of Odoo features
|
||||
and promote its widespread use.
|
||||
|
||||
@@ -1204,7 +1204,7 @@ class AccountAsset(models.Model):
|
||||
return table
|
||||
|
||||
def _get_depreciation_entry_name(self, seq):
|
||||
""" use this method to customise the name of the accounting entry """
|
||||
"""use this method to customise the name of the accounting entry"""
|
||||
return (self.code or str(self.id)) + "/" + str(seq)
|
||||
|
||||
def _compute_entries(self, date_end, check_triggers=False):
|
||||
|
||||
@@ -392,7 +392,7 @@ class AssetReportXlsx(models.AbstractModel):
|
||||
ws.write_string(row_pos, 0, no_entries, FORMATS["format_left_bold"])
|
||||
|
||||
def _get_assets(self, wiz, data):
|
||||
""" Add the selected assets, both grouped and ungrouped, to `data` """
|
||||
"""Add the selected assets, both grouped and ungrouped, to `data`"""
|
||||
dom = [
|
||||
("date_start", "<=", wiz.date_to),
|
||||
"|",
|
||||
|
||||
@@ -71,7 +71,7 @@ class TestAssetManagementXls(AccountTestInvoicingCommon):
|
||||
cls.report_action = cls.xls_report.xls_export()
|
||||
|
||||
def test_01_action_xls(self):
|
||||
""" Check report XLS action and generate report """
|
||||
"""Check report XLS action and generate report"""
|
||||
self.assertGreaterEqual(
|
||||
self.report_action.items(),
|
||||
{
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_tax_audit_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="balance" position="replace" optional="show" />
|
||||
<field name="balance" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -141,7 +141,7 @@ class TestPayment(TransactionCase):
|
||||
self.bank_journal.bank_account_id = self.partner_bank_id.id
|
||||
|
||||
def create_invoice(self, amount=100, inv_type="out_invoice", currency_id=None):
|
||||
""" Returns an open invoice """
|
||||
"""Returns an open invoice"""
|
||||
invoice = self.move_model.create(
|
||||
{
|
||||
"company_id": self.main_company.id,
|
||||
@@ -165,7 +165,7 @@ class TestPayment(TransactionCase):
|
||||
return invoice
|
||||
|
||||
def create_check_deposit(self, move_lines):
|
||||
""" Returns an validated check deposit """
|
||||
"""Returns an validated check deposit"""
|
||||
check_deposit = self.check_deposit_model.create(
|
||||
{
|
||||
"company_id": self.main_company.id,
|
||||
|
||||
@@ -154,7 +154,7 @@ class TestJournalLockDate(common.AccountTestInvoicingCommon):
|
||||
move3.action_post()
|
||||
|
||||
def test_journal_lock_date_adviser(self):
|
||||
""" The journal lock date is ignored for Advisers """
|
||||
"""The journal lock date is ignored for Advisers"""
|
||||
self.env.user.write(
|
||||
{"groups_id": [(4, self.env.ref("account.group_account_manager").id)]}
|
||||
)
|
||||
|
||||
@@ -61,7 +61,7 @@ class TestAccountMoveLinePurchaseInfo(common.TransactionCase):
|
||||
)
|
||||
|
||||
def _create_user(self, login, groups, company):
|
||||
""" Create a user."""
|
||||
"""Create a user."""
|
||||
group_ids = [group.id for group in groups]
|
||||
user = self.res_users_model.with_context({"no_reset_password": True}).create(
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
|
||||
""" INIT sale references in acount move line """
|
||||
"""INIT sale references in acount move line"""
|
||||
# FOR stock moves
|
||||
cr.execute(
|
||||
"""
|
||||
|
||||
@@ -66,7 +66,7 @@ class TestAccountMoveLineSaleInfo(common.TransactionCase):
|
||||
)
|
||||
|
||||
def _create_user(self, login, groups, company):
|
||||
""" Create a user."""
|
||||
"""Create a user."""
|
||||
group_ids = [group.id for group in groups]
|
||||
user = self.res_users_model.with_context({"no_reset_password": True}).create(
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ class TestAccountMoveTemplateEnhanced(TransactionCase):
|
||||
)
|
||||
|
||||
def test_move_template_normal(self):
|
||||
""" Test normal case, input amount 300 """
|
||||
"""Test normal case, input amount 300"""
|
||||
with Form(self.env["account.move.template.run"]) as f:
|
||||
f.template_id = self.move_template
|
||||
template_run = f.save()
|
||||
@@ -103,7 +103,7 @@ class TestAccountMoveTemplateEnhanced(TransactionCase):
|
||||
)
|
||||
|
||||
def test_move_template_optional(self):
|
||||
""" Test optional case, input amount -300, expect optional account """
|
||||
"""Test optional case, input amount -300, expect optional account"""
|
||||
with Form(self.env["account.move.template.run"]) as f:
|
||||
f.template_id = self.move_template
|
||||
template_run = f.save()
|
||||
@@ -129,7 +129,7 @@ class TestAccountMoveTemplateEnhanced(TransactionCase):
|
||||
)
|
||||
|
||||
def test_move_template_overwrite(self):
|
||||
""" Test case overwrite, amount = 3000, no need to manual input """
|
||||
"""Test case overwrite, amount = 3000, no need to manual input"""
|
||||
# Test for error when debit is not a valid field
|
||||
with Form(self.env["account.move.template.run"]) as f:
|
||||
f.template_id = self.move_template
|
||||
|
||||
@@ -41,7 +41,7 @@ class ProductCategoryTax(common.SavepointCase):
|
||||
)
|
||||
|
||||
def test_01_copy_taxes(self):
|
||||
""" Default taxes taken from the category"""
|
||||
"""Default taxes taken from the category"""
|
||||
test_categ = self.categ_obj.create(
|
||||
{
|
||||
"name": "Super Category",
|
||||
@@ -56,7 +56,7 @@ class ProductCategoryTax(common.SavepointCase):
|
||||
self.assertEqual(self.product_test.supplier_taxes_id, self.tax_purchase)
|
||||
|
||||
def test_02_update_taxes(self):
|
||||
""" Default update """
|
||||
"""Default update"""
|
||||
self.product_test = self.product_obj.create(
|
||||
{
|
||||
"name": "TEST 02",
|
||||
@@ -78,7 +78,7 @@ class ProductCategoryTax(common.SavepointCase):
|
||||
self.assertEqual(self.product_test.supplier_taxes_id, self.tax_purchase)
|
||||
|
||||
def test_03_taxes_not_updeatable(self):
|
||||
""" Avoid update specific products"""
|
||||
"""Avoid update specific products"""
|
||||
self.product_test3 = self.product_obj.create(
|
||||
{
|
||||
"name": "TEST 03",
|
||||
|
||||
Reference in New Issue
Block a user