[IMP] agreement,agreement_legal: support activities

- The `agreement` model now features mail and activities from its base module.
- The `agreement_legal` module doesn't need to add mail support now.
- Add activities to form views.

@Tecnativa TT22477
This commit is contained in:
Jairo Llopis
2020-03-06 12:04:49 +00:00
committed by newtratip
parent 7b90b146b4
commit 08a789b72b
3 changed files with 35 additions and 27 deletions

View File

@@ -11,7 +11,7 @@
'Odoo Community Association (OCA)',
'website': 'https://github.com/oca/contract',
'license': 'AGPL-3',
'depends': ['base'],
'depends': ['mail'],
'data': [
'security/ir.model.access.csv',
'security/agreement_security.xml',

View File

@@ -8,6 +8,7 @@ from odoo import models, fields
class Agreement(models.Model):
_name = 'agreement'
_description = 'Agreement'
_inherit = ["mail.thread", "mail.activity.mixin"]
code = fields.Char(required=True, copy=False)
name = fields.Char(required=True)

View File

@@ -12,6 +12,7 @@
<field name="model">agreement</field>
<field name="arch" type="xml">
<form string="Agreement">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
@@ -39,6 +40,12 @@
<notebook>
<page name="config" string="Configuration" attrs="{'invisible': True}"/>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>