diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql
index 84676a7f59b..eb9eb5b9d75 100644
--- a/bin/addons/base/base.sql
+++ b/bin/addons/base/base.sql
@@ -148,7 +148,6 @@ CREATE TABLE res_users (
context_lang varchar(64) default '',
-- No FK references below, will be added later by ORM
-- (when the destination rows exist)
- action_id int,
company_id int,
primary key(id)
);
@@ -345,7 +344,7 @@ CREATE TABLE ir_model_data (
-- Users
---------------------------------
-insert into res_users (id,login,password,name,action_id,active,company_id) values (1,'admin','admin','Administrator',NULL,True,1);
+insert into res_users (id,login,password,name,active,company_id) values (1,'admin','admin','Administrator',True,1);
insert into ir_model_data (name,module,model,noupdate,res_id) values ('user_root','base','res.users',True,1);
-- Compatibility purpose, to remove V6.0
diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml
index 5082adfbfe0..9597ac83f92 100644
--- a/bin/addons/base/base_data.xml
+++ b/bin/addons/base/base_data.xml
@@ -1053,8 +1053,6 @@
-
-
@@ -1375,6 +1373,9 @@
-
+
+ Reserve
+ RSV
+
diff --git a/bin/addons/base/base_demo.xml b/bin/addons/base/base_demo.xml
index 235e7e77b75..7779171fe08 100644
--- a/bin/addons/base/base_demo.xml
+++ b/bin/addons/base/base_demo.xml
@@ -6,8 +6,6 @@
demo
Demo User
Mr Demo
-
-
diff --git a/bin/addons/base/base_menu.xml b/bin/addons/base/base_menu.xml
index 08d4832c0c8..830ead09f6f 100644
--- a/bin/addons/base/base_menu.xml
+++ b/bin/addons/base/base_menu.xml
@@ -5,8 +5,8 @@
-
+ groups="base.group_no_one"/>
+
@@ -21,7 +21,8 @@
groups="base.group_extended"/>
-
+
diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml
index 92ea504606e..7f6cb5e58df 100644
--- a/bin/addons/base/base_update.xml
+++ b/bin/addons/base/base_update.xml
@@ -114,29 +114,29 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/bin/addons/base/i18n/bs.po b/bin/addons/base/i18n/bs.po
index af99a2b5185..5eace0482b4 100644
--- a/bin/addons/base/i18n/bs.po
+++ b/bin/addons/base/i18n/bs.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-12 21:46+0000\n"
-"Last-Translator: Bojan Markovic \n"
+"PO-Revision-Date: 2010-09-29 08:03+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:42+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/en_GB.po b/bin/addons/base/i18n/en_GB.po
index 0e2166dc01f..098e3d1129a 100644
--- a/bin/addons/base/i18n/en_GB.po
+++ b/bin/addons/base/i18n/en_GB.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-11 15:00+0000\n"
-"Last-Translator: Martin Hood \n"
+"PO-Revision-Date: 2010-09-29 08:03+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: English (United Kingdom) \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:46+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/et.po b/bin/addons/base/i18n/et.po
index 0814b45f278..2d639fd8d86 100644
--- a/bin/addons/base/i18n/et.po
+++ b/bin/addons/base/i18n/et.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-21 14:25+0000\n"
-"Last-Translator: Tanel Kurvits \n"
+"PO-Revision-Date: 2010-09-29 07:51+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/fr.po b/bin/addons/base/i18n/fr.po
index 49ba7240160..d3bbc43f35c 100644
--- a/bin/addons/base/i18n/fr.po
+++ b/bin/addons/base/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-16 19:03+0000\n"
-"Last-Translator: Olivier Dony (OpenERP) \n"
+"PO-Revision-Date: 2010-09-29 08:01+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/it.po b/bin/addons/base/i18n/it.po
index 75981ae4507..a43aa4a42de 100644
--- a/bin/addons/base/i18n/it.po
+++ b/bin/addons/base/i18n/it.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-19 17:45+0000\n"
-"Last-Translator: Nicola Riolini - Micronaet \n"
+"PO-Revision-Date: 2010-09-29 08:28+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/mn.po b/bin/addons/base/i18n/mn.po
index 521063fcfbe..247e7f202fe 100644
--- a/bin/addons/base/i18n/mn.po
+++ b/bin/addons/base/i18n/mn.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-13 08:00+0000\n"
+"PO-Revision-Date: 2010-09-29 08:13+0000\n"
"Last-Translator: ub121 \n"
"Language-Team: Mongolian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:44+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/nl.po b/bin/addons/base/i18n/nl.po
index 0e1b62fa594..534a06b7f62 100644
--- a/bin/addons/base/i18n/nl.po
+++ b/bin/addons/base/i18n/nl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-09 18:36+0000\n"
-"Last-Translator: Anup (OpenERP) \n"
+"PO-Revision-Date: 2010-10-01 11:47+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:42+0000\n"
+"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
@@ -3366,7 +3366,7 @@ msgstr "U kunt het menu opnieuw laden met (Ctrl+t Ctrl+r)."
#: view:ir.ui.view_sc:0
#: field:res.partner.title,shortcut:0
msgid "Shortcut"
-msgstr "Sneltoets"
+msgstr "Snelkoppeling"
#. module: base
#: field:ir.model.data,date_init:0
@@ -8109,34 +8109,35 @@ msgstr "U kunt niet twee gebruikers hebben met dezelfde gebruikersnaam !"
#. module: base
#: sql_constraint:ir.model.fields:0
msgid "Size of the field can never be less than 1 !"
-msgstr ""
+msgstr "De veldlengte kan nooit kleiner dan 1 zijn !"
#. module: base
#: sql_constraint:ir.ui.view_sc:0
msgid "Shortcut for this menu already exists!"
-msgstr ""
+msgstr "Dit menu heeft al een snelkoppeling!"
#. module: base
#: sql_constraint:ir.model.data:0
msgid ""
"You cannot have multiple records with the same id for the same module !"
msgstr ""
+"U kunt niet meer records hebben met dezelfde id voor dezelfde module !"
#. module: base
#: sql_constraint:maintenance.contract:0
msgid "Your maintenance contract is already subscribed in the system !"
-msgstr ""
+msgstr "Uw onderhoudscontract is al ingeschreven in het systeem !"
#. module: base
#: sql_constraint:ir.module.module:0
#: sql_constraint:ir.module.web:0
msgid "The name of the module must be unique !"
-msgstr ""
+msgstr "De modulenaam moet uniek zijn !"
#. module: base
#: sql_constraint:ir.module.module:0
msgid "The certificate ID of the module must be unique !"
-msgstr ""
+msgstr "Het kwaliteitscertificaat id van de module moet uniek zijn !"
#. module: base
#: sql_constraint:res.partner.function:0
@@ -8146,38 +8147,38 @@ msgstr ""
#. module: base
#: sql_constraint:res.partner:0
msgid "The name of the Partner must be unique !"
-msgstr ""
+msgstr "De relatienaam moet uniek zijn !"
#. module: base
#: sql_constraint:res.country:0
msgid "The name of the country must be unique !"
-msgstr ""
+msgstr "De landnaam moet uniek zijn !"
#. module: base
#: sql_constraint:res.country:0
msgid "The code of the country must be unique !"
-msgstr ""
+msgstr "De landcode moet uniek zijn !"
#. module: base
#: sql_constraint:res.lang:0
msgid "The name of the language must be unique !"
-msgstr ""
+msgstr "De taalnaam moet uniek zijn !"
#. module: base
#: sql_constraint:res.lang:0
msgid "The code of the language must be unique !"
-msgstr ""
+msgstr "De taalcode moet uniek zijn !"
#. module: base
#: sql_constraint:res.groups:0
msgid "The name of the group must be unique !"
-msgstr ""
+msgstr "De groepsnaam moet uniek zijn !"
#. module: base
#: code:addons/osv/osv.py:0
#, python-format
msgid "Constraint Error"
-msgstr ""
+msgstr "Voorwaarde Fout"
#. module: base
#: code:addons/osv/osv.py:0
@@ -8188,6 +8189,10 @@ msgid ""
"reference it\n"
"- creation/update: a mandatory field is not correctly set"
msgstr ""
+"De bewerking kan niet worden afgerond, waarschijnlijk vanwege:\n"
+"- verwijdering: u probeert een record te verwijderen terwijl er nog door een "
+"ander aan wordt gerefereerd\n"
+"- maken/wijzigen: een verplicht veld is niet correct ingevuld"
#. module: base
#: code:addons/osv/osv.py:0
@@ -8197,12 +8202,15 @@ msgid ""
"\n"
"[object with reference: %s - %s]"
msgstr ""
+"\n"
+"\n"
+"[object met referentie: %s - %s]"
#. module: base
#: code:addons/osv/osv.py:0
#, python-format
msgid "Integrity Error"
-msgstr ""
+msgstr "Integriteit Fout"
#~ msgid "Main Company"
#~ msgstr "Moederorganisatie"
diff --git a/bin/addons/base/i18n/pl.po b/bin/addons/base/i18n/pl.po
index e9604cd0de8..eca6c8a4393 100644
--- a/bin/addons/base/i18n/pl.po
+++ b/bin/addons/base/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-26 10:02+0000\n"
-"Last-Translator: Michał Węgrzynek \n"
+"PO-Revision-Date: 2010-09-29 08:34+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:45+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/pt_BR.po b/bin/addons/base/i18n/pt_BR.po
index 9bae937bb20..01a30d302a4 100644
--- a/bin/addons/base/i18n/pt_BR.po
+++ b/bin/addons/base/i18n/pt_BR.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: pt_BR\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-09 18:12+0000\n"
+"PO-Revision-Date: 2010-09-29 08:12+0000\n"
"Last-Translator: Anup (OpenERP) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:46+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/i18n/sv.po b/bin/addons/base/i18n/sv.po
index ed47e2be7c6..657c35a352f 100644
--- a/bin/addons/base/i18n/sv.po
+++ b/bin/addons/base/i18n/sv.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-12-18 08:39+0000\n"
-"PO-Revision-Date: 2010-09-27 12:19+0000\n"
-"Last-Translator: Daniel Stenlöv (XCLUDE) \n"
+"PO-Revision-Date: 2010-09-29 08:22+0000\n"
+"Last-Translator: OpenERP Administrators \n"
"Language-Team: <>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-29 04:46+0000\n"
+"X-Launchpad-Export-Date: 2010-09-30 04:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base
diff --git a/bin/addons/base/ir/__init__.py b/bin/addons/base/ir/__init__.py
index 01e33494717..343b50a6998 100644
--- a/bin/addons/base/ir/__init__.py
+++ b/bin/addons/base/ir/__init__.py
@@ -25,7 +25,6 @@ import ir_ui_menu
import ir_ui_view
import ir_default
import ir_actions
-import ir_report_custom
import ir_attachment
import ir_cron
import ir_filters
diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml
index 9b4e0e3e38a..8d35e469bd8 100644
--- a/bin/addons/base/ir/ir.xml
+++ b/bin/addons/base/ir/ir.xml
@@ -10,17 +10,41 @@
20
+
+
+
@@ -47,12 +71,17 @@
+
+
+
+
+
- Client Actions
+ Client Events
ir.actions.act_window
ir.values
form
@@ -63,20 +92,20 @@
-
- tree
-
-
-
+
+ tree
+
+
+
+
+
+
+ form
+
+
+
-
-
- form
-
-
-
-
@@ -254,7 +283,7 @@
- Sequence Types
+ Sequence Codes
ir.actions.act_window
ir.sequence.type
form
@@ -312,6 +341,7 @@
+
@@ -321,10 +351,10 @@
form
@@ -394,14 +425,13 @@
ir.actions.report.xml
form
-
-
-
@@ -615,10 +643,14 @@
form
@@ -798,21 +830,25 @@
form
@@ -839,6 +875,18 @@
search
+
+
+
+
+
+
@@ -846,7 +894,7 @@
-
+
@@ -868,10 +916,8 @@
form
@@ -954,70 +1000,6 @@
-
-
- ir.report.custom.fields.tree
- ir.report.custom.fields
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ir.report.custom.fields
- ir.report.custom.fields
- form
-
-
-
-
-
-
-
ir.model.form
@@ -1121,12 +1103,26 @@
search
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
@@ -1138,12 +1134,12 @@
form
@@ -1407,9 +1424,9 @@
-
-
-
+
+
+
@@ -1420,11 +1437,11 @@
search
-
-
-
-
-
+
+
+
+
+
-
+
@@ -1556,17 +1574,17 @@
@@ -1577,21 +1595,21 @@
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
@@ -1669,21 +1687,21 @@
search
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -1806,13 +1824,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -1828,7 +1846,7 @@
{'key':'server_action'}
-
+
ir.actions.todo
@@ -1838,6 +1856,7 @@
+
-
-
-
-
diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py
index e956ee2bf59..074bfa04f85 100644
--- a/bin/addons/base/ir/ir_actions.py
+++ b/bin/addons/base/ir/ir_actions.py
@@ -28,15 +28,16 @@ from tools.translate import _
import netsvc
import re
import copy
-import sys
+import os
from xml import dom
+from report.report_sxw import report_sxw, report_rml
class actions(osv.osv):
_name = 'ir.actions.actions'
_table = 'ir_actions'
_columns = {
'name': fields.char('Action Name', required=True, size=64),
- 'type': fields.char('Action Type', required=True, size=32),
+ 'type': fields.char('Action Type', required=True, size=32,readonly=True),
'usage': fields.char('Action Usage', size=32),
}
_defaults = {
@@ -72,6 +73,27 @@ class report_xml(osv.osv):
res[report.id] = False
return res
+ def register_all(self, cr):
+ """Report registration handler that may be overridden by subclasses to
+ add their own kinds of report services.
+ Loads all reports with no manual loaders (auto==True) and
+ registers the appropriate services to implement them.
+ """
+ opj = os.path.join
+ cr.execute("SELECT * FROM ir_act_report_xml WHERE auto=%s ORDER BY id", (True,))
+ result = cr.dictfetchall()
+ svcs = netsvc.Service._services
+ for r in result:
+ if svcs.has_key('report.'+r['report_name']):
+ continue
+ if r['report_rml'] or r['report_rml_content_data']:
+ report_sxw('report.'+r['report_name'], r['model'],
+ opj('addons',r['report_rml'] or '/'), header=r['header'])
+ if r['report_xsl']:
+ report_rml('report.'+r['report_name'], r['model'],
+ opj('addons',r['report_xml']),
+ r['report_xsl'] and opj('addons',r['report_xsl']))
+
_name = 'ir.actions.report.xml'
_table = 'ir_act_report_xml'
_sequence = 'ir_actions_id_seq'
@@ -81,7 +103,7 @@ class report_xml(osv.osv):
'type': fields.char('Action Type', size=32, required=True),
'report_name': fields.char('Service Name', size=64, required=True),
'usage': fields.char('Action Usage', size=32),
- 'report_type': fields.selection([ ('pdf','pdf'), ('html','html'), ('raw','raw'), ('sxw','sxw'), ('txt','txt'), ('odt','odt'), ('html2html','HTML from HTML'), ('mako2html','HTML from Mako'), ], string='Report Type', required=True),
+ 'report_type': fields.char('Report Type', size=32, required=True, help="Report Type, e.g. pdf, html, raw, sxw, odt, html2html, mako2html, ..."),
'groups_id': fields.many2many('res.groups', 'res_groups_report_rel', 'uid', 'gid', 'Groups'),
'multi': fields.boolean('On multiple doc.', help="If set to true, the action will not be displayed on the right toolbar of a form view."),
'attachment': fields.char('Save As Attachment Prefix', size=128, help='This is the filename of the attachment used to store the printing result. Keep empty to not save the printed reports. You can use a python expression with the object and time variables.'),
@@ -220,7 +242,6 @@ class act_window(osv.osv):
'search_view_id': fields.many2one('ir.ui.view', 'Search View Ref.'),
'filter': fields.boolean('Filter'),
'auto_search':fields.boolean('Auto Search'),
- 'default_user_ids': fields.many2many('res.users', 'ir_act_window_user_rel', 'act_id', 'uid', 'Users'),
'search_view' : fields.function(_search_view, type='text', method=True, string='Search View'),
'menus': fields.char('Menus', size=4096),
'help': fields.text('Action description',
diff --git a/bin/addons/base/ir/ir_cron.py b/bin/addons/base/ir/ir_cron.py
index 6b96333b5d5..06121533922 100644
--- a/bin/addons/base/ir/ir_cron.py
+++ b/bin/addons/base/ir/ir_cron.py
@@ -47,15 +47,15 @@ class ir_cron(osv.osv, netsvc.Agent):
'name': fields.char('Name', size=60, required=True),
'user_id': fields.many2one('res.users', 'User', required=True),
'active': fields.boolean('Active'),
- 'interval_number': fields.integer('Interval Number'),
+ 'interval_number': fields.integer('Interval Number',help="Repeat every x."),
'interval_type': fields.selection( [('minutes', 'Minutes'),
('hours', 'Hours'), ('work_days','Work Days'), ('days', 'Days'),('weeks', 'Weeks'), ('months', 'Months')], 'Interval Unit'),
- 'numbercall': fields.integer('Number of Calls', help='Number of time the function is called,\na negative number indicates that the function will always be called'),
- 'doall' : fields.boolean('Repeat Missed'),
- 'nextcall' : fields.datetime('Next Execution Date', required=True),
- 'model': fields.char('Object', size=64),
- 'function': fields.char('Function', size=64),
- 'args': fields.text('Arguments'),
+ 'numbercall': fields.integer('Number of Calls', help='Number of time the function is called,\na negative number indicates no limit'),
+ 'doall' : fields.boolean('Repeat Missed', help="Enable this if you want to execute missed occurences as soon as the server restarts."),
+ 'nextcall' : fields.datetime('Next Execution Date', required=True, help="Next planned execution date for this scheduler"),
+ 'model': fields.char('Object', size=64, help="Name of object whose function will be called when this scheduler will run. e.g. 'res.partener'"),
+ 'function': fields.char('Function', size=64, help="Name of the method to be called on the object when this scheduler is executed."),
+ 'args': fields.text('Arguments', help="Arguments to be passed to the method. e.g. (uid,)"),
'priority': fields.integer('Priority', help='0=Very Urgent\n10=Not urgent')
}
diff --git a/bin/addons/base/ir/ir_filters.py b/bin/addons/base/ir/ir_filters.py
index 2821d0c94b7..8f9869a6922 100644
--- a/bin/addons/base/ir/ir_filters.py
+++ b/bin/addons/base/ir/ir_filters.py
@@ -42,7 +42,7 @@ class ir_filters(osv.osv):
'user_id':fields.many2one('res.users', 'User', help='False means for every user'),
'domain': fields.text('Domain Value', required=True),
'context': fields.text('Context Value', required=True),
- 'model_id': fields.selection(_list_all_models, 'Model', required=True),
+ 'model_id': fields.selection(_list_all_models, 'Object', required=True),
}
ir_filters()
diff --git a/bin/addons/base/ir/ir_report_custom.py b/bin/addons/base/ir/ir_report_custom.py
deleted file mode 100644
index ff81e48ff53..00000000000
--- a/bin/addons/base/ir/ir_report_custom.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-from osv.orm import browse_null
-import ir
-import report.custom
-from tools.translate import _
-from tools.safe_eval import safe_eval as eval
-import netsvc
-
-class report_custom_fields(osv.osv):
- _name = 'ir.report.custom.fields'
- _columns = {
- 'name': fields.char('Name', size=64, required=True),
- 'field_child0': fields.many2one('ir.model.fields', 'Field child0', required=True),
- 'fc0_operande': fields.many2one('ir.model.fields', 'Constraint'),
- 'fc0_condition': fields.char('Condition', size=64),
- 'fc0_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'),
- 'field_child1': fields.many2one('ir.model.fields', 'Field child1'),
- 'fc1_operande': fields.many2one('ir.model.fields', 'Constraint'),
- 'fc1_condition': fields.char('condition', size=64),
- 'fc1_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'),
- 'field_child2': fields.many2one('ir.model.fields', 'Field child2'),
- 'fc2_operande': fields.many2one('ir.model.fields', 'Constraint'),
- 'fc2_condition': fields.char('condition', size=64),
- 'fc2_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'),
- 'field_child3': fields.many2one('ir.model.fields', 'Field child3'),
- 'fc3_operande': fields.many2one('ir.model.fields', 'Constraint'),
- 'fc3_condition': fields.char('condition', size=64),
- 'fc3_op': fields.selection((('>','>'),('<','<'),('==','='),('in','in'),('gety,==','(year)=')), 'Relation'),
- 'alignment': fields.selection((('left','left'),('right','right'),('center','center')), 'Alignment', required=True),
- 'sequence': fields.integer('Sequence', required=True),
- 'width': fields.integer('Fixed Width'),
- 'operation': fields.selection((('none', 'None'),('calc_sum','Calculate Sum'),('calc_avg','Calculate Average'),('calc_count','Calculate Count'),('calc_max', 'Get Max'))),
- 'groupby' : fields.boolean('Group By'),
- 'bgcolor': fields.char('Background Color', size=64),
- 'fontcolor': fields.char('Font color', size=64),
- 'cumulate': fields.boolean('Accumulate')
- }
- _defaults = {
- 'alignment': lambda *a: 'left',
- 'bgcolor': lambda *a: 'white',
- 'fontcolor': lambda *a: 'black',
- 'operation': lambda *a: 'none',
- }
- _order = "sequence"
-
- def onchange_any_field_child(self, cr, uid, ids, field_id, level):
- if not(field_id):
- return {}
- next_level_field_name = 'field_child%d' % (level+1)
- next_level_operande = 'fc%d_operande' % (level+1)
- field = self.pool.get('ir.model.fields').browse(cr, uid, [field_id])[0]
- res = self.pool.get(field.model).fields_get(cr, uid, field.name)
- if res[field.name].has_key('relation'):
- cr.execute('select id from ir_model where model=%s', (res[field.name]['relation'],))
- (id,) = cr.fetchone() or (False,)
- if id:
- return {
- 'domain': {
- next_level_field_name: [('model_id', '=', id)],
- next_level_operande: [('model_id', '=', id)]
- },
- 'required': {
- next_level_field_name: True
- }
- }
- else:
- netsvc.Logger().notifyChannel('web-services', netsvc.LOG_WARNING, _("Using a relation field which uses an unknown object"))
- return {'required': {next_level_field_name: True}}
- else:
- return {'domain': {next_level_field_name: []}}
-
- def get_field_child_onchange_method(level):
- return lambda self, cr, uid, ids, field_id: self.onchange_any_field_child(cr, uid, ids, field_id, level)
-
- onchange_field_child0 = get_field_child_onchange_method(0)
- onchange_field_child1 = get_field_child_onchange_method(1)
- onchange_field_child2 = get_field_child_onchange_method(2)
-report_custom_fields()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/bin/addons/base/ir/ir_rule.py b/bin/addons/base/ir/ir_rule.py
index 16c2c8275d9..799a411c15f 100644
--- a/bin/addons/base/ir/ir_rule.py
+++ b/bin/addons/base/ir/ir_rule.py
@@ -137,7 +137,8 @@ class ir_rule(osv.osv):
def domain_get(self, cr, uid, model_name, mode='read', context={}):
dom = self._compute_domain(cr, uid, model_name, mode=mode)
if dom:
- return self.pool.get(model_name)._where_calc(cr, uid, dom, active_test=False)
+ query = self.pool.get(model_name)._where_calc(cr, uid, dom, active_test=False)
+ return query.where_clause, query.where_clause_params, query.tables
return [], [], ['"'+self.pool.get(model_name)._table+'"']
def unlink(self, cr, uid, ids, context=None):
diff --git a/bin/addons/base/ir/ir_values.py b/bin/addons/base/ir/ir_values.py
index 1f9a54516b6..310f3552403 100644
--- a/bin/addons/base/ir/ir_values.py
+++ b/bin/addons/base/ir/ir_values.py
@@ -176,7 +176,7 @@ class ir_values(osv.osv):
where.append('res_id=%s')
params.append(res_id)
- where.append('(user_id=%s or (user_id IS NULL))')
+ where.append('(user_id=%s or (user_id IS NULL)) order by id')
params.append(uid)
clause = ' and '.join(where)
cr.execute('select id,name,value,object,meta, key from ir_values where ' + clause, params)
diff --git a/bin/addons/base/ir/wizard/__init__.py b/bin/addons/base/ir/wizard/__init__.py
index b1a92b51272..99c6cdcd0de 100644
--- a/bin/addons/base/ir/wizard/__init__.py
+++ b/bin/addons/base/ir/wizard/__init__.py
@@ -19,6 +19,7 @@
#
##############################################################################
import wizard_menu
+import wizard_screen
import create_action
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/ir/wizard/wizard_screen.py b/bin/addons/base/ir/wizard/wizard_screen.py
new file mode 100644
index 00000000000..56f104d0b13
--- /dev/null
+++ b/bin/addons/base/ir/wizard/wizard_screen.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2010 OpenERP s.a. ().
+#
+# 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 .
+#
+##############################################################################
+import base64
+import os
+import random
+
+import tools
+from osv import fields,osv
+
+# Simple base class for wizards that wish to use random images on the left
+# side of the form.
+class wizard_screen(osv.osv_memory):
+ _name = 'ir.wizard.screen'
+
+ def _get_image(self, cr, uid, context=None):
+ path = os.path.join('base','res','config_pixmaps','%d.png'%random.randrange(1,4))
+ file_data = tools.file_open(path,'rb').read()
+ return base64.encodestring(file_data)
+
+ def _get_image_fn(self, cr, uid, ids, name, args, context=None):
+ image = self._get_image(cr, uid, context)
+ return dict.fromkeys(ids, image) # ok to use .fromkeys() as the image is same for all
+
+ _columns = {
+ 'config_logo': fields.function(_get_image_fn, string='Image', type='binary', method=True),
+ }
+
+ _defaults = {
+ 'config_logo': _get_image
+ }
+wizard_screen()
\ No newline at end of file
diff --git a/bin/addons/base/ir/workflow/workflow.py b/bin/addons/base/ir/workflow/workflow.py
index 8074d784e3c..30fd666c03e 100644
--- a/bin/addons/base/ir/workflow/workflow.py
+++ b/bin/addons/base/ir/workflow/workflow.py
@@ -171,7 +171,6 @@ class wkf_instance(osv.osv):
_log_access = False
_columns = {
'wkf_id': fields.many2one('workflow', 'Workflow', ondelete='cascade', select=True),
- 'uid': fields.integer('User ID'),
'res_id': fields.integer('Resource ID', select=True),
'res_type': fields.char('Resource Object', size=64, select=True),
'state': fields.char('State', size=32, select=True),
@@ -194,6 +193,7 @@ class wkf_workitem(osv.osv):
_rec_name = 'state'
_columns = {
'act_id': fields.many2one('workflow.activity', 'Activity', required=True, ondelete="cascade", select=True),
+ 'wkf_id': fields.related('act_id','wkf_id', type='many2one', relation='workflow', string='Workflow'),
'subflow_id': fields.many2one('workflow.instance', 'Subflow', ondelete="cascade", select=True),
'inst_id': fields.many2one('workflow.instance', 'Instance', required=True, ondelete="cascade", select=True),
'state': fields.char('State', size=64, select=True),
diff --git a/bin/addons/base/ir/workflow/workflow_view.xml b/bin/addons/base/ir/workflow/workflow_view.xml
index 3fb98efb8f9..b4e9b0daf46 100644
--- a/bin/addons/base/ir/workflow/workflow_view.xml
+++ b/bin/addons/base/ir/workflow/workflow_view.xml
@@ -1,7 +1,7 @@
-
+