forked from OCA/partner-contact
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import res_partner_category | ||
from . import res_partner_category_extension | ||
|
10 changes: 10 additions & 0 deletions
10
partner_tag_smart_assignation/models/res_partner_category_extension.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResPartnerCategoryExtension(models.Model): | ||
_inherit = "res.partner.category" | ||
|
||
author_of_the_tag = fields.Char(string="Author") | ||
department_that_uses_the_tag = fields.Char(string="Department") | ||
description_of_the_tag = fields.Text(string="Description") | ||
is_unlimited_tag = fields.Boolean(string="Unlimited") |
29 changes: 29 additions & 0 deletions
29
partner_tag_smart_assignation/views/res_partner_category_view_extension.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<odoo> | ||
<record id="view_partner_category_form_inherit" model="ir.ui.view"> | ||
<field name="name">res.partner.category.form.inherited</field> | ||
<field name="model">res.partner.category</field> | ||
<field name="inherit_id" ref="base.view_partner_category_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='smart']" position="after"> | ||
<field name="author_of_the_tag"/> | ||
<field name="department_that_uses_the_tag"/> | ||
<field name="description_of_the_tag"/> | ||
<field name="is_unlimited_tag"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="view_partner_category_list_inherit" model="ir.ui.view"> | ||
<field name="name">res.partner.category.list.inherited</field> | ||
<field name="model">res.partner.category</field> | ||
<field name="inherit_id" ref="base.view_partner_category_list"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='smart']" position="after"> | ||
<field name="author_of_the_tag"/> | ||
<field name="department_that_uses_the_tag"/> | ||
<field name="description_of_the_tag"/> | ||
<field name="is_unlimited_tag"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |