openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #06925
[Merge] lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into lp:partner-contact-management
Nicolas Bessi - Camptocamp has proposed merging lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into lp:partner-contact-management.
Requested reviews:
Partner and Contact Core Editors (partner-contact-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/partner-contact-management/7.0-add_birthdate_nbi/+merge/220637
Add a simple module to add birthdate (in date format) on partner, contact form
--
https://code.launchpad.net/~camptocamp/partner-contact-management/7.0-add_birthdate_nbi/+merge/220637
Your team Partner and Contact Core Editors is requested to review the proposed merge of lp:~camptocamp/partner-contact-management/7.0-add_birthdate_nbi into lp:partner-contact-management.
=== added directory 'partner_birthdate'
=== added file 'partner_birthdate/__init__.py'
--- partner_birthdate/__init__.py 1970-01-01 00:00:00 +0000
+++ partner_birthdate/__init__.py 2014-05-22 13:00:53 +0000
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Nicolas Bessi
+# Copyright 2014 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from . import model
=== added file 'partner_birthdate/__openerp__.py'
--- partner_birthdate/__openerp__.py 1970-01-01 00:00:00 +0000
+++ partner_birthdate/__openerp__.py 2014-05-22 13:00:53 +0000
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Nicolas Bessi
+# Copyright 2014 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{'name': 'Partner birthdate',
+ 'version': '0.1',
+ 'author': 'Camptocamp',
+ 'maintainer': 'Camptocamp',
+ 'category': 'Partner',
+ 'complexity': 'easy',
+ 'depends': ['base'],
+ 'description': """Add a new birthday field (of type date not char) on contact form""",
+ 'website': 'http://www.camptocamp.com',
+ 'data': ['view/res_partner_view.xml'],
+ 'demo': [],
+ 'test': [],
+ 'installable': True,
+ 'auto_install': False,
+ 'license': 'AGPL-3',
+ 'application': False,
+ }
=== added directory 'partner_birthdate/model'
=== added file 'partner_birthdate/model/__init__.py'
--- partner_birthdate/model/__init__.py 1970-01-01 00:00:00 +0000
+++ partner_birthdate/model/__init__.py 2014-05-22 13:00:53 +0000
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Nicolas Bessi
+# Copyright 2014 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from . import res_partner
=== added file 'partner_birthdate/model/res_partner.py'
--- partner_birthdate/model/res_partner.py 1970-01-01 00:00:00 +0000
+++ partner_birthdate/model/res_partner.py 2014-05-22 13:00:53 +0000
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Author: Nicolas Bessi
+# Copyright 2014 Camptocamp SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from openerp.osv import orm, fields
+
+
+class res_partner(orm.Model):
+ """docstring"""
+
+ _inherit = "res.partner"
+ _columns = {
+ 'birthday_date': fields.date('Birthday'),
+ }
=== added directory 'partner_birthdate/view'
=== added file 'partner_birthdate/view/res_partner_view.xml'
--- partner_birthdate/view/res_partner_view.xml 1970-01-01 00:00:00 +0000
+++ partner_birthdate/view/res_partner_view.xml 2014-05-22 13:00:53 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="add_birthdate_in_main_view" model="ir.ui.view">
+ <field name="name">add birthdate in main view</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base.view_partner_form" />
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='child_ids']/form/sheet/group/field[@name='function']" position="after">
+ <field name="birthday_date"/>
+ </xpath>
+ <field name="function" position="after">
+ <field name="birthday_date"
+ attrs="{'invisible': [('is_company','=', True)]}"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="add_birthdate_in_simple_view" model="ir.ui.view">
+ <field name="name">add birthdate in main view</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base.view_partner_simple_form" />
+ <field name="arch" type="xml">
+ <field name="function" position="after">
+ <field name="birthday_date"
+ attrs="{'invisible': [('is_company','=', True)]}"/>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</openerp>
Follow ups