From 00b6564d4d387de3772e05c44914929c6713da6f Mon Sep 17 00:00:00 2001 From: Jos De Graeve Date: Tue, 2 Jun 2015 12:24:22 +0200 Subject: [PATCH] Some refactoring --- pos_require_customer/__init__.py | 3 +-- pos_require_customer/__openerp__.py | 2 +- pos_require_customer/{pos_require_customer.py => pos.py} | 7 ++----- .../{pos_require_customer_view.xml => pos_view.xml} | 0 4 files changed, 4 insertions(+), 8 deletions(-) rename pos_require_customer/{pos_require_customer.py => pos.py} (85%) rename pos_require_customer/{pos_require_customer_view.xml => pos_view.xml} (100%) diff --git a/pos_require_customer/__init__.py b/pos_require_customer/__init__.py index f076ffb4..bd229ae7 100644 --- a/pos_require_customer/__init__.py +++ b/pos_require_customer/__init__.py @@ -1,2 +1 @@ -__author__ = 'josdg' -import pos_require_customer +import pos diff --git a/pos_require_customer/__openerp__.py b/pos_require_customer/__openerp__.py index 56b36b65..aa5a546d 100644 --- a/pos_require_customer/__openerp__.py +++ b/pos_require_customer/__openerp__.py @@ -41,7 +41,7 @@ In the backend the customer field is required when needed. 'depends': ['point_of_sale'], 'data': [ 'static/src/xml/templates.xml', - 'pos_require_customer_view.xml', + 'pos_view.xml', ], 'demo': [ ], 'test': [ ], diff --git a/pos_require_customer/pos_require_customer.py b/pos_require_customer/pos.py similarity index 85% rename from pos_require_customer/pos_require_customer.py rename to pos_require_customer/pos.py index bf823754..4329f266 100644 --- a/pos_require_customer/pos_require_customer.py +++ b/pos_require_customer/pos.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). # Copyright (C) 2004-2014 Apertoso NV (). # # This program is free software: you can redistribute it and/or modify @@ -21,10 +19,9 @@ ############################################################################## import logging -from openerp import fields -from openerp.models import Model +from openerp import fields, models -class pos_config(Model): +class PosConfig(models.Model): _inherit = 'pos.config' require_customer = fields.Boolean( diff --git a/pos_require_customer/pos_require_customer_view.xml b/pos_require_customer/pos_view.xml similarity index 100% rename from pos_require_customer/pos_require_customer_view.xml rename to pos_require_customer/pos_view.xml