Skip to content

Commit

Permalink
[14.0][MIG]sale_customer_rank: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillemCForgeFlow authored and amarcosg committed Jun 6, 2023
1 parent 60a723e commit 6fb6d9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sale_customer_rank/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
partners = env["sale.order"].search([]).mapped("partner_id")
partners |= partners.mapped("commercial_partner_id")
partners._increase_rank("customer_rank")
for partner in partners:
partner._increase_rank("customer_rank", partner.sale_order_count)
4 changes: 2 additions & 2 deletions sale_customer_rank/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
{
"name": "Sale Customer Rank",
"summary": "Update Customer Rank when creating a Sale Order",
"version": "13.0.1.0.0",
"version": "14.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/partner-contact",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["sale"],
"depends": ["sale_management"],
"data": [],
"post_init_hook": "post_init_hook",
}

0 comments on commit 6fb6d9c

Please sign in to comment.