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.
T0424 FEAT: Add field to the tag to help identify them
We are adding some fields to give more information to the tag. The main 3 are the author, the department who use the tag and a description. We add those to all tag and show them in the list view. To add the department we need to add a new dependence the hr base module. We add a new value to the smart part of the tag. This new value give the possibility to give a end date to a tag. We had a cron who archive tag who are older than their valid date.
- Loading branch information
1 parent
a1c0d8f
commit bca29a4
Showing
9 changed files
with
66 additions
and
92 deletions.
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,26 +1,14 @@ | ||
<odoo> | ||
<record id="smart_tags_updater" model="ir.cron"> | ||
<field name="name">Smart Tags Updater</field> | ||
<field name="active" eval="True"/> | ||
<field name="user_id" ref="base.user_root"/> | ||
<field name="active" eval="True" /> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">weeks</field> | ||
<field name="numbercall">-1</field> | ||
<field name="doall">1</field> | ||
<field name="model_id" ref="model_res_partner_category"/> | ||
<field name="model_id" ref="model_res_partner_category" /> | ||
<field name="state">code</field> | ||
<field name="code">model.update_all_smart_tags()</field> | ||
</record> | ||
|
||
<record id="ir_cron_check_validity_dates" model="ir.cron"> | ||
<field name="name">Check Validity Dates</field> | ||
<field name="active" eval="True"/> | ||
<field name="user_id" ref="base.user_root"/> | ||
<field name="interval_number">1</field> | ||
<field name="interval_type">days</field> | ||
<field name="numbercall">-1</field> | ||
<field name="model_id" ref="model_res_partner_category"/> | ||
<field name="state">code</field> | ||
<field name="code">model._check_validity_dates()</field> | ||
</record> | ||
</odoo> |
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,4 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from . import res_partner_category | ||
from . import res_partner_category_extension | ||
|
||
from . import hr_department |
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,9 @@ | ||
# Copyright (C) 2019 Compassion CH (http://www.compassion.ch) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo import fields, models | ||
|
||
|
||
class ResPartnerCategoryExtension(models.Model): | ||
_inherit = "hr.department" | ||
|
||
tag_ids = fields.Many2many("res.partner.category") |
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
22 changes: 0 additions & 22 deletions
22
partner_tag_smart_assignation/models/res_partner_category_extension.py
This file was deleted.
Oops, something went wrong.
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
29 changes: 0 additions & 29 deletions
29
partner_tag_smart_assignation/views/res_partner_category_view_extension.xml
This file was deleted.
Oops, something went wrong.
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