Skip to content

Commit 5eaa85b

Browse files
committed
Merge PR OCA#359 into 15.0
Signed-off-by pedrobaeza
2 parents 95494ed + d21c47e commit 5eaa85b

File tree

6 files changed

+30
-3
lines changed

6 files changed

+30
-3
lines changed

partner_risk_insurance/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Partner Risk Insurance
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:98a123e8509ee584adcafbaa05c53927f7e5602a12ff0533d3dcde5e107c7b4e
10+
!! source digest: sha256:2f2c52a65a6192f311408197622800bd4d6de550d834ec70686dade873c0ab26
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png

partner_risk_insurance/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
from .hooks import pre_init_hook
23
from . import models
34
from . import wizard

partner_risk_insurance/__manifest__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
22
{
33
"name": "Partner Risk Insurance",
4-
"version": "15.0.3.0.0",
4+
"version": "15.0.3.0.1",
55
"development_status": "Production/Stable",
66
"summary": "Risk insurance partner information",
77
"author": "AvanzOSC,"
@@ -25,4 +25,5 @@
2525
],
2626
"installable": True,
2727
"maintainers": ["Daniel-CA", "sergio-teruel", "omar7r", "Tardo", "Shide"],
28+
"pre_init_hook": "pre_init_hook",
2829
}

partner_risk_insurance/hooks.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2024 Tecnativa - Sergio Teruel
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
5+
def pre_init_hook(cr):
6+
"""Create account move columns to performance installation on large databases"""
7+
cr.execute(
8+
"""
9+
ALTER TABLE account_move
10+
ADD COLUMN IF NOT EXISTS insured_with_credit_policy boolean DEFAULT false,
11+
ADD COLUMN IF NOT EXISTS credit_policy_company_id INT,
12+
ADD COLUMN IF NOT EXISTS credit_policy_state_id INT;
13+
""",
14+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2024 Tecnativa - Sergio Teruel
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
# pylint: disable=W7950
5+
from odoo.addons.partner_risk_insurance.hooks import pre_init_hook
6+
7+
8+
def migrate(cr, version):
9+
"""Create account move columns to performance upgrade on large databases"""
10+
pre_init_hook(cr)

partner_risk_insurance/static/description/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
23
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
34
<head>
@@ -366,7 +367,7 @@ <h1 class="title">Partner Risk Insurance</h1>
366367
!! This file is generated by oca-gen-addon-readme !!
367368
!! changes will be overwritten. !!
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369-
!! source digest: sha256:98a123e8509ee584adcafbaa05c53927f7e5602a12ff0533d3dcde5e107c7b4e
370+
!! source digest: sha256:2f2c52a65a6192f311408197622800bd4d6de550d834ec70686dade873c0ab26
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371372
<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>
372373
<p>This module adds a new tab in the partner form to introduce risk

0 commit comments

Comments
 (0)