diff --git a/base_usability/__init__.py b/base_usability/__init__.py index 1a4d311..101105a 100644 --- a/base_usability/__init__.py +++ b/base_usability/__init__.py @@ -20,4 +20,4 @@ # ############################################################################## - +from . import partner diff --git a/base_usability/__openerp__.py b/base_usability/__openerp__.py index 18ba0b2..2ac5f22 100644 --- a/base_usability/__openerp__.py +++ b/base_usability/__openerp__.py @@ -39,7 +39,7 @@ This module replaces the module base_title_on_partner. """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['base'], + 'depends': ['base', 'mail'], 'data': [ 'partner_view.xml', 'security/ir.model.access.csv', diff --git a/base_usability/partner.py b/base_usability/partner.py new file mode 100644 index 0000000..c4866ae --- /dev/null +++ b/base_usability/partner.py @@ -0,0 +1,46 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Base Usability module for Odoo +# Copyright (C) 2015 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + +from openerp import models, fields + + +class Partner(models.Model): + _inherit = 'res.partner' + + name = fields.Char(track_visibility='onchange') + parent_id = fields.Many2one(track_visibility='onchange') + ref = fields.Char(track_visibility='onchange') + lang = fields.Selection(track_visibility='onchange') + user_id = fields.Many2one(track_visibility='onchange') + vat = fields.Char(track_visibility='onchange') + customer = fields.Boolean(track_visibility='onchange') + supplier = fields.Boolean(track_visibility='onchange') + type = fields.Selection(track_visibility='onchange') + street = fields.Char(track_visibility='onchange') + street2 = fields.Char(track_visibility='onchange') + zip = fields.Char(track_visibility='onchange') + city = fields.Char(track_visibility='onchange') + state_id = fields.Many2one(track_visibility='onchange') + country_id = fields.Many2one(track_visibility='onchange') + email = fields.Char(track_visibility='onchange') + is_company = fields.Boolean(track_visibility='onchange') + use_parent_address = fields.Boolean(track_visibility='onchange')