Browse Source

Execute _firstname_install when installing, and log it.

pull/104/head
Jairo Llopis 10 years ago
parent
commit
4b9ab2dfaa
  1. 1
      partner_firstname/__openerp__.py
  2. 5
      partner_firstname/models.py

1
partner_firstname/__openerp__.py

@ -30,6 +30,7 @@
'data': [ 'data': [
'views/res_partner.xml', 'views/res_partner.xml',
'views/res_user.xml', 'views/res_user.xml',
'data/res_partner.yml',
], ],
'demo': [], 'demo': [],
'test': [], 'test': [],

5
partner_firstname/models.py

@ -18,10 +18,14 @@
# You should have received a copy of the GNU Affero General Public License # 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/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
from openerp import api, fields, models from openerp import api, fields, models
from . import exceptions from . import exceptions
_logger = logging.getLogger(__name__)
class ResPartner(models.Model): class ResPartner(models.Model):
"""Adds last name and first name; name becomes a stored function field.""" """Adds last name and first name; name becomes a stored function field."""
_inherit = 'res.partner' _inherit = 'res.partner'
@ -100,3 +104,4 @@ class ResPartner(models.Model):
# Force calculations there # Force calculations there
records._name_inverse() records._name_inverse()
_logger.info("%d partners updated installing module.", len(records))
Loading…
Cancel
Save