Merge PR #890 into 15.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-11-03 11:23:38 +00:00
5 changed files with 15 additions and 12 deletions

View File

@@ -1,9 +1,14 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.5.2
_commit: v1.11.0
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
dependency_installation_mode: PIP
generate_requirements_txt: true
github_check_license: true
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
include_wkhtmltopdf: false
odoo_version: 15.0
org_name: Odoo Community Association (OCA)
@@ -15,3 +20,4 @@ repo_slug: contract
repo_website: https://github.com/OCA/contract
travis_apt_packages: []
travis_apt_sources: []

1
.gitignore vendored
View File

@@ -15,7 +15,6 @@ build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/

View File

@@ -119,19 +119,15 @@ repos:
- id: flake8
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/PyCQA/pylint
rev: v2.11.1
- repo: https://github.com/OCA/pylint-odoo
rev: 7.0.2
hooks:
- id: pylint
- id: pylint_odoo
name: pylint with optional checks
args:
- --rcfile=.pylintrc
- --exit-zero
verbose: true
additional_dependencies: &pylint_deps
- pylint-odoo==5.0.5
- id: pylint
name: pylint with mandatory checks
- id: pylint_odoo
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

View File

@@ -309,10 +309,11 @@ class ContractContract(models.Model):
if date_end and all(date_end):
contract.date_end = max(date_end)
# pylint: disable=missing-return
@api.depends(
"contract_line_ids.recurring_next_date",
"contract_line_ids.is_canceled",
) # pylint: disable=missing-return
)
def _compute_recurring_next_date(self):
for contract in self:
recurring_next_date = contract.contract_line_ids.filtered(

View File

@@ -106,9 +106,10 @@ class ContractLine(models.Model):
readonly=True,
)
# pylint: disable=missing-return
@api.depends(
"last_date_invoiced", "date_start", "date_end", "contract_id.last_date_invoiced"
) # pylint: disable=missing-return
)
def _compute_next_period_date_start(self):
"""Rectify next period date start if another line in the contract has been
already invoiced previously when the recurrence is by contract.