[REN] namespace rename
This commit is contained in:
parent
24ea83c527
commit
ffd2140c92
@ -2934,7 +2934,7 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})):
|
|||||||
UTC-only and formatted according to
|
UTC-only and formatted according to
|
||||||
:const:`flectra.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and
|
:const:`flectra.tools.misc.DEFAULT_SERVER_DATE_FORMAT` and
|
||||||
:const:`flectra.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`
|
:const:`flectra.tools.misc.DEFAULT_SERVER_DATETIME_FORMAT`
|
||||||
* .. _openerp/models/relationals/format:
|
* .. _flectra/models/relationals/format:
|
||||||
|
|
||||||
:class:`~flectra.fields.One2many` and
|
:class:`~flectra.fields.One2many` and
|
||||||
:class:`~flectra.fields.Many2many` use a special "commands" format to
|
:class:`~flectra.fields.Many2many` use a special "commands" format to
|
||||||
|
@ -104,7 +104,7 @@ class configmanager(object):
|
|||||||
group = optparse.OptionGroup(parser, "Common options")
|
group = optparse.OptionGroup(parser, "Common options")
|
||||||
group.add_option("-c", "--config", dest="config", help="specify alternate config file")
|
group.add_option("-c", "--config", dest="config", help="specify alternate config file")
|
||||||
group.add_option("-s", "--save", action="store_true", dest="save", default=False,
|
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("-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",
|
group.add_option("-u", "--update", dest="update",
|
||||||
help="update one or more modules (comma-separated list, use \"all\" for all modules). Requires -d.")
|
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
|
""" Parse the configuration file (if any) and the command-line
|
||||||
arguments.
|
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
|
former should be removed in the furture) with library-wide
|
||||||
configuration values.
|
configuration values.
|
||||||
|
|
||||||
@ -375,10 +375,10 @@ class configmanager(object):
|
|||||||
rcfilepath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'flectra.conf')
|
rcfilepath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'flectra.conf')
|
||||||
else:
|
else:
|
||||||
rcfilepath = os.path.expanduser('~/.flectrarc')
|
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),
|
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'.")
|
"them, preferrably '.flectrarc'.")
|
||||||
|
|
||||||
if not os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath):
|
if not os.path.isfile(rcfilepath) and os.path.isfile(old_rcfilepath):
|
||||||
|
@ -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)
|
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):
|
def parse(self, de, mode=None):
|
||||||
roots = ['openerp','data','flectra']
|
roots = ['flectra','data','flectra']
|
||||||
if de.tag not in roots:
|
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:
|
for rec in de:
|
||||||
if rec.tag in roots:
|
if rec.tag in roots:
|
||||||
self.parse(rec, mode)
|
self.parse(rec, mode)
|
||||||
|
@ -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)
|
command_re = re.compile("^Set-([a-z]+) *: *(.+)$", re.I + re.UNICODE)
|
||||||
|
|
||||||
# Updated in 7.0 to match the model name as well
|
# 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
|
# 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)
|
reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?[^>]*@([^>]*)>", re.UNICODE)
|
||||||
discussion_re = re.compile("<.*-open(?:object|erp)-private[^>]*@([^>]*)>", 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:
|
except NotImplementedError:
|
||||||
rnd = random.random()
|
rnd = random.random()
|
||||||
rndstr = ("%.15f" % rnd)[2:]
|
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,
|
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,
|
attachments=None, message_id=None, references=None, openobject_id=False, debug=False, subtype='plain', headers=None,
|
||||||
|
@ -112,7 +112,7 @@ def profile(method=None, whitelist=None, blacklist=(None,), files=None,
|
|||||||
@profile(whitelist=['sale.order', 'ir.model.data'])
|
@profile(whitelist=['sale.order', 'ir.model.data'])
|
||||||
def action_quotation_send(self):
|
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):
|
def write(self):
|
||||||
...
|
...
|
||||||
|
|
||||||
|
@ -594,7 +594,7 @@ class YamlInterpreter(object):
|
|||||||
'uid': self.uid,
|
'uid': self.uid,
|
||||||
'log': self._log,
|
'log': self._log,
|
||||||
'context': self.context,
|
'context': self.context,
|
||||||
'openerp': flectra,
|
'flectra': flectra,
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
code_obj = compile(statements, self.filename, 'exec')
|
code_obj = compile(statements, self.filename, 'exec')
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
#
|
#
|
||||||
# For generic wsgi handlers a global application is defined.
|
# For generic wsgi handlers a global application is defined.
|
||||||
# For uwsgi this should work:
|
# 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.
|
# For gunicorn additional globals need to be defined in the Gunicorn section.
|
||||||
# Then the following command should run:
|
# 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
|
import flectra
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user