Skip to content

Commit

Permalink
Merge PR OCA#359 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 14, 2024
2 parents 95494ed + d21c47e commit 5eaa85b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion partner_risk_insurance/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Partner Risk Insurance
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:98a123e8509ee584adcafbaa05c53927f7e5602a12ff0533d3dcde5e107c7b4e
!! source digest: sha256:2f2c52a65a6192f311408197622800bd4d6de550d834ec70686dade873c0ab26
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
1 change: 1 addition & 0 deletions partner_risk_insurance/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from .hooks import pre_init_hook
from . import models
from . import wizard
3 changes: 2 additions & 1 deletion partner_risk_insurance/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Partner Risk Insurance",
"version": "15.0.3.0.0",
"version": "15.0.3.0.1",
"development_status": "Production/Stable",
"summary": "Risk insurance partner information",
"author": "AvanzOSC,"
Expand All @@ -25,4 +25,5 @@
],
"installable": True,
"maintainers": ["Daniel-CA", "sergio-teruel", "omar7r", "Tardo", "Shide"],
"pre_init_hook": "pre_init_hook",
}
14 changes: 14 additions & 0 deletions partner_risk_insurance/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


def pre_init_hook(cr):
"""Create account move columns to performance installation on large databases"""
cr.execute(
"""
ALTER TABLE account_move
ADD COLUMN IF NOT EXISTS insured_with_credit_policy boolean DEFAULT false,
ADD COLUMN IF NOT EXISTS credit_policy_company_id INT,
ADD COLUMN IF NOT EXISTS credit_policy_state_id INT;
""",
)
10 changes: 10 additions & 0 deletions partner_risk_insurance/migrations/15.0.3.0.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

# pylint: disable=W7950
from odoo.addons.partner_risk_insurance.hooks import pre_init_hook


def migrate(cr, version):
"""Create account move columns to performance upgrade on large databases"""
pre_init_hook(cr)
3 changes: 2 additions & 1 deletion partner_risk_insurance/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Partner Risk Insurance</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:98a123e8509ee584adcafbaa05c53927f7e5602a12ff0533d3dcde5e107c7b4e
!! source digest: sha256:2f2c52a65a6192f311408197622800bd4d6de550d834ec70686dade873c0ab26
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/credit-control/tree/15.0/partner_risk_insurance"><img alt="OCA/credit-control" src="https://img.shields.io/badge/github-OCA%2Fcredit--control-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/credit-control-15-0/credit-control-15-0-partner_risk_insurance"><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/credit-control&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a new tab in the partner form to introduce risk
Expand Down

0 comments on commit 5eaa85b

Please sign in to comment.