Browse Source

[FIX] PR review's remarks

pull/287/head
ygol 6 years ago
parent
commit
f02801b112
  1. 1
      agreement/.#__manifest__.py
  2. 2
      agreement/__init__.py
  3. 2
      agreement/__manifest__.py
  4. 2
      agreement/models/__init__.py
  5. 5
      agreement/models/agreement.py
  6. 2
      agreement/readme/CONTRIBUTORS.rst
  7. 8
      agreement/readme/DESCRIPTION.rst
  8. 2
      agreement/views/agreement.xml

1
agreement/.#__manifest__.py

@ -0,0 +1 @@
ygol@ygol-S5000XVN.17507:1551704019

2
agreement/__init__.py

@ -1,3 +1 @@
# -*- coding: utf-8 -*-
from . import models

2
agreement/__manifest__.py

@ -9,7 +9,7 @@
'category': 'Contract',
'author': "Akretion,Odoo Community Association (OCA)",
'contributors': 'Yves Goldberg (Ygol InternetWork)',
'website': 'http://www.akretion.com',
'website': 'https://github.com/oca/contract',
'license': 'AGPL-3',
'depends': ['base'],
'data': [

2
agreement/models/__init__.py

@ -1,3 +1 @@
# -*- coding: utf-8 -*-
from . import agreement

5
agreement/models/agreement.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@ -15,10 +14,6 @@ class Agreement(models.Model):
partner_id = fields.Many2one(
'res.partner', string='Partner', ondelete='restrict', required=True,
domain=[('parent_id', '=', False)])
company_id = fields.Many2one(
'res.company', string='Company',
default=lambda self: self.env['res.company']._company_default_get(
'agreement'))
active = fields.Boolean(default=True)
signature_date = fields.Date()
start_date = fields.Date()

2
agreement/readme/CONTRIBUTORS.rst

@ -0,0 +1,2 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Yves Goldberg <yves@ygol.com>

8
agreement/readme/DESCRIPTION.rst

@ -0,0 +1,8 @@
This module adds an *Agreement* object with the following properties:
* code,
* name,
* link to a partner,
* signature date.
* start date.
* end date.

2
agreement/views/agreement.xml

@ -62,7 +62,7 @@
<separator/>
<filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
<group name="groupby">
<filter name="partner_groupby" string="Customer"
<filter name="partner_groupby" string="Partner"
context="{'group_by': 'partner_id'}"/>
<filter name="signature_date_groupby" string="Signature Date"
context="{'group_by': 'signature_date'}"/>

Loading…
Cancel
Save