Browse Source

[ADD] Company Registry Module

pull/348/head
aschenkels-ictstudio 8 years ago
parent
commit
053bed9182
  1. 20
      partner_company_registry/__init__.py
  2. 36
      partner_company_registry/__openerp__.py
  3. 20
      partner_company_registry/models/__init__.py
  4. 30
      partner_company_registry/models/res_partner.py
  5. BIN
      partner_company_registry/static/description/icon.png
  6. 18
      partner_company_registry/views/res_partner.xml

20
partner_company_registry/__init__.py

@ -0,0 +1,20 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
#
# 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 models

36
partner_company_registry/__openerp__.py

@ -0,0 +1,36 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
#
# 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 Company Registry',
'version': '8.0.1.0.0',
'category': 'CRM',
'description': """Partner Company Registry
Adds a Partner Registry field to the partner object.
""",
'author': 'ICTSTUDIO, André Schenkels',
'license': 'AGPL-3',
'website': 'http://www.ictstudio.eu',
'depends': [
'base',
],
'data': [
'view/res_partner.xml',
],
}

20
partner_company_registry/models/__init__.py

@ -0,0 +1,20 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
#
# 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

30
partner_company_registry/models/res_partner.py

@ -0,0 +1,30 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ICTSTUDIO (<http://www.ictstudio.eu>).
#
# 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 import models, fields, api, _
import logging
_logger = logging.getLogger(__name__)
class ResPartner(models.Model):
_inherit = 'res.partner'
company_registry = fields.Char(string="Company Registry")

BIN
partner_company_registry/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 2.7 KiB

18
partner_company_registry/views/res_partner.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record model="ir.ui.view" id="view_partner_form_partner_company_registry">
<field name="name">partner.view.form.partner_company_registry</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="priority" eval="200"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='title']" position="after">
<field name="company_registry" attrs="{'invisible': [('is_company', '=', False)]}"/>
</xpath>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save