mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[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:
@@ -11,7 +11,7 @@
|
|||||||
'Odoo Community Association (OCA)',
|
'Odoo Community Association (OCA)',
|
||||||
'website': 'https://github.com/oca/contract',
|
'website': 'https://github.com/oca/contract',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'depends': ['base'],
|
'depends': ['mail'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'security/agreement_security.xml',
|
'security/agreement_security.xml',
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ from odoo import models, fields
|
|||||||
class Agreement(models.Model):
|
class Agreement(models.Model):
|
||||||
_name = 'agreement'
|
_name = 'agreement'
|
||||||
_description = 'Agreement'
|
_description = 'Agreement'
|
||||||
|
_inherit = ["mail.thread", "mail.activity.mixin"]
|
||||||
|
|
||||||
code = fields.Char(required=True, copy=False)
|
code = fields.Char(required=True, copy=False)
|
||||||
name = fields.Char(required=True)
|
name = fields.Char(required=True)
|
||||||
|
|||||||
@@ -12,33 +12,40 @@
|
|||||||
<field name="model">agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreement">
|
<form string="Agreement">
|
||||||
<div class="oe_button_box" name="button_box">
|
<sheet>
|
||||||
<button name="toggle_active" type="object"
|
<div class="oe_button_box" name="button_box">
|
||||||
class="oe_stat_button" icon="fa-archive">
|
<button name="toggle_active" type="object"
|
||||||
<field name="active" widget="boolean_button"
|
class="oe_stat_button" icon="fa-archive">
|
||||||
options='{"terminology": "archive"}'/>
|
<field name="active" widget="boolean_button"
|
||||||
</button>
|
options='{"terminology": "archive"}'/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<group name="main">
|
||||||
|
<group name="left">
|
||||||
|
<field name="agreement_type_id"
|
||||||
|
groups="agreement.group_use_agreement_type"/>
|
||||||
|
<field name="is_template" groups="agreement.group_use_agreement_template"/>
|
||||||
|
<field name="partner_id"
|
||||||
|
attrs="{'required': [('is_template', '=', False)]}"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="signature_date"/>
|
||||||
|
</group>
|
||||||
|
<group name="right">
|
||||||
|
<field name="start_date"/>
|
||||||
|
<field name="end_date"/>
|
||||||
|
<field name="code"/>
|
||||||
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<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>
|
</div>
|
||||||
<group name="main">
|
|
||||||
<group name="left">
|
|
||||||
<field name="agreement_type_id"
|
|
||||||
groups="agreement.group_use_agreement_type"/>
|
|
||||||
<field name="is_template" groups="agreement.group_use_agreement_template"/>
|
|
||||||
<field name="partner_id"
|
|
||||||
attrs="{'required': [('is_template', '=', False)]}"/>
|
|
||||||
<field name="name"/>
|
|
||||||
<field name="signature_date"/>
|
|
||||||
</group>
|
|
||||||
<group name="right">
|
|
||||||
<field name="start_date"/>
|
|
||||||
<field name="end_date"/>
|
|
||||||
<field name="code"/>
|
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<notebook>
|
|
||||||
<page name="config" string="Configuration" attrs="{'invisible': True}"/>
|
|
||||||
</notebook>
|
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user