[REN] namespace rename

This commit is contained in:
Flectra 2018-01-17 23:18:42 -08:00
parent 24ea83c527
commit ffd2140c92
7 changed files with 13 additions and 13 deletions

View File

@ -2934,7 +2934,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
UTC-only and formatted according to
:const:`flectra.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and
:const:`flectra.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`
* .. _openerp/models/relationals/format:
* .. _flectra/models/relationals/format:
:class:`~flectra.fields.One2many` and
:class:`~flectra.fields.Many2many` use a special "commands" format to

View File

@ -104,7 +104,7 @@ class configmanager(object):
group = optparse.OptionGroup(parser, "Common options")
group.add_option("-c", "--config", dest="config", help="specify alternate config file")
group.add_option("-s", "--save", action="store_true", dest="save", default=False,
help="save configuration to ~/.flectrarc (or to ~/.openerp_serverrc if it exists)")
help="save configuration to ~/.flectrarc (or to ~/.flectra_serverrc if it exists)")
group.add_option("-i", "--init", dest="init", help="install one or more modules (comma-separated list, use \"all\" for all modules), requires -d")
group.add_option("-u", "--update", dest="update",
help="update one or more modules (comma-separated list, use \"all\" for all modules). Requires -d.")
@ -322,7 +322,7 @@ class configmanager(object):
""" Parse the configuration file (if any) and the command-line
arguments.
This method initializes flectra.tools.config and openerp.conf (the
This method initializes flectra.tools.config and flectra.conf (the
former should be removed in the furture) with library-wide
configuration values.
@ -375,10 +375,10 @@ class configmanager(object):
rcfilepath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'flectra.conf')
else:
rcfilepath = os.path.expanduser('~/.flectrarc')
old_rcfilepath = os.path.expanduser('~/.openerp_serverrc')
old_rcfilepath = os.path.expanduser('~/.flectra_serverrc')
die(os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath),
"Found '.flectrarc' and '.openerp_serverrc' in your path. Please keep only one of "\
"Found '.flectrarc' and '.flectra_serverrc' in your path. Please keep only one of "\
"them, preferrably '.flectrarc'.")
if not os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath):

View File

@ -730,9 +730,9 @@ form: module.record_id""" % (xml_id,)
return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
def parse(self, de, mode=None):
roots = ['openerp','data','flectra']
roots = ['flectra','data','flectra']
if de.tag not in roots:
raise Exception("Root xml tag must be <openerp>, <flectra> or <data>.")
raise Exception("Root xml tag must be <flectra>, <flectra> or <data>.")
for rec in de:
if rec.tag in roots:
self.parse(rec, mode)

View File

@ -419,7 +419,7 @@ single_email_re = re.compile(r"""^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6
command_re = re.compile("^Set-([a-z]+) *: *(.+)$", re.I + re.UNICODE)
# Updated in 7.0 to match the model name as well
# Typical form of references is <timestamp-openerp-record_id-model_name@domain>
# Typical form of references is <timestamp-flectra-record_id-model_name@domain>
# group(1) = the record ID ; group(2) = the model (if any) ; group(3) = the domain
reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?[^>]*@([^>]*)>", re.UNICODE)
discussion_re = re.compile("<.*-open(?:object|erp)-private[^>]*@([^>]*)>", re.UNICODE)
@ -438,7 +438,7 @@ def generate_tracking_message_id(res_id):
except NotImplementedError:
rnd = random.random()
rndstr = ("%.15f" % rnd)[2:]
return "<%s.%.15f-openerp-%s@%s>" % (rndstr, time.time(), res_id, socket.gethostname())
return "<%s.%.15f-flectra-%s@%s>" % (rndstr, time.time(), res_id, socket.gethostname())
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False,
attachments=None, message_id=None, references=None, openobject_id=False, debug=False, subtype='plain', headers=None,

View File

@ -112,7 +112,7 @@ def profile(method=None, whitelist=None, blacklist=(None,), files=None,
@profile(whitelist=['sale.order', 'ir.model.data'])
def action_quotation_send(self):
...
@profile(files=['/home/openerp/flectra/flectra/addons/sale/models/sale.py'])
@profile(files=['/home/flectra/flectra/flectra/addons/sale/models/sale.py'])
def write(self):
...

View File

@ -594,7 +594,7 @@ class YamlInterpreter(object):
'uid': self.uid,
'log': self._log,
'context': self.context,
'openerp': flectra,
'flectra': flectra,
}
try:
code_obj = compile(statements, self.filename, 'exec')

View File

@ -6,11 +6,11 @@
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file flectra-wsgi.py
#
# For gunicorn additional globals need to be defined in the Gunicorn section.
# Then the following command should run:
# $ gunicorn flectra:service.wsgi_server.application -c openerp-wsgi.py
# $ gunicorn flectra:service.wsgi_server.application -c flectra-wsgi.py
import flectra