[MERGE] Merged from the main trunk server branch.
bzr revid: ach@tinyerp.com-20100520050727-zdkp6mp65kmfm66o
This commit is contained in:
commit
67277f6f3d
|
@ -644,16 +644,13 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
|
||||||
try:
|
try:
|
||||||
_load_data(cr, module_name, id_map, mode, 'test')
|
_load_data(cr, module_name, id_map, mode, 'test')
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if tools.config.options['test-continue']:
|
logger.notifyChannel('ERROR', netsvc.LOG_TEST, e)
|
||||||
logger.notifyChannel('ERROR', netsvc.LOG_TEST, e)
|
pass
|
||||||
pass
|
|
||||||
else:
|
|
||||||
raise
|
|
||||||
finally:
|
finally:
|
||||||
if tools.config.options['test-rollback']:
|
if tools.config.options['test-commit']:
|
||||||
cr.rollback()
|
|
||||||
else:
|
|
||||||
cr.commit()
|
cr.commit()
|
||||||
|
else:
|
||||||
|
cr.rollback()
|
||||||
|
|
||||||
def _load_data(cr, module_name, id_map, mode, kind):
|
def _load_data(cr, module_name, id_map, mode, kind):
|
||||||
noupdate = (kind == 'demo')
|
noupdate = (kind == 'demo')
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
'module/module_report.xml',
|
'module/module_report.xml',
|
||||||
'res/res_request_view.xml',
|
'res/res_request_view.xml',
|
||||||
'res/res_lang_view.xml',
|
'res/res_lang_view.xml',
|
||||||
|
'res/res_log_view.xml',
|
||||||
'res/res_company_view.xml',
|
'res/res_company_view.xml',
|
||||||
'res/partner/partner_report.xml',
|
'res/partner/partner_report.xml',
|
||||||
'res/partner/partner_view.xml',
|
'res/partner/partner_view.xml',
|
|
@ -118,7 +118,7 @@
|
||||||
<separator string="Signature" colspan="2"/>
|
<separator string="Signature" colspan="2"/>
|
||||||
<field colspan="2" name="signature" nolabel="1"/>
|
<field colspan="2" name="signature" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group colspan="2" col="2">
|
<group colspan="2" col="2" expand="1">
|
||||||
<separator string="Access Rights (groups)" colspan="2"/>
|
<separator string="Access Rights (groups)" colspan="2"/>
|
||||||
<field colspan="2" nolabel="1" name="groups_id"/>
|
<field colspan="2" nolabel="1" name="groups_id"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
|
@ -1,52 +1,52 @@
|
||||||
"country_id:id","name","code"
|
"id","country_id:id","name","code"
|
||||||
us,"Alabama","AL"
|
state_us_1,us,"Alabama","AL"
|
||||||
us,"Alaska","AK"
|
state_us_2,us,"Alaska","AK"
|
||||||
us,"Arizona","AZ"
|
state_us_3,us,"Arizona","AZ"
|
||||||
us,"Arkansas","AR"
|
state_us_4,us,"Arkansas","AR"
|
||||||
us,"California","CA"
|
state_us_5,us,"California","CA"
|
||||||
us,"Colorado","CO"
|
state_us_6,us,"Colorado","CO"
|
||||||
us,"Connecticut","CT"
|
state_us_7,us,"Connecticut","CT"
|
||||||
us,"Delaware","DE"
|
state_us_8,us,"Delaware","DE"
|
||||||
us,"District of Columbia","DC"
|
state_us_9,us,"District of Columbia","DC"
|
||||||
us,"Florida","FL"
|
state_us_10,us,"Florida","FL"
|
||||||
us,"Georgia","GA"
|
state_us_11,us,"Georgia","GA"
|
||||||
us,"Hawaii","HI"
|
state_us_12,us,"Hawaii","HI"
|
||||||
us,"Idaho","ID"
|
state_us_13,us,"Idaho","ID"
|
||||||
us,"Illinois","IL"
|
state_us_14,us,"Illinois","IL"
|
||||||
us,"Indiana","IN"
|
state_us_15,us,"Indiana","IN"
|
||||||
us,"Iowa","IA"
|
state_us_16,us,"Iowa","IA"
|
||||||
us,"Kansas","KS"
|
state_us_17,us,"Kansas","KS"
|
||||||
us,"Kentucky","KY"
|
state_us_18,us,"Kentucky","KY"
|
||||||
us,"Louisiana","LA"
|
state_us_19,us,"Louisiana","LA"
|
||||||
us,"Maine","ME"
|
state_us_20,us,"Maine","ME"
|
||||||
us,"Montana","MT"
|
state_us_21,us,"Montana","MT"
|
||||||
us,"Nebraska","NE"
|
state_us_22,us,"Nebraska","NE"
|
||||||
us,"Nevada","NV"
|
state_us_23,us,"Nevada","NV"
|
||||||
us,"New Hampshire","NH"
|
state_us_24,us,"New Hampshire","NH"
|
||||||
us,"New Jersey","NJ"
|
state_us_25,us,"New Jersey","NJ"
|
||||||
us,"New Mexico","NM"
|
state_us_26,us,"New Mexico","NM"
|
||||||
us,"New York","NY"
|
state_us_27,us,"New York","NY"
|
||||||
us,"North Carolina","NC"
|
state_us_28,us,"North Carolina","NC"
|
||||||
us,"North Dakota","ND"
|
state_us_29,us,"North Dakota","ND"
|
||||||
us,"Ohio","OH"
|
state_us_30,us,"Ohio","OH"
|
||||||
us,"Oklahoma","OK"
|
state_us_31,us,"Oklahoma","OK"
|
||||||
us,"Oregon","OR"
|
state_us_32,us,"Oregon","OR"
|
||||||
us,"Maryland","MD"
|
state_us_33,us,"Maryland","MD"
|
||||||
us,"Massachusetts","MA"
|
state_us_34,us,"Massachusetts","MA"
|
||||||
us,"Michigan","MI"
|
state_us_35,us,"Michigan","MI"
|
||||||
us,"Minnesota","MN"
|
state_us_36,us,"Minnesota","MN"
|
||||||
us,"Mississippi","MS"
|
state_us_37,us,"Mississippi","MS"
|
||||||
us,"Missouri","MO"
|
state_us_38,us,"Missouri","MO"
|
||||||
us,"Pennsylvania","PA"
|
state_us_39,us,"Pennsylvania","PA"
|
||||||
us,"Rhode Island","RI"
|
state_us_40,us,"Rhode Island","RI"
|
||||||
us,"South Carolina","SC"
|
state_us_41,us,"South Carolina","SC"
|
||||||
us,"South Dakota","SD"
|
state_us_42,us,"South Dakota","SD"
|
||||||
us,"Tennessee","TN"
|
state_us_43,us,"Tennessee","TN"
|
||||||
us,"Texas","TX"
|
state_us_44,us,"Texas","TX"
|
||||||
us,"Utah","UT"
|
state_us_45,us,"Utah","UT"
|
||||||
us,"Vermont","VT"
|
state_us_46,us,"Vermont","VT"
|
||||||
us,"Virginia","VA"
|
state_us_47,us,"Virginia","VA"
|
||||||
us,"Washington","WA"
|
state_us_48,us,"Washington","WA"
|
||||||
us,"West Virginia","WV"
|
state_us_49,us,"West Virginia","WV"
|
||||||
us,"Wisconsin","WI"
|
state_us_50,us,"Wisconsin","WI"
|
||||||
us,"Wyoming","WY"
|
state_us_51,us,"Wyoming","WY"
|
||||||
|
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-05-17 05:29+0000\n"
|
"PO-Revision-Date: 2010-05-18 08:05+0000\n"
|
||||||
"Last-Translator: goranc <goranc@gmail.com>\n"
|
"Last-Translator: goranc <goranc@gmail.com>\n"
|
||||||
"Language-Team: openerp-translators\n"
|
"Language-Team: openerp-translators\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
"Language: hr\n"
|
"Language: hr\n"
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-server\n"
|
"Project-Id-Version: openobject-server\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-05-17 05:28+0000\n"
|
"PO-Revision-Date: 2010-05-18 08:03+0000\n"
|
||||||
"Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\n"
|
"Last-Translator: Harry (Open ERP) <hmo@tinyerp.com>\n"
|
||||||
"Language-Team: Japanese <ja@li.org>\n"
|
"Language-Team: Japanese <ja@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:10+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
|
|
|
@ -8,13 +8,13 @@ msgstr ""
|
||||||
"Project-Id-Version: openobject-addons\n"
|
"Project-Id-Version: openobject-addons\n"
|
||||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-01-04 06:03+0000\n"
|
"PO-Revision-Date: 2010-05-18 09:58+0000\n"
|
||||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
"Last-Translator: sraps (KN dati) <Unknown>\n"
|
||||||
"Language-Team: Latvian <lv@li.org>\n"
|
"Language-Team: Latvian <lv@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-04-17 03:51+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
|
@ -176,7 +176,7 @@ msgstr "ir.report.custom.fields"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "Search Partner"
|
msgid "Search Partner"
|
||||||
msgstr ""
|
msgstr "Meklēt Partneri"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: code:addons/base/module/wizard/wizard_export_lang.py:0
|
#: code:addons/base/module/wizard/wizard_export_lang.py:0
|
||||||
|
@ -419,7 +419,7 @@ msgstr "Kolumbija"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:ir.module.module:0
|
#: view:ir.module.module:0
|
||||||
msgid "Schedule Upgrade"
|
msgid "Schedule Upgrade"
|
||||||
msgstr ""
|
msgstr "Ieplānot Jauninājumus"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:ir.actions.report.custom,report_id:0
|
#: field:ir.actions.report.custom,report_id:0
|
||||||
|
@ -593,7 +593,7 @@ msgstr ","
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "My Partners"
|
msgid "My Partners"
|
||||||
msgstr ""
|
msgstr "Mani Partneri"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.es
|
#: model:res.country,name:base.es
|
||||||
|
@ -745,7 +745,7 @@ msgstr "Irāna"
|
||||||
#: model:ir.actions.act_window,name:base.res_request-act
|
#: model:ir.actions.act_window,name:base.res_request-act
|
||||||
#: model:ir.ui.menu,name:base.menu_res_request_act
|
#: model:ir.ui.menu,name:base.menu_res_request_act
|
||||||
msgid "My Requests"
|
msgid "My Requests"
|
||||||
msgstr ""
|
msgstr "Mani Pieprasījumi"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:ir.sequence,name:0
|
#: field:ir.sequence,name:0
|
||||||
|
@ -1009,7 +1009,7 @@ msgstr "STOCK_COPY"
|
||||||
#: code:addons/base/ir/ir_model.py:0
|
#: code:addons/base/ir/ir_model.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Model %s Does not Exist !"
|
msgid "Model %s Does not Exist !"
|
||||||
msgstr ""
|
msgstr "Modelis %s neeksistē !"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: code:addons/base/module/module.py:0
|
#: code:addons/base/module/module.py:0
|
||||||
|
@ -1137,7 +1137,7 @@ msgstr "Lietotāja Atskaite"
|
||||||
#: code:addons/base/res/res_user.py:0
|
#: code:addons/base/res/res_user.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid " (copy)"
|
msgid " (copy)"
|
||||||
msgstr ""
|
msgstr " (kopija)"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:ir.sequence:0
|
#: view:ir.sequence:0
|
||||||
|
@ -1303,7 +1303,7 @@ msgstr "Copy text \t STOCK_PROPERTIES"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:res.partner.address:0
|
#: view:res.partner.address:0
|
||||||
msgid "Search Contact"
|
msgid "Search Contact"
|
||||||
msgstr ""
|
msgstr "Meklēt Kontaktu"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:ir.module.module:0
|
#: view:ir.module.module:0
|
||||||
|
@ -1484,7 +1484,7 @@ msgstr "Esošā Likme"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "Greek / Ελληνικά"
|
msgid "Greek / Ελληνικά"
|
||||||
msgstr ""
|
msgstr "Grieķu / Ελληνικά"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: view:ir.values:0
|
#: view:ir.values:0
|
||||||
|
@ -1565,7 +1565,7 @@ msgstr "Epasta Adrese"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "French (BE) / Français (BE)"
|
msgid "French (BE) / Français (BE)"
|
||||||
msgstr ""
|
msgstr "Franču (BE) / Français (BE)"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: code:addons/base/ir/ir_model.py:0
|
#: code:addons/base/ir/ir_model.py:0
|
||||||
|
@ -1603,7 +1603,7 @@ msgstr "Lauka Sasaistes"
|
||||||
#: model:ir.actions.act_window,name:base.res_request-closed
|
#: model:ir.actions.act_window,name:base.res_request-closed
|
||||||
#: model:ir.ui.menu,name:base.next_id_12_close
|
#: model:ir.ui.menu,name:base.next_id_12_close
|
||||||
msgid "My Closed Requests"
|
msgid "My Closed Requests"
|
||||||
msgstr ""
|
msgstr "Mani Slēgie Pieprasījumi"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:ir.ui.menu,name:base.menu_custom
|
#: model:ir.ui.menu,name:base.menu_custom
|
||||||
|
@ -1861,7 +1861,7 @@ msgstr "Pieejas Kontrole"
|
||||||
#: view:ir.module.module:0
|
#: view:ir.module.module:0
|
||||||
#: field:ir.module.module,dependencies_id:0
|
#: field:ir.module.module,dependencies_id:0
|
||||||
msgid "Dependencies"
|
msgid "Dependencies"
|
||||||
msgstr "Atkarīgie objekti"
|
msgstr "Atkarīgs no"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:ir.report.custom.fields,bgcolor:0
|
#: field:ir.report.custom.fields,bgcolor:0
|
||||||
|
@ -1988,7 +1988,7 @@ msgstr "Modulis"
|
||||||
#: model:ir.actions.act_window,name:base.action_res_bank_form
|
#: model:ir.actions.act_window,name:base.action_res_bank_form
|
||||||
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
|
#: model:ir.ui.menu,name:base.menu_action_res_bank_form
|
||||||
msgid "Bank List"
|
msgid "Bank List"
|
||||||
msgstr ""
|
msgstr "Banku Saraksts"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:ir.attachment,description:0
|
#: field:ir.attachment,description:0
|
||||||
|
@ -2401,7 +2401,7 @@ msgstr ""
|
||||||
#: model:ir.actions.act_window,name:base.action_partner_customer_form
|
#: model:ir.actions.act_window,name:base.action_partner_customer_form
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
msgid "Customers"
|
msgid "Customers"
|
||||||
msgstr ""
|
msgstr "Klienti"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.au
|
#: model:res.country,name:base.au
|
||||||
|
@ -2603,7 +2603,7 @@ msgstr "STOCK_SAVE_AS"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:ir.translation,type:0
|
#: selection:ir.translation,type:0
|
||||||
msgid "SQL Constraint"
|
msgid "SQL Constraint"
|
||||||
msgstr ""
|
msgstr "SQL Ierobežojums"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:ir.actions.server,srcmodel_id:0
|
#: field:ir.actions.server,srcmodel_id:0
|
||||||
|
@ -2669,7 +2669,7 @@ msgstr "%c - Atbilstošais datuma un laika attēlojums."
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "Finland / Suomi"
|
msgid "Finland / Suomi"
|
||||||
msgstr ""
|
msgstr "Somu / Suomi"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.bo
|
#: model:res.country,name:base.bo
|
||||||
|
@ -2931,7 +2931,7 @@ msgstr "Likmes"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "Albanian / Shqipëri"
|
msgid "Albanian / Shqipëri"
|
||||||
msgstr ""
|
msgstr "Albāņu / Shqipëri"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.sy
|
#: model:res.country,name:base.sy
|
||||||
|
@ -3192,7 +3192,7 @@ msgstr "Demo dati"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "English (UK)"
|
msgid "English (UK)"
|
||||||
msgstr ""
|
msgstr "Angļu (UK)"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.aq
|
#: model:res.country,name:base.aq
|
||||||
|
@ -3217,7 +3217,7 @@ msgstr "Tīmeklis"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "English (CA)"
|
msgid "English (CA)"
|
||||||
msgstr ""
|
msgstr "Angļu (CA)"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:res.partner.event,planned_revenue:0
|
#: field:res.partner.event,planned_revenue:0
|
||||||
|
@ -3460,7 +3460,7 @@ msgstr "Partnera Adreses"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "Indonesian / Bahasa Indonesia"
|
msgid "Indonesian / Bahasa Indonesia"
|
||||||
msgstr ""
|
msgstr "Indonēziešu / Bahasa Indonesia"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:res.country,name:base.cv
|
#: model:res.country,name:base.cv
|
||||||
|
@ -3625,7 +3625,7 @@ msgstr "Izveidot darbību"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:ir.actions.report.xml,report_type:0
|
#: selection:ir.actions.report.xml,report_type:0
|
||||||
msgid "HTML from HTML"
|
msgid "HTML from HTML"
|
||||||
msgstr ""
|
msgstr "HTML no HTML"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:ir.actions.report.xml,report_type:0
|
#: selection:ir.actions.report.xml,report_type:0
|
||||||
|
@ -4086,7 +4086,7 @@ msgstr "Faila Formāts"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: field:res.lang,iso_code:0
|
#: field:res.lang,iso_code:0
|
||||||
msgid "ISO code"
|
msgid "ISO code"
|
||||||
msgstr ""
|
msgstr "ISO kods"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:ir.model,name:base.model_res_config_view
|
#: model:ir.model,name:base.model_res_config_view
|
||||||
|
@ -4222,7 +4222,7 @@ msgstr "Izmainīt manus Uzstādījumus"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: constraint:ir.actions.act_window:0
|
#: constraint:ir.actions.act_window:0
|
||||||
msgid "Invalid model name in the action definition."
|
msgid "Invalid model name in the action definition."
|
||||||
msgstr ""
|
msgstr "Procesa definīcijā nepareizs modeļa nosaukums."
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: wizard_field:res.partner.sms_send,init,text:0
|
#: wizard_field:res.partner.sms_send,init,text:0
|
||||||
|
@ -4344,7 +4344,7 @@ msgstr "Objekta Lauks"
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:module.lang.install,init,lang:0
|
#: selection:module.lang.install,init,lang:0
|
||||||
msgid "French (CH) / Français (CH)"
|
msgid "French (CH) / Français (CH)"
|
||||||
msgstr ""
|
msgstr "Franču (CH) / Français (CH)"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:ir.ui.menu,icon:0
|
#: selection:ir.ui.menu,icon:0
|
||||||
|
@ -4418,7 +4418,7 @@ msgstr "Atcelt atinstalāciju"
|
||||||
#: view:res.partner:0
|
#: view:res.partner:0
|
||||||
#: view:res.partner.address:0
|
#: view:res.partner.address:0
|
||||||
msgid "Communication"
|
msgid "Communication"
|
||||||
msgstr ""
|
msgstr "Saziņa"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: model:ir.model,name:base.model_ir_server_object_lines
|
#: model:ir.model,name:base.model_ir_server_object_lines
|
||||||
|
@ -6981,7 +6981,7 @@ msgstr "(year)="
|
||||||
#. module: base
|
#. module: base
|
||||||
#: rml:ir.module.reference:0
|
#: rml:ir.module.reference:0
|
||||||
msgid "Dependencies :"
|
msgid "Dependencies :"
|
||||||
msgstr "Atkarīgie objekti:"
|
msgstr "Atkarīgs no:"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
#: selection:ir.ui.menu,icon:0
|
#: selection:ir.ui.menu,icon:0
|
||||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-05-17 05:27+0000\n"
|
"PO-Revision-Date: 2010-05-18 08:01+0000\n"
|
||||||
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
|
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
|
||||||
"Language-Team: <>\n"
|
"Language-Team: <>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-05-17 05:31+0000\n"
|
"PO-Revision-Date: 2010-05-18 08:07+0000\n"
|
||||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
||||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||||
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
|
||||||
"PO-Revision-Date: 2010-05-17 05:28+0000\n"
|
"PO-Revision-Date: 2010-05-18 08:05+0000\n"
|
||||||
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
"Last-Translator: OpenERP Administrators <Unknown>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Launchpad-Export-Date: 2010-05-18 05:14+0000\n"
|
"X-Launchpad-Export-Date: 2010-05-19 05:11+0000\n"
|
||||||
"X-Generator: Launchpad (build Unknown)\n"
|
"X-Generator: Launchpad (build Unknown)\n"
|
||||||
|
|
||||||
#. module: base
|
#. module: base
|
||||||
|
|
|
@ -31,8 +31,6 @@ import res_company
|
||||||
import res_user
|
import res_user
|
||||||
import res_request
|
import res_request
|
||||||
import res_lang
|
import res_lang
|
||||||
|
import res_log
|
||||||
import ir_property
|
import ir_property
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
||||||
|
|
||||||
|
|
|
@ -377,7 +377,7 @@
|
||||||
<record id="res_partner_asustek_request" model="res.request">
|
<record id="res_partner_asustek_request" model="res.request">
|
||||||
<field name="name">ASUSTEK-Subject</field>
|
<field name="name">ASUSTEK-Subject</field>
|
||||||
<field name="act_to" ref="user_demo"/>
|
<field name="act_to" ref="user_demo"/>
|
||||||
<field name="ref_doc1">res.partner,2</field>
|
<field name="ref_doc1" ref="res_partner_asus"/>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -347,24 +347,27 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Search Partner">
|
<search string="Search Partner">
|
||||||
<group col='10' colspan='4'>
|
<group col='10' colspan='4'>
|
||||||
<filter string="My Partners" icon="terp-partner" domain="[('user_id','=',uid)]"/>
|
|
||||||
<separator orientation="vertical"/>
|
|
||||||
<filter string="Customers" icon="terp-partner" domain="[('customer','=',1)]" help="Customer Partners"/>
|
<filter string="Customers" icon="terp-partner" domain="[('customer','=',1)]" help="Customer Partners"/>
|
||||||
<filter string="Suppliers" icon="terp-partner" domain="[('supplier','=',1)]" help="Supplier Partners"/>
|
<filter string="Suppliers" icon="terp-partner" domain="[('supplier','=',1)]" help="Supplier Partners"/>
|
||||||
<filter string="Employees" icon="terp-partner" domain="[('employee','=',1)]" help="Employee Partners"/>
|
|
||||||
<separator orientation="vertical"/>
|
<separator orientation="vertical"/>
|
||||||
<field name="name" select="1"/>
|
<field name="name" select="1"/>
|
||||||
<field name="address" select="1"/>
|
<field name="address" select="1"/>
|
||||||
<field name="country" select="1"/>
|
<field name="country" select="1"/>
|
||||||
<field name="category_id" select="1"/>
|
<field name="category_id" select="1"/>
|
||||||
<field name="user_id" select="1"/>
|
<field name="user_id" select="1">
|
||||||
|
<filter string="My Partners" icon="terp-partner" domain="[('user_id','=',uid)]"/>
|
||||||
|
</field>
|
||||||
|
</group>
|
||||||
|
<newline />
|
||||||
|
<group expand="0" string="Group By..." colspan="16">
|
||||||
|
<filter string="Salesman" icon="terp-crm" domain="[]" context="{'group_by' : 'user_id'}" />
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_partner_form" model="ir.actions.act_window">
|
<record id="action_partner_form" model="ir.actions.act_window">
|
||||||
<field name="name">Partners</field>
|
<field name="name">Customers</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">res.partner</field>
|
<field name="res_model">res.partner</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
|
@ -639,7 +642,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
|
<record id="ir_ui_view_sc_partner0" model="ir.ui.view_sc">
|
||||||
<field name="name">Partner</field>
|
<field name="name">Address Book</field>
|
||||||
<field name="resource">ir.ui.menu</field>
|
<field name="resource">ir.ui.menu</field>
|
||||||
<field name="user_id" ref="base.user_root"/>
|
<field name="user_id" ref="base.user_root"/>
|
||||||
<field name="res_id" ref="menu_partner_form"/>
|
<field name="res_id" ref="menu_partner_form"/>
|
||||||
|
|
|
@ -24,7 +24,6 @@ from osv import fields
|
||||||
import os
|
import os
|
||||||
import tools
|
import tools
|
||||||
from tools.translate import _
|
from tools.translate import _
|
||||||
import base64
|
|
||||||
|
|
||||||
class multi_company_default(osv.osv):
|
class multi_company_default(osv.osv):
|
||||||
"""
|
"""
|
||||||
|
@ -181,8 +180,9 @@ class res_company(osv.osv):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _get_logo(self, cr, uid, ids):
|
def _get_logo(self, cr, uid, ids):
|
||||||
file_data = open('../pixmaps/openerp-header.png','rb').read()
|
return open(os.path.join(
|
||||||
return base64.encodestring(file_data)
|
tools.config['root_path'], '..', 'pixmaps', 'openerp-header.png'),
|
||||||
|
'rb') .read().encode('base64')
|
||||||
|
|
||||||
|
|
||||||
def _get_header2(self,cr,uid,ids):
|
def _get_header2(self,cr,uid,ids):
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
from osv import fields, osv
|
||||||
|
|
||||||
|
class res_log(osv.osv_memory):
|
||||||
|
_name = 'res.log'
|
||||||
|
_columns = {
|
||||||
|
'name': fields.char('Message', size=128, help='The logging message.', required=True),
|
||||||
|
'user_id': fields.many2one('res.users','User', required=True),
|
||||||
|
'res_model': fields.char('Object', size=128),
|
||||||
|
'res_id': fields.integer('Object ID'),
|
||||||
|
'secondary': fields.boolean('Secondary Log', help='Do not display this log if it belongs to the same object the user is working on')
|
||||||
|
}
|
||||||
|
_defaults = {
|
||||||
|
'user_id': lambda self,cr,uid,ctx: uid
|
||||||
|
}
|
||||||
|
_order='id desc'
|
||||||
|
# TODO: do not return secondary log if same object than in the model (but unlink it)
|
||||||
|
def get(self, cr, uid, context={}):
|
||||||
|
ids = self.search(cr, uid, [('user_id','=',uid)], context=context)
|
||||||
|
result = self.read(cr, uid, ids, ['name','res_model','res_id'], context=context)
|
||||||
|
self.unlink(cr, uid, ids, context=context)
|
||||||
|
return result
|
||||||
|
res_log()
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
<record id="res_log_search" model="ir.ui.view">
|
||||||
|
<field name="name">res.log.search</field>
|
||||||
|
<field name="model">res.log</field>
|
||||||
|
<field name="type">search</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="Logs">
|
||||||
|
<filter icon="terp-sale" string="My Logs" domain="[('user_id','=',uid)]" name="my"/>
|
||||||
|
<separator orientation="vertical"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="user_id"/>
|
||||||
|
<field name="res_model"/>
|
||||||
|
</search>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="res_log_tree" model="ir.ui.view">
|
||||||
|
<field name="name">res.log.tree</field>
|
||||||
|
<field name="model">res.log</field>
|
||||||
|
<field name="type">tree</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree string="Logs">
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="user_id"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="res_log_form" model="ir.ui.view">
|
||||||
|
<field name="name">res.log.form</field>
|
||||||
|
<field name="model">res.log</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Logs">
|
||||||
|
<group colspan="4" col="6">
|
||||||
|
<field name="name" colspan="4"/>
|
||||||
|
<field name="user_id" />
|
||||||
|
<field name="res_model"/>
|
||||||
|
<field name="res_id"/>
|
||||||
|
</group>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="res_log_act_window" model="ir.actions.act_window">
|
||||||
|
<field name="name">Logs</field>
|
||||||
|
<field name="res_model">res.log</field>
|
||||||
|
<field name="view_type">form</field>
|
||||||
|
<field name="context">{'search_default_my': 1}</field>
|
||||||
|
</record>
|
||||||
|
<menuitem
|
||||||
|
action="res_log_act_window"
|
||||||
|
id="menu_res_log_act_window"
|
||||||
|
parent="base.next_id_4"/>
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -24,9 +24,11 @@
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
import errno
|
||||||
import logging
|
import logging
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
import os
|
import os
|
||||||
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
@ -358,6 +360,21 @@ class Server:
|
||||||
res.extend(srv.stats() for srv in cls.__servers)
|
res.extend(srv.stats() for srv in cls.__servers)
|
||||||
return '\n'.join(res)
|
return '\n'.join(res)
|
||||||
|
|
||||||
|
def _close_socket(self):
|
||||||
|
if os.name != 'nt':
|
||||||
|
try:
|
||||||
|
self.socket.shutdown(getattr(socket, 'SHUT_RDWR', 2))
|
||||||
|
except socket.error, e:
|
||||||
|
if e.errno != errno.ENOTCONN: raise
|
||||||
|
# OSX, socket shutdowns both sides if any side closes it
|
||||||
|
# causing an error 57 'Socket is not connected' on shutdown
|
||||||
|
# of the other side (or something), see
|
||||||
|
# http://bugs.python.org/issue4397
|
||||||
|
self.__logger.debug(
|
||||||
|
'"%s" when shutting down server socket, '
|
||||||
|
'this is normal under OS X', e)
|
||||||
|
self.socket.close()
|
||||||
|
|
||||||
class OpenERPDispatcherException(Exception):
|
class OpenERPDispatcherException(Exception):
|
||||||
def __init__(self, exception, traceback):
|
def __init__(self, exception, traceback):
|
||||||
self.exception = exception
|
self.exception = exception
|
||||||
|
|
|
@ -399,8 +399,17 @@ class orm_template(object):
|
||||||
_inherits = {}
|
_inherits = {}
|
||||||
_table = None
|
_table = None
|
||||||
_invalids = set()
|
_invalids = set()
|
||||||
|
_log_create = False
|
||||||
|
|
||||||
CONCURRENCY_CHECK_FIELD = '__last_update'
|
CONCURRENCY_CHECK_FIELD = '__last_update'
|
||||||
|
def log(self, cr, uid, id, message, secondary=False, context=None):
|
||||||
|
return self.pool.get('res.log').create(cr, uid, {
|
||||||
|
'name': message,
|
||||||
|
'res_model': self._name,
|
||||||
|
'secondary': secondary,
|
||||||
|
'res_id': id},
|
||||||
|
context=context
|
||||||
|
)
|
||||||
|
|
||||||
def view_init(self, cr , uid , fields_list, context=None):
|
def view_init(self, cr , uid , fields_list, context=None):
|
||||||
"""Override this method to do specific things when a view on the object is opened."""
|
"""Override this method to do specific things when a view on the object is opened."""
|
||||||
|
@ -1031,7 +1040,14 @@ class orm_template(object):
|
||||||
for constraint in self._constraints:
|
for constraint in self._constraints:
|
||||||
fun, msg, fields = constraint
|
fun, msg, fields = constraint
|
||||||
if not fun(self, cr, uid, ids):
|
if not fun(self, cr, uid, ids):
|
||||||
translated_msg = trans._get_source(cr, uid, self._name, 'constraint', lng, source=msg) or msg
|
# Check presence of __call__ directly instead of using
|
||||||
|
# callable() because it will be deprecated as of Python 3.0
|
||||||
|
if hasattr(msg, '__call__'):
|
||||||
|
txt_msg, params = msg(self, cr, uid, ids)
|
||||||
|
tmp_msg = trans._get_source(cr, uid, self._name, 'constraint', lng, source=txt_msg) or txt_msg
|
||||||
|
translated_msg = tmp_msg % params
|
||||||
|
else:
|
||||||
|
translated_msg = trans._get_source(cr, uid, self._name, 'constraint', lng, source=msg) or msg
|
||||||
error_msgs.append(
|
error_msgs.append(
|
||||||
_("Error occurred while validating the field(s) %s: %s") % (','.join(fields), translated_msg)
|
_("Error occurred while validating the field(s) %s: %s") % (','.join(fields), translated_msg)
|
||||||
)
|
)
|
||||||
|
@ -1832,6 +1848,12 @@ class orm_memory(orm_template):
|
||||||
for field in upd_todo:
|
for field in upd_todo:
|
||||||
self._columns[field].set_memory(cr, self, id_new, field, vals[field], user, context)
|
self._columns[field].set_memory(cr, self, id_new, field, vals[field], user, context)
|
||||||
self._validate(cr, user, [id_new], context)
|
self._validate(cr, user, [id_new], context)
|
||||||
|
if self._log_create and not (context and context.get('no_store_function', False)):
|
||||||
|
message = self._description + \
|
||||||
|
" '" + \
|
||||||
|
self.name_get(cr, user, [id_new], context=context)[0][1] + \
|
||||||
|
"' "+ _("created.")
|
||||||
|
self.log(cr, user, id_new, message, True, context=context)
|
||||||
wf_service = netsvc.LocalService("workflow")
|
wf_service = netsvc.LocalService("workflow")
|
||||||
wf_service.trg_create(user, self._name, id_new, cr)
|
wf_service.trg_create(user, self._name, id_new, cr)
|
||||||
return id_new
|
return id_new
|
||||||
|
@ -1919,7 +1941,6 @@ class orm_memory(orm_template):
|
||||||
res=e.__dict__['_expression__exp']
|
res=e.__dict__['_expression__exp']
|
||||||
return res or []
|
return res or []
|
||||||
|
|
||||||
|
|
||||||
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
def search(self, cr, user, args, offset=0, limit=None, order=None,
|
||||||
context=None, count=False):
|
context=None, count=False):
|
||||||
if not context:
|
if not context:
|
||||||
|
@ -3478,6 +3499,12 @@ class orm(orm_template):
|
||||||
self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
|
self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
|
||||||
done.append((object, ids, fields2))
|
done.append((object, ids, fields2))
|
||||||
|
|
||||||
|
if self._log_create and not (context and context.get('no_store_function', False)):
|
||||||
|
message = self._description + \
|
||||||
|
" '" + \
|
||||||
|
self.name_get(cr, user, [id_new], context=context)[0][1] + \
|
||||||
|
"' "+ _("created.")
|
||||||
|
self.log(cr, user, id_new, message, True, context=context)
|
||||||
wf_service = netsvc.LocalService("workflow")
|
wf_service = netsvc.LocalService("workflow")
|
||||||
wf_service.trg_create(user, self._name, id_new, cr)
|
wf_service.trg_create(user, self._name, id_new, cr)
|
||||||
return id_new
|
return id_new
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
"""
|
"""
|
||||||
from websrv_lib import *
|
from websrv_lib import *
|
||||||
import netsvc
|
import netsvc
|
||||||
|
import errno
|
||||||
import threading
|
import threading
|
||||||
import tools
|
import tools
|
||||||
import os
|
import os
|
||||||
|
import select
|
||||||
import socket
|
import socket
|
||||||
import xmlrpclib
|
import xmlrpclib
|
||||||
|
|
||||||
|
@ -128,31 +130,25 @@ class BaseHttpDaemon(threading.Thread, netsvc.Server):
|
||||||
"Error occur when starting the server daemon: %s" % (e,))
|
"Error occur when starting the server daemon: %s" % (e,))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
@property
|
||||||
|
def socket(self):
|
||||||
|
return self.server.socket
|
||||||
|
|
||||||
def attach(self, path, gw):
|
def attach(self, path, gw):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.running = False
|
self.running = False
|
||||||
if os.name != 'nt':
|
self._close_socket()
|
||||||
try:
|
|
||||||
self.server.socket.shutdown(
|
|
||||||
getattr(socket, 'SHUT_RDWR', 2))
|
|
||||||
except socket.error, e:
|
|
||||||
if e.errno != 57: raise
|
|
||||||
# OSX, socket shutdowns both sides if any side closes it
|
|
||||||
# causing an error 57 'Socket is not connected' on shutdown
|
|
||||||
# of the other side (or something), see
|
|
||||||
# http://bugs.python.org/issue4397
|
|
||||||
netsvc.Logger().notifyChannel(
|
|
||||||
'server', netsvc.LOG_DEBUG,
|
|
||||||
'"%s" when shutting down server socket, '
|
|
||||||
'this is normal under OS X'%e)
|
|
||||||
self.server.socket.close()
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.running = True
|
self.running = True
|
||||||
while self.running:
|
while self.running:
|
||||||
self.server.handle_request()
|
try:
|
||||||
|
self.server.handle_request()
|
||||||
|
except (socket.error, select.error), e:
|
||||||
|
if self.running or e.args[0] != errno.EBADF:
|
||||||
|
raise
|
||||||
return True
|
return True
|
||||||
|
|
||||||
class HttpDaemon(BaseHttpDaemon):
|
class HttpDaemon(BaseHttpDaemon):
|
||||||
|
|
|
@ -27,6 +27,7 @@ import netsvc
|
||||||
import threading
|
import threading
|
||||||
import tools
|
import tools
|
||||||
import os
|
import os
|
||||||
|
import select
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
import tiny_socket
|
import tiny_socket
|
||||||
|
@ -50,7 +51,6 @@ class TinySocketClientThread(threading.Thread, netsvc.OpenERPDispatcher):
|
||||||
self.sock = None
|
self.sock = None
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# import select
|
|
||||||
self.running = True
|
self.running = True
|
||||||
try:
|
try:
|
||||||
ts = tiny_socket.mysocket(self.sock)
|
ts = tiny_socket.mysocket(self.sock)
|
||||||
|
@ -103,10 +103,13 @@ class TinySocketServerThread(threading.Thread,netsvc.Server):
|
||||||
"starting NET-RPC service at %s port %d" % (interface or '0.0.0.0', port,))
|
"starting NET-RPC service at %s port %d" % (interface or '0.0.0.0', port,))
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
# import select
|
|
||||||
try:
|
try:
|
||||||
self.running = True
|
self.running = True
|
||||||
while self.running:
|
while self.running:
|
||||||
|
timeout = self.socket.gettimeout()
|
||||||
|
fd_sets = select.select([self.socket], [], [], timeout)
|
||||||
|
if not fd_sets[0]:
|
||||||
|
continue
|
||||||
(clientsocket, address) = self.socket.accept()
|
(clientsocket, address) = self.socket.accept()
|
||||||
ct = TinySocketClientThread(clientsocket, self.threads)
|
ct = TinySocketClientThread(clientsocket, self.threads)
|
||||||
clientsocket = None
|
clientsocket = None
|
||||||
|
@ -129,12 +132,7 @@ class TinySocketServerThread(threading.Thread,netsvc.Server):
|
||||||
self.running = False
|
self.running = False
|
||||||
for t in self.threads:
|
for t in self.threads:
|
||||||
t.stop()
|
t.stop()
|
||||||
try:
|
self._close_socket()
|
||||||
self.socket.shutdown(
|
|
||||||
getattr(socket, 'SHUT_RDWR', 2))
|
|
||||||
self.socket.close()
|
|
||||||
except:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def stats(self):
|
def stats(self):
|
||||||
res = "Net-RPC: " + ( (self.running and "running") or "stopped")
|
res = "Net-RPC: " + ( (self.running and "running") or "stopped")
|
||||||
|
|
|
@ -83,8 +83,7 @@ class configmanager(object):
|
||||||
'list_db' : True,
|
'list_db' : True,
|
||||||
'timezone' : False, # to override the default TZ
|
'timezone' : False, # to override the default TZ
|
||||||
'test-disable' : False,
|
'test-disable' : False,
|
||||||
'test-rollback' : True,
|
'test-commit' : False,
|
||||||
'test-continue' : False
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.misc = {}
|
self.misc = {}
|
||||||
|
@ -141,10 +140,8 @@ class configmanager(object):
|
||||||
group = optparse.OptionGroup(parser, "Testing Configuration")
|
group = optparse.OptionGroup(parser, "Testing Configuration")
|
||||||
group.add_option("--test-disable", action="store_true", dest="test_disable",
|
group.add_option("--test-disable", action="store_true", dest="test_disable",
|
||||||
default=False, help="Disable loading test files.")
|
default=False, help="Disable loading test files.")
|
||||||
group.add_option("--test-no-rollback", action="store_false", dest="test_rollback",
|
group.add_option("--test-commit", action="store_true", dest="test_commit",
|
||||||
default=True, help="Don't rollback after running test.")
|
default=False, help="Commit database changes performed by tests.")
|
||||||
group.add_option("--test-continue", action="store_true", dest="test_continue",
|
|
||||||
default=False, help="Display exception but then test should continue.")
|
|
||||||
parser.add_option_group(group)
|
parser.add_option_group(group)
|
||||||
|
|
||||||
# Logging Group
|
# Logging Group
|
||||||
|
@ -294,8 +291,7 @@ class configmanager(object):
|
||||||
self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {}
|
self.options['init'] = opt.init and dict.fromkeys(opt.init.split(','), 1) or {}
|
||||||
self.options["demo"] = not opt.without_demo and self.options['init'] or {}
|
self.options["demo"] = not opt.without_demo and self.options['init'] or {}
|
||||||
self.options["test-disable"] = opt.test_disable
|
self.options["test-disable"] = opt.test_disable
|
||||||
self.options["test-rollback"] = opt.test_rollback
|
self.options["test-commit"] = opt.test_commit
|
||||||
self.options["test-continue"] = opt.test_continue
|
|
||||||
self.options['update'] = opt.update and dict.fromkeys(opt.update.split(','), 1) or {}
|
self.options['update'] = opt.update and dict.fromkeys(opt.update.split(','), 1) or {}
|
||||||
|
|
||||||
self.options['translate_modules'] = opt.translate_modules and map(lambda m: m.strip(), opt.translate_modules.split(',')) or ['all']
|
self.options['translate_modules'] = opt.translate_modules and map(lambda m: m.strip(), opt.translate_modules.split(',')) or ['all']
|
||||||
|
|
|
@ -741,7 +741,12 @@ form: module.record_id""" % (xml_id,)
|
||||||
if f_ref=="null":
|
if f_ref=="null":
|
||||||
f_val = False
|
f_val = False
|
||||||
else:
|
else:
|
||||||
f_val = self.id_get(cr, f_model, f_ref)
|
if f_name in model._columns \
|
||||||
|
and model._columns[f_name]._type == 'reference':
|
||||||
|
val = self.model_id_get(cr, f_model, f_ref)
|
||||||
|
f_val = val[0] + ',' + str(val[1])
|
||||||
|
else:
|
||||||
|
f_val = self.id_get(cr, f_model, f_ref)
|
||||||
else:
|
else:
|
||||||
f_val = _eval_xml(self,field, self.pool, cr, self.uid, self.idref)
|
f_val = _eval_xml(self,field, self.pool, cr, self.uid, self.idref)
|
||||||
if model._columns.has_key(f_name):
|
if model._columns.has_key(f_name):
|
||||||
|
@ -759,13 +764,17 @@ form: module.record_id""" % (xml_id,)
|
||||||
def id_get(self, cr, model, id_str):
|
def id_get(self, cr, model, id_str):
|
||||||
if id_str in self.idref:
|
if id_str in self.idref:
|
||||||
return self.idref[id_str]
|
return self.idref[id_str]
|
||||||
|
return self.model_id_get(cr, model, id_str)[1]
|
||||||
|
|
||||||
|
def model_id_get(self, cr, model, id_str):
|
||||||
|
model_data_obj = self.pool.get('ir.model.data')
|
||||||
mod = self.module
|
mod = self.module
|
||||||
if '.' in id_str:
|
if '.' in id_str:
|
||||||
mod,id_str = id_str.split('.')
|
mod,id_str = id_str.split('.')
|
||||||
result = self.pool.get('ir.model.data')._get_id(cr, self.uid, mod, id_str)
|
result = model_data_obj._get_id(cr, self.uid, mod, id_str)
|
||||||
res = self.pool.get('ir.model.data').read(cr, self.uid, [result], ['res_id'])
|
res = model_data_obj.read(cr, self.uid, [result], ['model', 'res_id'])
|
||||||
if res and res[0] and res[0]['res_id']:
|
if res and res[0] and res[0]['res_id']:
|
||||||
return int(res[0]['res_id'])
|
return res[0]['model'], int(res[0]['res_id'])
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def parse(self, de):
|
def parse(self, de):
|
||||||
|
|
|
@ -101,7 +101,7 @@ def init_db(cr):
|
||||||
values (%s, %s, %s, %s, %s, %s, %s, %s, %s)', (
|
values (%s, %s, %s, %s, %s, %s, %s, %s, %s)', (
|
||||||
id, info.get('author', ''),
|
id, info.get('author', ''),
|
||||||
info.get('website', ''), i, info.get('name', False),
|
info.get('website', ''), i, info.get('name', False),
|
||||||
info.get('description', ''), p_id, state, info.get('certificate')))
|
info.get('description', ''), p_id, state, info.get('certificate') or None))
|
||||||
cr.execute('insert into ir_model_data \
|
cr.execute('insert into ir_model_data \
|
||||||
(name,model,module, res_id, noupdate) values (%s,%s,%s,%s,%s)', (
|
(name,model,module, res_id, noupdate) values (%s,%s,%s,%s,%s)', (
|
||||||
'module_meta_information', 'ir.module.module', i, id, True))
|
'module_meta_information', 'ir.module.module', i, id, True))
|
||||||
|
|
|
@ -682,7 +682,7 @@ class YamlInterpreter(object):
|
||||||
self.logger.exception(e)
|
self.logger.exception(e)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
self.logger.exception(e)
|
self.logger.exception(e)
|
||||||
raise e
|
raise
|
||||||
|
|
||||||
def _process_node(self, node):
|
def _process_node(self, node):
|
||||||
if is_comment(node):
|
if is_comment(node):
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
2010-07-XX: 6.0.0
|
||||||
|
=================
|
||||||
|
|
||||||
|
Improvements (server)
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
* support of 'ref' attribute for importing 'reference' field values, as for many2one fields.
|
||||||
|
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -60,6 +60,7 @@ required_modules = [
|
||||||
('pytz', 'Timezone handling library for Python'),
|
('pytz', 'Timezone handling library for Python'),
|
||||||
('reportlab', 'reportlab module'),
|
('reportlab', 'reportlab module'),
|
||||||
('yaml', 'YAML parser and emitter for Python'),
|
('yaml', 'YAML parser and emitter for Python'),
|
||||||
|
('pywebdav', 'PyWebDAV is a standards compliant WebDAV server and library written in Python'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def check_modules():
|
def check_modules():
|
||||||
|
@ -182,7 +183,7 @@ options = {
|
||||||
"encodings", "dateutil", "wizard", "pychart", "PIL", "pyparsing",
|
"encodings", "dateutil", "wizard", "pychart", "PIL", "pyparsing",
|
||||||
"pydot", "asyncore","asynchat", "reportlab", "vobject",
|
"pydot", "asyncore","asynchat", "reportlab", "vobject",
|
||||||
"HTMLParser", "select", "mako", "poplib",
|
"HTMLParser", "select", "mako", "poplib",
|
||||||
"imaplib", "smtplib", "email", "yaml",
|
"imaplib", "smtplib", "email", "yaml","pywebdav",
|
||||||
],
|
],
|
||||||
"excludes" : ["Tkconstants","Tkinter","tcl"],
|
"excludes" : ["Tkconstants","Tkinter","tcl"],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue