odoo-addon-partner-classification 19.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/partner_classification/README.rst +111 -0
- odoo/addons/partner_classification/__init__.py +1 -0
- odoo/addons/partner_classification/__manifest__.py +19 -0
- odoo/addons/partner_classification/i18n/partner_classification.pot +109 -0
- odoo/addons/partner_classification/models/__init__.py +2 -0
- odoo/addons/partner_classification/models/res_partner.py +18 -0
- odoo/addons/partner_classification/models/res_partner_classification.py +26 -0
- odoo/addons/partner_classification/readme/CONTEXT.md +15 -0
- odoo/addons/partner_classification/readme/CONTRIBUTORS.md +1 -0
- odoo/addons/partner_classification/readme/DESCRIPTION.md +1 -0
- odoo/addons/partner_classification/readme/USAGE.md +8 -0
- odoo/addons/partner_classification/security/ir.model.access.csv +3 -0
- odoo/addons/partner_classification/security/partner_classification_security.xml +11 -0
- odoo/addons/partner_classification/static/description/icon.png +0 -0
- odoo/addons/partner_classification/static/description/index.html +457 -0
- odoo/addons/partner_classification/tests/test_partner_classification.py +63 -0
- odoo/addons/partner_classification/views/res_partner_classification_views.xml +75 -0
- odoo/addons/partner_classification/views/res_partner_views.xml +20 -0
- odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/METADATA +126 -0
- odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/RECORD +22 -0
- odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/WHEEL +5 -0
- odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
2
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
3
|
+
:alt: Odoo Community Association
|
|
4
|
+
|
|
5
|
+
======================
|
|
6
|
+
Partner Classification
|
|
7
|
+
======================
|
|
8
|
+
|
|
9
|
+
..
|
|
10
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
11
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
12
|
+
!! changes will be overwritten. !!
|
|
13
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
14
|
+
!! source digest: sha256:c0814f1809e0e70644732315bf37e636340fbe6a4843e13cb14379e8a2c59700
|
|
15
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
16
|
+
|
|
17
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
18
|
+
:target: https://odoo-community.org/page/development-status
|
|
19
|
+
:alt: Beta
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
21
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
22
|
+
:alt: License: AGPL-3
|
|
23
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
|
|
24
|
+
:target: https://github.com/OCA/partner-contact/tree/19.0/partner_classification
|
|
25
|
+
:alt: OCA/partner-contact
|
|
26
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
27
|
+
:target: https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-partner_classification
|
|
28
|
+
:alt: Translate me on Weblate
|
|
29
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
30
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/partner-contact&target_branch=19.0
|
|
31
|
+
:alt: Try me on Runboat
|
|
32
|
+
|
|
33
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
34
|
+
|
|
35
|
+
This module provides the classification structure for res_partner.
|
|
36
|
+
|
|
37
|
+
**Table of contents**
|
|
38
|
+
|
|
39
|
+
.. contents::
|
|
40
|
+
:local:
|
|
41
|
+
|
|
42
|
+
Use Cases / Context
|
|
43
|
+
===================
|
|
44
|
+
|
|
45
|
+
Organizations often need to assign customers to a single, well-defined
|
|
46
|
+
segment, such as:
|
|
47
|
+
|
|
48
|
+
- Specialist Retailer
|
|
49
|
+
- DIY
|
|
50
|
+
- Online
|
|
51
|
+
- Export
|
|
52
|
+
|
|
53
|
+
This classification acts as a control key for downstream logic such as:
|
|
54
|
+
|
|
55
|
+
- Pricing rules (e.g., EDI discounts)
|
|
56
|
+
- Unit of Measure behavior
|
|
57
|
+
- Reporting segmentation
|
|
58
|
+
|
|
59
|
+
This module only provides the classification structure.
|
|
60
|
+
|
|
61
|
+
Usage
|
|
62
|
+
=====
|
|
63
|
+
|
|
64
|
+
Assign a classification on a partner. The value will propagate to all
|
|
65
|
+
contacts under the same commercial entity.
|
|
66
|
+
|
|
67
|
+
Go to:
|
|
68
|
+
|
|
69
|
+
Contacts → Configuration → Classifications
|
|
70
|
+
|
|
71
|
+
Create classification records as needed.
|
|
72
|
+
|
|
73
|
+
Bug Tracker
|
|
74
|
+
===========
|
|
75
|
+
|
|
76
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
|
|
77
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
78
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
79
|
+
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_classification%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
80
|
+
|
|
81
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
82
|
+
|
|
83
|
+
Credits
|
|
84
|
+
=======
|
|
85
|
+
|
|
86
|
+
Authors
|
|
87
|
+
-------
|
|
88
|
+
|
|
89
|
+
* Camptocamp
|
|
90
|
+
|
|
91
|
+
Contributors
|
|
92
|
+
------------
|
|
93
|
+
|
|
94
|
+
- Cyril JEANNERET <cyril.jeanneret@camptocamp.com>
|
|
95
|
+
|
|
96
|
+
Maintainers
|
|
97
|
+
-----------
|
|
98
|
+
|
|
99
|
+
This module is maintained by the OCA.
|
|
100
|
+
|
|
101
|
+
.. image:: https://odoo-community.org/logo.png
|
|
102
|
+
:alt: Odoo Community Association
|
|
103
|
+
:target: https://odoo-community.org
|
|
104
|
+
|
|
105
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
106
|
+
mission is to support the collaborative development of Odoo features and
|
|
107
|
+
promote its widespread use.
|
|
108
|
+
|
|
109
|
+
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/19.0/partner_classification>`_ project on GitHub.
|
|
110
|
+
|
|
111
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import models
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Copyright 2026 Camptocamp SA
|
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
|
|
3
|
+
{
|
|
4
|
+
"name": "Partner Classification",
|
|
5
|
+
"summary": "Structured partner classification (alternative to tags)",
|
|
6
|
+
"version": "19.0.1.0.0",
|
|
7
|
+
"category": "Contacts",
|
|
8
|
+
"author": "Camptocamp, Odoo Community Association (OCA)",
|
|
9
|
+
"license": "AGPL-3",
|
|
10
|
+
"website": "https://github.com/OCA/partner-contact",
|
|
11
|
+
"depends": ["contacts"],
|
|
12
|
+
"data": [
|
|
13
|
+
"security/ir.model.access.csv",
|
|
14
|
+
"security/partner_classification_security.xml",
|
|
15
|
+
"views/res_partner_classification_views.xml",
|
|
16
|
+
"views/res_partner_views.xml",
|
|
17
|
+
],
|
|
18
|
+
"installable": True,
|
|
19
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Translation of Odoo Server.
|
|
2
|
+
# This file contains the translation of the following modules:
|
|
3
|
+
# * partner_classification
|
|
4
|
+
#
|
|
5
|
+
msgid ""
|
|
6
|
+
msgstr ""
|
|
7
|
+
"Project-Id-Version: Odoo Server 19.0\n"
|
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
|
9
|
+
"Last-Translator: \n"
|
|
10
|
+
"Language-Team: \n"
|
|
11
|
+
"MIME-Version: 1.0\n"
|
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
|
13
|
+
"Content-Transfer-Encoding: \n"
|
|
14
|
+
"Plural-Forms: \n"
|
|
15
|
+
|
|
16
|
+
#. module: partner_classification
|
|
17
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__active
|
|
18
|
+
msgid "Active"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#. module: partner_classification
|
|
22
|
+
#: model_terms:ir.ui.view,arch_db:partner_classification.view_partner_classification_form
|
|
23
|
+
#: model_terms:ir.ui.view,arch_db:partner_classification.view_partner_classification_search
|
|
24
|
+
msgid "Archived"
|
|
25
|
+
msgstr ""
|
|
26
|
+
|
|
27
|
+
#. module: partner_classification
|
|
28
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner__classification_id
|
|
29
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_users__classification_id
|
|
30
|
+
msgid "Classification"
|
|
31
|
+
msgstr ""
|
|
32
|
+
|
|
33
|
+
#. module: partner_classification
|
|
34
|
+
#: model:ir.ui.menu,name:partner_classification.res_partner_classification_menu
|
|
35
|
+
msgid "Classifications"
|
|
36
|
+
msgstr ""
|
|
37
|
+
|
|
38
|
+
#. module: partner_classification
|
|
39
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__code
|
|
40
|
+
msgid "Code"
|
|
41
|
+
msgstr ""
|
|
42
|
+
|
|
43
|
+
#. module: partner_classification
|
|
44
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__company_id
|
|
45
|
+
msgid "Company"
|
|
46
|
+
msgstr ""
|
|
47
|
+
|
|
48
|
+
#. module: partner_classification
|
|
49
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__create_uid
|
|
50
|
+
msgid "Created by"
|
|
51
|
+
msgstr ""
|
|
52
|
+
|
|
53
|
+
#. module: partner_classification
|
|
54
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__create_date
|
|
55
|
+
msgid "Created on"
|
|
56
|
+
msgstr ""
|
|
57
|
+
|
|
58
|
+
#. module: partner_classification
|
|
59
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner__display_name
|
|
60
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__display_name
|
|
61
|
+
msgid "Display Name"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#. module: partner_classification
|
|
65
|
+
#: model:ir.model,name:partner_classification.model_res_partner
|
|
66
|
+
msgid "Fake Model"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#. module: partner_classification
|
|
70
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner__id
|
|
71
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__id
|
|
72
|
+
msgid "ID"
|
|
73
|
+
msgstr ""
|
|
74
|
+
|
|
75
|
+
#. module: partner_classification
|
|
76
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__write_uid
|
|
77
|
+
msgid "Last Updated by"
|
|
78
|
+
msgstr ""
|
|
79
|
+
|
|
80
|
+
#. module: partner_classification
|
|
81
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__write_date
|
|
82
|
+
msgid "Last Updated on"
|
|
83
|
+
msgstr ""
|
|
84
|
+
|
|
85
|
+
#. module: partner_classification
|
|
86
|
+
#: model:ir.model.fields,field_description:partner_classification.field_res_partner_classification__name
|
|
87
|
+
msgid "Name"
|
|
88
|
+
msgstr ""
|
|
89
|
+
|
|
90
|
+
#. module: partner_classification
|
|
91
|
+
#: model:ir.model,name:partner_classification.model_res_partner_classification
|
|
92
|
+
msgid "Partner Classification"
|
|
93
|
+
msgstr ""
|
|
94
|
+
|
|
95
|
+
#. module: partner_classification
|
|
96
|
+
#: model:ir.actions.act_window,name:partner_classification.action_partner_classification
|
|
97
|
+
#: model_terms:ir.ui.view,arch_db:partner_classification.view_partner_classification_search
|
|
98
|
+
msgid "Partner Classifications"
|
|
99
|
+
msgstr ""
|
|
100
|
+
|
|
101
|
+
#. module: partner_classification
|
|
102
|
+
#: model_terms:ir.ui.view,arch_db:partner_classification.view_partner_classification_search
|
|
103
|
+
msgid "Show archived"
|
|
104
|
+
msgstr ""
|
|
105
|
+
|
|
106
|
+
#. module: partner_classification
|
|
107
|
+
#: model:ir.model.constraint,message:partner_classification.constraint_res_partner_classification_unique_code
|
|
108
|
+
msgid "This code is already taken"
|
|
109
|
+
msgstr ""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright 2026 Camptocamp SA (https://www.camptocamp.com).
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
from odoo import fields, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ResPartner(models.Model):
|
|
8
|
+
_inherit = "res.partner"
|
|
9
|
+
|
|
10
|
+
classification_id = fields.Many2one(
|
|
11
|
+
"res.partner.classification",
|
|
12
|
+
string="Classification",
|
|
13
|
+
tracking=True,
|
|
14
|
+
check_company=True,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
def _commercial_fields(self):
|
|
18
|
+
return super()._commercial_fields() + ["classification_id"]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright 2026 Camptocamp SA (https://www.camptocamp.com).
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
from odoo import fields, models
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ResPartnerClassification(models.Model):
|
|
8
|
+
_name = "res.partner.classification"
|
|
9
|
+
_description = "Partner Classification"
|
|
10
|
+
_order = "name"
|
|
11
|
+
|
|
12
|
+
name = fields.Char(required=True, translate=True)
|
|
13
|
+
|
|
14
|
+
code = fields.Char()
|
|
15
|
+
|
|
16
|
+
active = fields.Boolean(default=True)
|
|
17
|
+
|
|
18
|
+
company_id = fields.Many2one(
|
|
19
|
+
"res.company",
|
|
20
|
+
index=True,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
_unique_code = models.Constraint(
|
|
24
|
+
"UNIQUE(code)",
|
|
25
|
+
"This code is already taken",
|
|
26
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Organizations often need to assign customers to a single, well-defined segment,
|
|
2
|
+
such as:
|
|
3
|
+
|
|
4
|
+
- Specialist Retailer
|
|
5
|
+
- DIY
|
|
6
|
+
- Online
|
|
7
|
+
- Export
|
|
8
|
+
|
|
9
|
+
This classification acts as a control key for downstream logic such as:
|
|
10
|
+
|
|
11
|
+
- Pricing rules (e.g., EDI discounts)
|
|
12
|
+
- Unit of Measure behavior
|
|
13
|
+
- Reporting segmentation
|
|
14
|
+
|
|
15
|
+
This module only provides the classification structure.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Cyril JEANNERET \<<cyril.jeanneret@camptocamp.com>\>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This module provides the classification structure for res_partner.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
|
2
|
+
access_partner_classification_user,partner_classification_user,model_res_partner_classification,base.group_user,1,0,0,0
|
|
3
|
+
access_partner_classification_manager,partner_classification_manager,model_res_partner_classification,base.group_partner_manager,1,1,1,1
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo noupdate="1">
|
|
3
|
+
<record id="res_partner_classification_multi_company_rule" model="ir.rule">
|
|
4
|
+
<field name="name">Partner Classification multi-company</field>
|
|
5
|
+
<field name="model_id" ref="model_res_partner_classification" />
|
|
6
|
+
<field name="global" eval="True" />
|
|
7
|
+
<field name="domain_force">
|
|
8
|
+
['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]
|
|
9
|
+
</field>
|
|
10
|
+
</record>
|
|
11
|
+
</odoo>
|
|
Binary file
|
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
+
<title>README.rst</title>
|
|
7
|
+
<style type="text/css">
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
:Author: David Goodger (goodger@python.org)
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
12
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
|
13
|
+
|
|
14
|
+
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
|
+
|
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
|
+
customize this style sheet.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* used to remove borders from tables and images */
|
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
|
23
|
+
border: 0 }
|
|
24
|
+
|
|
25
|
+
table.borderless td, table.borderless th {
|
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
|
27
|
+
The right padding separates the table cells. */
|
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
|
29
|
+
|
|
30
|
+
.first {
|
|
31
|
+
/* Override more specific margin styles with "! important". */
|
|
32
|
+
margin-top: 0 ! important }
|
|
33
|
+
|
|
34
|
+
.last, .with-subtitle {
|
|
35
|
+
margin-bottom: 0 ! important }
|
|
36
|
+
|
|
37
|
+
.hidden {
|
|
38
|
+
display: none }
|
|
39
|
+
|
|
40
|
+
.subscript {
|
|
41
|
+
vertical-align: sub;
|
|
42
|
+
font-size: smaller }
|
|
43
|
+
|
|
44
|
+
.superscript {
|
|
45
|
+
vertical-align: super;
|
|
46
|
+
font-size: smaller }
|
|
47
|
+
|
|
48
|
+
a.toc-backref {
|
|
49
|
+
text-decoration: none ;
|
|
50
|
+
color: black }
|
|
51
|
+
|
|
52
|
+
blockquote.epigraph {
|
|
53
|
+
margin: 2em 5em ; }
|
|
54
|
+
|
|
55
|
+
dl.docutils dd {
|
|
56
|
+
margin-bottom: 0.5em }
|
|
57
|
+
|
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
63
|
+
dl.docutils dt {
|
|
64
|
+
font-weight: bold }
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
div.abstract {
|
|
68
|
+
margin: 2em 5em }
|
|
69
|
+
|
|
70
|
+
div.abstract p.topic-title {
|
|
71
|
+
font-weight: bold ;
|
|
72
|
+
text-align: center }
|
|
73
|
+
|
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
|
76
|
+
margin: 2em ;
|
|
77
|
+
border: medium outset ;
|
|
78
|
+
padding: 1em }
|
|
79
|
+
|
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
|
82
|
+
div.tip p.admonition-title {
|
|
83
|
+
font-weight: bold ;
|
|
84
|
+
font-family: sans-serif }
|
|
85
|
+
|
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
|
88
|
+
div.warning p.admonition-title, .code .error {
|
|
89
|
+
color: red ;
|
|
90
|
+
font-weight: bold ;
|
|
91
|
+
font-family: sans-serif }
|
|
92
|
+
|
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
94
|
+
compound paragraphs.
|
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
|
96
|
+
margin-bottom: 0.5em }
|
|
97
|
+
|
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
|
99
|
+
margin-top: 0.5em }
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
div.dedication {
|
|
103
|
+
margin: 2em 5em ;
|
|
104
|
+
text-align: center ;
|
|
105
|
+
font-style: italic }
|
|
106
|
+
|
|
107
|
+
div.dedication p.topic-title {
|
|
108
|
+
font-weight: bold ;
|
|
109
|
+
font-style: normal }
|
|
110
|
+
|
|
111
|
+
div.figure {
|
|
112
|
+
margin-left: 2em ;
|
|
113
|
+
margin-right: 2em }
|
|
114
|
+
|
|
115
|
+
div.footer, div.header {
|
|
116
|
+
clear: both;
|
|
117
|
+
font-size: smaller }
|
|
118
|
+
|
|
119
|
+
div.line-block {
|
|
120
|
+
display: block ;
|
|
121
|
+
margin-top: 1em ;
|
|
122
|
+
margin-bottom: 1em }
|
|
123
|
+
|
|
124
|
+
div.line-block div.line-block {
|
|
125
|
+
margin-top: 0 ;
|
|
126
|
+
margin-bottom: 0 ;
|
|
127
|
+
margin-left: 1.5em }
|
|
128
|
+
|
|
129
|
+
div.sidebar {
|
|
130
|
+
margin: 0 0 0.5em 1em ;
|
|
131
|
+
border: medium outset ;
|
|
132
|
+
padding: 1em ;
|
|
133
|
+
background-color: #ffffee ;
|
|
134
|
+
width: 40% ;
|
|
135
|
+
float: right ;
|
|
136
|
+
clear: right }
|
|
137
|
+
|
|
138
|
+
div.sidebar p.rubric {
|
|
139
|
+
font-family: sans-serif ;
|
|
140
|
+
font-size: medium }
|
|
141
|
+
|
|
142
|
+
div.system-messages {
|
|
143
|
+
margin: 5em }
|
|
144
|
+
|
|
145
|
+
div.system-messages h1 {
|
|
146
|
+
color: red }
|
|
147
|
+
|
|
148
|
+
div.system-message {
|
|
149
|
+
border: medium outset ;
|
|
150
|
+
padding: 1em }
|
|
151
|
+
|
|
152
|
+
div.system-message p.system-message-title {
|
|
153
|
+
color: red ;
|
|
154
|
+
font-weight: bold }
|
|
155
|
+
|
|
156
|
+
div.topic {
|
|
157
|
+
margin: 2em }
|
|
158
|
+
|
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
161
|
+
margin-top: 0.4em }
|
|
162
|
+
|
|
163
|
+
h1.title {
|
|
164
|
+
text-align: center }
|
|
165
|
+
|
|
166
|
+
h2.subtitle {
|
|
167
|
+
text-align: center }
|
|
168
|
+
|
|
169
|
+
hr.docutils {
|
|
170
|
+
width: 75% }
|
|
171
|
+
|
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
|
173
|
+
clear: left ;
|
|
174
|
+
float: left ;
|
|
175
|
+
margin-right: 1em }
|
|
176
|
+
|
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
|
178
|
+
clear: right ;
|
|
179
|
+
float: right ;
|
|
180
|
+
margin-left: 1em }
|
|
181
|
+
|
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
|
183
|
+
display: block;
|
|
184
|
+
margin-left: auto;
|
|
185
|
+
margin-right: auto;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
table.align-center {
|
|
189
|
+
margin-left: auto;
|
|
190
|
+
margin-right: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.align-left {
|
|
194
|
+
text-align: left }
|
|
195
|
+
|
|
196
|
+
.align-center {
|
|
197
|
+
clear: both ;
|
|
198
|
+
text-align: center }
|
|
199
|
+
|
|
200
|
+
.align-right {
|
|
201
|
+
text-align: right }
|
|
202
|
+
|
|
203
|
+
/* reset inner alignment in figures */
|
|
204
|
+
div.align-right {
|
|
205
|
+
text-align: inherit }
|
|
206
|
+
|
|
207
|
+
/* div.align-center * { */
|
|
208
|
+
/* text-align: left } */
|
|
209
|
+
|
|
210
|
+
.align-top {
|
|
211
|
+
vertical-align: top }
|
|
212
|
+
|
|
213
|
+
.align-middle {
|
|
214
|
+
vertical-align: middle }
|
|
215
|
+
|
|
216
|
+
.align-bottom {
|
|
217
|
+
vertical-align: bottom }
|
|
218
|
+
|
|
219
|
+
ol.simple, ul.simple {
|
|
220
|
+
margin-bottom: 1em }
|
|
221
|
+
|
|
222
|
+
ol.arabic {
|
|
223
|
+
list-style: decimal }
|
|
224
|
+
|
|
225
|
+
ol.loweralpha {
|
|
226
|
+
list-style: lower-alpha }
|
|
227
|
+
|
|
228
|
+
ol.upperalpha {
|
|
229
|
+
list-style: upper-alpha }
|
|
230
|
+
|
|
231
|
+
ol.lowerroman {
|
|
232
|
+
list-style: lower-roman }
|
|
233
|
+
|
|
234
|
+
ol.upperroman {
|
|
235
|
+
list-style: upper-roman }
|
|
236
|
+
|
|
237
|
+
p.attribution {
|
|
238
|
+
text-align: right ;
|
|
239
|
+
margin-left: 50% }
|
|
240
|
+
|
|
241
|
+
p.caption {
|
|
242
|
+
font-style: italic }
|
|
243
|
+
|
|
244
|
+
p.credits {
|
|
245
|
+
font-style: italic ;
|
|
246
|
+
font-size: smaller }
|
|
247
|
+
|
|
248
|
+
p.label {
|
|
249
|
+
white-space: nowrap }
|
|
250
|
+
|
|
251
|
+
p.rubric {
|
|
252
|
+
font-weight: bold ;
|
|
253
|
+
font-size: larger ;
|
|
254
|
+
color: maroon ;
|
|
255
|
+
text-align: center }
|
|
256
|
+
|
|
257
|
+
p.sidebar-title {
|
|
258
|
+
font-family: sans-serif ;
|
|
259
|
+
font-weight: bold ;
|
|
260
|
+
font-size: larger }
|
|
261
|
+
|
|
262
|
+
p.sidebar-subtitle {
|
|
263
|
+
font-family: sans-serif ;
|
|
264
|
+
font-weight: bold }
|
|
265
|
+
|
|
266
|
+
p.topic-title {
|
|
267
|
+
font-weight: bold }
|
|
268
|
+
|
|
269
|
+
pre.address {
|
|
270
|
+
margin-bottom: 0 ;
|
|
271
|
+
margin-top: 0 ;
|
|
272
|
+
font: inherit }
|
|
273
|
+
|
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
275
|
+
margin-left: 2em ;
|
|
276
|
+
margin-right: 2em }
|
|
277
|
+
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
286
|
+
|
|
287
|
+
span.classifier {
|
|
288
|
+
font-family: sans-serif ;
|
|
289
|
+
font-style: oblique }
|
|
290
|
+
|
|
291
|
+
span.classifier-delimiter {
|
|
292
|
+
font-family: sans-serif ;
|
|
293
|
+
font-weight: bold }
|
|
294
|
+
|
|
295
|
+
span.interpreted {
|
|
296
|
+
font-family: sans-serif }
|
|
297
|
+
|
|
298
|
+
span.option {
|
|
299
|
+
white-space: nowrap }
|
|
300
|
+
|
|
301
|
+
span.pre {
|
|
302
|
+
white-space: pre }
|
|
303
|
+
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
|
+
color: red }
|
|
306
|
+
|
|
307
|
+
span.section-subtitle {
|
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
|
309
|
+
font-size: 80% }
|
|
310
|
+
|
|
311
|
+
table.citation {
|
|
312
|
+
border-left: solid 1px gray;
|
|
313
|
+
margin-left: 1px }
|
|
314
|
+
|
|
315
|
+
table.docinfo {
|
|
316
|
+
margin: 2em 4em }
|
|
317
|
+
|
|
318
|
+
table.docutils {
|
|
319
|
+
margin-top: 0.5em ;
|
|
320
|
+
margin-bottom: 0.5em }
|
|
321
|
+
|
|
322
|
+
table.footnote {
|
|
323
|
+
border-left: solid 1px black;
|
|
324
|
+
margin-left: 1px }
|
|
325
|
+
|
|
326
|
+
table.docutils td, table.docutils th,
|
|
327
|
+
table.docinfo td, table.docinfo th {
|
|
328
|
+
padding-left: 0.5em ;
|
|
329
|
+
padding-right: 0.5em ;
|
|
330
|
+
vertical-align: top }
|
|
331
|
+
|
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
333
|
+
font-weight: bold ;
|
|
334
|
+
text-align: left ;
|
|
335
|
+
white-space: nowrap ;
|
|
336
|
+
padding-left: 0 }
|
|
337
|
+
|
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
|
339
|
+
table.docutils.booktabs {
|
|
340
|
+
border: 0px;
|
|
341
|
+
border-top: 2px solid;
|
|
342
|
+
border-bottom: 2px solid;
|
|
343
|
+
border-collapse: collapse;
|
|
344
|
+
}
|
|
345
|
+
table.docutils.booktabs * {
|
|
346
|
+
border: 0px;
|
|
347
|
+
}
|
|
348
|
+
table.docutils.booktabs th {
|
|
349
|
+
border-bottom: thin solid;
|
|
350
|
+
text-align: left;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
355
|
+
font-size: 100% }
|
|
356
|
+
|
|
357
|
+
ul.auto-toc {
|
|
358
|
+
list-style-type: none }
|
|
359
|
+
|
|
360
|
+
</style>
|
|
361
|
+
</head>
|
|
362
|
+
<body>
|
|
363
|
+
<div class="document">
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="partner-classification">
|
|
370
|
+
<h1>Partner Classification</h1>
|
|
371
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
372
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
373
|
+
!! changes will be overwritten. !!
|
|
374
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
375
|
+
!! source digest: sha256:c0814f1809e0e70644732315bf37e636340fbe6a4843e13cb14379e8a2c59700
|
|
376
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
377
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/partner-contact/tree/19.0/partner_classification"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-partner_classification"><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/partner-contact&target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
|
+
<p>This module provides the classification structure for res_partner.</p>
|
|
379
|
+
<p><strong>Table of contents</strong></p>
|
|
380
|
+
<div class="contents local topic" id="contents">
|
|
381
|
+
<ul class="simple">
|
|
382
|
+
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
|
|
383
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
|
384
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
|
385
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
|
386
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
|
387
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
|
388
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
|
389
|
+
</ul>
|
|
390
|
+
</li>
|
|
391
|
+
</ul>
|
|
392
|
+
</div>
|
|
393
|
+
<div class="section" id="use-cases-context">
|
|
394
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h2>
|
|
395
|
+
<p>Organizations often need to assign customers to a single, well-defined
|
|
396
|
+
segment, such as:</p>
|
|
397
|
+
<ul class="simple">
|
|
398
|
+
<li>Specialist Retailer</li>
|
|
399
|
+
<li>DIY</li>
|
|
400
|
+
<li>Online</li>
|
|
401
|
+
<li>Export</li>
|
|
402
|
+
</ul>
|
|
403
|
+
<p>This classification acts as a control key for downstream logic such as:</p>
|
|
404
|
+
<ul class="simple">
|
|
405
|
+
<li>Pricing rules (e.g., EDI discounts)</li>
|
|
406
|
+
<li>Unit of Measure behavior</li>
|
|
407
|
+
<li>Reporting segmentation</li>
|
|
408
|
+
</ul>
|
|
409
|
+
<p>This module only provides the classification structure.</p>
|
|
410
|
+
</div>
|
|
411
|
+
<div class="section" id="usage">
|
|
412
|
+
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
|
|
413
|
+
<p>Assign a classification on a partner. The value will propagate to all
|
|
414
|
+
contacts under the same commercial entity.</p>
|
|
415
|
+
<p>Go to:</p>
|
|
416
|
+
<p>Contacts → Configuration → Classifications</p>
|
|
417
|
+
<p>Create classification records as needed.</p>
|
|
418
|
+
</div>
|
|
419
|
+
<div class="section" id="bug-tracker">
|
|
420
|
+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
|
|
421
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>.
|
|
422
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
423
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
424
|
+
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_classification%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
425
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
426
|
+
</div>
|
|
427
|
+
<div class="section" id="credits">
|
|
428
|
+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
|
|
429
|
+
<div class="section" id="authors">
|
|
430
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
|
|
431
|
+
<ul class="simple">
|
|
432
|
+
<li>Camptocamp</li>
|
|
433
|
+
</ul>
|
|
434
|
+
</div>
|
|
435
|
+
<div class="section" id="contributors">
|
|
436
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
|
|
437
|
+
<ul class="simple">
|
|
438
|
+
<li>Cyril JEANNERET <<a class="reference external" href="mailto:cyril.jeanneret@camptocamp.com">cyril.jeanneret@camptocamp.com</a>></li>
|
|
439
|
+
</ul>
|
|
440
|
+
</div>
|
|
441
|
+
<div class="section" id="maintainers">
|
|
442
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
|
|
443
|
+
<p>This module is maintained by the OCA.</p>
|
|
444
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
445
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
446
|
+
</a>
|
|
447
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
448
|
+
mission is to support the collaborative development of Odoo features and
|
|
449
|
+
promote its widespread use.</p>
|
|
450
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/19.0/partner_classification">OCA/partner-contact</a> project on GitHub.</p>
|
|
451
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
</body>
|
|
457
|
+
</html>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Copyright 2026 Camptocamp SA (https://www.camptocamp.com).
|
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
from odoo.tests.common import TransactionCase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TestPartnerClassification(TransactionCase):
|
|
9
|
+
def setUp(self):
|
|
10
|
+
super().setUp()
|
|
11
|
+
self.Classification = self.env["res.partner.classification"]
|
|
12
|
+
self.Partner = self.env["res.partner"]
|
|
13
|
+
|
|
14
|
+
self.class_a = self.Classification.create(
|
|
15
|
+
{
|
|
16
|
+
"name": "Specialist Retailer",
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
def test_commercial_field_propagation(self):
|
|
21
|
+
company = self.Partner.create(
|
|
22
|
+
{
|
|
23
|
+
"name": "Parent Company",
|
|
24
|
+
"classification_id": self.class_a.id,
|
|
25
|
+
"is_company": True,
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
contact = self.Partner.create(
|
|
30
|
+
{
|
|
31
|
+
"name": "Child Contact",
|
|
32
|
+
"parent_id": company.id,
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
self.assertEqual(
|
|
37
|
+
contact.classification_id,
|
|
38
|
+
self.class_a,
|
|
39
|
+
"Classification should propagate to child contacts",
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def test_change_propagation(self):
|
|
43
|
+
company = self.Partner.create(
|
|
44
|
+
{
|
|
45
|
+
"name": "Company",
|
|
46
|
+
"is_company": True,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
contact = self.Partner.create(
|
|
51
|
+
{
|
|
52
|
+
"name": "Contact",
|
|
53
|
+
"parent_id": company.id,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
company.classification_id = self.class_a
|
|
58
|
+
|
|
59
|
+
self.assertEqual(
|
|
60
|
+
contact.classification_id,
|
|
61
|
+
self.class_a,
|
|
62
|
+
"Updating parent should propagate classification",
|
|
63
|
+
)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<!--
|
|
3
|
+
Copyright 2026 Camptocamp SA (https://www.camptocamp.com).
|
|
4
|
+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
5
|
+
-->
|
|
6
|
+
<odoo>
|
|
7
|
+
<record id="view_partner_classification_list" model="ir.ui.view">
|
|
8
|
+
<field name="name">res.partner.classification.list</field>
|
|
9
|
+
<field name="model">res.partner.classification</field>
|
|
10
|
+
<field name="arch" type="xml">
|
|
11
|
+
<list>
|
|
12
|
+
<field name="name" />
|
|
13
|
+
<field name="code" />
|
|
14
|
+
<field name="company_id" groups="base.group_multi_company" />
|
|
15
|
+
</list>
|
|
16
|
+
</field>
|
|
17
|
+
</record>
|
|
18
|
+
|
|
19
|
+
<record id="view_partner_classification_form" model="ir.ui.view">
|
|
20
|
+
<field name="name">res.partner.classification.form</field>
|
|
21
|
+
<field name="model">res.partner.classification</field>
|
|
22
|
+
<field name="arch" type="xml">
|
|
23
|
+
<form>
|
|
24
|
+
<sheet>
|
|
25
|
+
<widget
|
|
26
|
+
name="web_ribbon"
|
|
27
|
+
title="Archived"
|
|
28
|
+
bg_color="bg-danger"
|
|
29
|
+
invisible="active"
|
|
30
|
+
/>
|
|
31
|
+
<group>
|
|
32
|
+
<field name="name" />
|
|
33
|
+
<field name="code" />
|
|
34
|
+
<field name="company_id" groups="base.group_multi_company" />
|
|
35
|
+
<field name="active" />
|
|
36
|
+
</group>
|
|
37
|
+
</sheet>
|
|
38
|
+
</form>
|
|
39
|
+
</field>
|
|
40
|
+
</record>
|
|
41
|
+
|
|
42
|
+
<record id="view_partner_classification_search" model="ir.ui.view">
|
|
43
|
+
<field name="name">res.partner.classification.search</field>
|
|
44
|
+
<field name="model">res.partner.classification</field>
|
|
45
|
+
<field name="type">search</field>
|
|
46
|
+
<field name="arch" type="xml">
|
|
47
|
+
<search string="Partner Classifications">
|
|
48
|
+
<field name="name" />
|
|
49
|
+
<field name="code" />
|
|
50
|
+
<field name="company_id" />
|
|
51
|
+
|
|
52
|
+
<filter
|
|
53
|
+
string="Archived"
|
|
54
|
+
name="inactive"
|
|
55
|
+
domain="[('active','=',False)]"
|
|
56
|
+
help="Show archived"
|
|
57
|
+
/>
|
|
58
|
+
</search>
|
|
59
|
+
</field>
|
|
60
|
+
</record>
|
|
61
|
+
<record id="action_partner_classification" model="ir.actions.act_window">
|
|
62
|
+
<field name="name">Partner Classifications</field>
|
|
63
|
+
<field name="res_model">res.partner.classification</field>
|
|
64
|
+
<field name="view_mode">list,form</field>
|
|
65
|
+
<field name="search_view_id" ref="view_partner_classification_search" />
|
|
66
|
+
</record>
|
|
67
|
+
|
|
68
|
+
<menuitem
|
|
69
|
+
id="res_partner_classification_menu"
|
|
70
|
+
name="Classifications"
|
|
71
|
+
parent="contacts.res_partner_menu_config"
|
|
72
|
+
action="action_partner_classification"
|
|
73
|
+
sequence="4"
|
|
74
|
+
/>
|
|
75
|
+
</odoo>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<!--
|
|
3
|
+
Copyright 2026 Camptocamp SA (https://www.camptocamp.com).
|
|
4
|
+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
5
|
+
-->
|
|
6
|
+
<odoo>
|
|
7
|
+
<record id="view_partner_form_inherit" model="ir.ui.view">
|
|
8
|
+
<field name="name">res.partner.form.inherit</field>
|
|
9
|
+
<field name="model">res.partner</field>
|
|
10
|
+
<field name="inherit_id" ref="base.view_partner_form" />
|
|
11
|
+
<field name="arch" type="xml">
|
|
12
|
+
<xpath
|
|
13
|
+
expr="//page[@name='sales_purchases']//group[@name='misc']/field[@name='industry_id']"
|
|
14
|
+
position="after"
|
|
15
|
+
>
|
|
16
|
+
<field name="classification_id" />
|
|
17
|
+
</xpath>
|
|
18
|
+
</field>
|
|
19
|
+
</record>
|
|
20
|
+
</odoo>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: odoo-addon-partner_classification
|
|
3
|
+
Version: 19.0.1.0.0.2
|
|
4
|
+
Requires-Dist: odoo==19.0.*
|
|
5
|
+
Summary: Structured partner classification (alternative to tags)
|
|
6
|
+
Home-page: https://github.com/OCA/partner-contact
|
|
7
|
+
License: AGPL-3
|
|
8
|
+
Author: Camptocamp, Odoo Community Association (OCA)
|
|
9
|
+
Author-email: support@odoo-community.org
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Framework :: Odoo
|
|
12
|
+
Classifier: Framework :: Odoo :: 19.0
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
14
|
+
Description-Content-Type: text/x-rst
|
|
15
|
+
|
|
16
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
17
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
18
|
+
:alt: Odoo Community Association
|
|
19
|
+
|
|
20
|
+
======================
|
|
21
|
+
Partner Classification
|
|
22
|
+
======================
|
|
23
|
+
|
|
24
|
+
..
|
|
25
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
+
!! This file is generated by oca-gen-addon-readme !!
|
|
27
|
+
!! changes will be overwritten. !!
|
|
28
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
29
|
+
!! source digest: sha256:c0814f1809e0e70644732315bf37e636340fbe6a4843e13cb14379e8a2c59700
|
|
30
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
31
|
+
|
|
32
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
33
|
+
:target: https://odoo-community.org/page/development-status
|
|
34
|
+
:alt: Beta
|
|
35
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
36
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
37
|
+
:alt: License: AGPL-3
|
|
38
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
|
|
39
|
+
:target: https://github.com/OCA/partner-contact/tree/19.0/partner_classification
|
|
40
|
+
:alt: OCA/partner-contact
|
|
41
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
|
42
|
+
:target: https://translation.odoo-community.org/projects/partner-contact-19-0/partner-contact-19-0-partner_classification
|
|
43
|
+
:alt: Translate me on Weblate
|
|
44
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
|
45
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/partner-contact&target_branch=19.0
|
|
46
|
+
:alt: Try me on Runboat
|
|
47
|
+
|
|
48
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|
49
|
+
|
|
50
|
+
This module provides the classification structure for res_partner.
|
|
51
|
+
|
|
52
|
+
**Table of contents**
|
|
53
|
+
|
|
54
|
+
.. contents::
|
|
55
|
+
:local:
|
|
56
|
+
|
|
57
|
+
Use Cases / Context
|
|
58
|
+
===================
|
|
59
|
+
|
|
60
|
+
Organizations often need to assign customers to a single, well-defined
|
|
61
|
+
segment, such as:
|
|
62
|
+
|
|
63
|
+
- Specialist Retailer
|
|
64
|
+
- DIY
|
|
65
|
+
- Online
|
|
66
|
+
- Export
|
|
67
|
+
|
|
68
|
+
This classification acts as a control key for downstream logic such as:
|
|
69
|
+
|
|
70
|
+
- Pricing rules (e.g., EDI discounts)
|
|
71
|
+
- Unit of Measure behavior
|
|
72
|
+
- Reporting segmentation
|
|
73
|
+
|
|
74
|
+
This module only provides the classification structure.
|
|
75
|
+
|
|
76
|
+
Usage
|
|
77
|
+
=====
|
|
78
|
+
|
|
79
|
+
Assign a classification on a partner. The value will propagate to all
|
|
80
|
+
contacts under the same commercial entity.
|
|
81
|
+
|
|
82
|
+
Go to:
|
|
83
|
+
|
|
84
|
+
Contacts → Configuration → Classifications
|
|
85
|
+
|
|
86
|
+
Create classification records as needed.
|
|
87
|
+
|
|
88
|
+
Bug Tracker
|
|
89
|
+
===========
|
|
90
|
+
|
|
91
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_.
|
|
92
|
+
In case of trouble, please check there if your issue has already been reported.
|
|
93
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
94
|
+
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_classification%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
|
95
|
+
|
|
96
|
+
Do not contact contributors directly about support or help with technical issues.
|
|
97
|
+
|
|
98
|
+
Credits
|
|
99
|
+
=======
|
|
100
|
+
|
|
101
|
+
Authors
|
|
102
|
+
-------
|
|
103
|
+
|
|
104
|
+
* Camptocamp
|
|
105
|
+
|
|
106
|
+
Contributors
|
|
107
|
+
------------
|
|
108
|
+
|
|
109
|
+
- Cyril JEANNERET <cyril.jeanneret@camptocamp.com>
|
|
110
|
+
|
|
111
|
+
Maintainers
|
|
112
|
+
-----------
|
|
113
|
+
|
|
114
|
+
This module is maintained by the OCA.
|
|
115
|
+
|
|
116
|
+
.. image:: https://odoo-community.org/logo.png
|
|
117
|
+
:alt: Odoo Community Association
|
|
118
|
+
:target: https://odoo-community.org
|
|
119
|
+
|
|
120
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
121
|
+
mission is to support the collaborative development of Odoo features and
|
|
122
|
+
promote its widespread use.
|
|
123
|
+
|
|
124
|
+
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/19.0/partner_classification>`_ project on GitHub.
|
|
125
|
+
|
|
126
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
odoo/addons/partner_classification/README.rst,sha256=q7Sbw1y5mZ8XomoNxsd2spXGXf_m2gXAv36Nvn8-rvM,3699
|
|
2
|
+
odoo/addons/partner_classification/__init__.py,sha256=X9EJGOE2GtZbS0G82PtSXmWSZ_R8jEM0rlJTDliQjp4,21
|
|
3
|
+
odoo/addons/partner_classification/__manifest__.py,sha256=7R0Wlrz3k2JSR8GLXCovve2Vz4KdRAfpJLoaX5ZdWsU,675
|
|
4
|
+
odoo/addons/partner_classification/i18n/partner_classification.pot,sha256=muunYWUjpZLGiTEYBnMiSm3JQSfiQ42aA63lyFK4au8,3823
|
|
5
|
+
odoo/addons/partner_classification/models/__init__.py,sha256=GpzOXp6MRBZKD8cecJjG5i2ip_-5BhNYrrRN_BPK7Lc,67
|
|
6
|
+
odoo/addons/partner_classification/models/res_partner.py,sha256=V7PORh3dL60hjmR0mVfx23MNUOZeAHkE6hxlJq_Fauk,495
|
|
7
|
+
odoo/addons/partner_classification/models/res_partner_classification.py,sha256=FW9F5lIN7yi4-jdw_YqhYEvpCl4egQBIGomR2VBR0wA,627
|
|
8
|
+
odoo/addons/partner_classification/readme/CONTEXT.md,sha256=_AH5-AEw57ZgC_S-UTuq6Rk0On4IsR0XZukiqle0UvQ,357
|
|
9
|
+
odoo/addons/partner_classification/readme/CONTRIBUTORS.md,sha256=vj5C3DR05KjRi_jwuoLWEmGUN99811yiNahTe3NiWuE,55
|
|
10
|
+
odoo/addons/partner_classification/readme/DESCRIPTION.md,sha256=tvK60L4AuS15QvjQ3xyZkwmn_ZMzz6lQsrq3eJRDVZc,66
|
|
11
|
+
odoo/addons/partner_classification/readme/USAGE.md,sha256=Tdqv_WZZbyJh51k3dC_l15uEsaXWMZg9T_-xKCzCurA,210
|
|
12
|
+
odoo/addons/partner_classification/security/ir.model.access.csv,sha256=dCtmqnnVJ4CTj_Xt8F5NgV_xVJBPWQzxwH7-p_QqSbM,334
|
|
13
|
+
odoo/addons/partner_classification/security/partner_classification_security.xml,sha256=7uujFZABs5VtSshE-dR2yuIw5IGrDqAYDGr-xbcFngk,485
|
|
14
|
+
odoo/addons/partner_classification/static/description/icon.png,sha256=CgnOEZCwoe6f1vlLwkqFVfc2q_uwBMU0UnXN8j6X5ag,10254
|
|
15
|
+
odoo/addons/partner_classification/static/description/index.html,sha256=E1DY9ZcaFFic_iz44Y26MJHTKmM0JVn8NbK3CrMVNVs,13572
|
|
16
|
+
odoo/addons/partner_classification/tests/test_partner_classification.py,sha256=--CkfP5uOqpCNOsDfT41i-cwL0W0VUrydVhuDk-_i8g,1667
|
|
17
|
+
odoo/addons/partner_classification/views/res_partner_classification_views.xml,sha256=hgHIctstzDTcgTI1pCUPT2Lrb74-fb8I7flwIsvswhc,2810
|
|
18
|
+
odoo/addons/partner_classification/views/res_partner_views.xml,sha256=tUPH-NUBFZcHHLQaRl4gTbyvNsWS7Prf6-NJVEQ741E,741
|
|
19
|
+
odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/METADATA,sha256=2b75FR_b461OGUdsgr76rArfBJ0T24Jo5FN4HFL2Lkk,4261
|
|
20
|
+
odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
|
|
21
|
+
odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
22
|
+
odoo_addon_partner_classification-19.0.1.0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
odoo
|