diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index ec2b23ff07b..0a5a759d0f7 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -292,15 +292,27 @@ class account_move_line(osv.osv): ml = self.browse(cr, uid, id, context) return map(lambda x: x.id, ml.move_id.line_id) - # TODO: this is false, it does not uses draft and closed periods - def _balance(self, cr, uid, ids, prop, unknow_none, unknow_dict): - res={} - # TODO group the foreach in sql - for id in ids: - cr.execute('SELECT date,account_id FROM account_move_line WHERE id=%s', (id,)) - dt, acc = cr.fetchone() - cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE account_id=%s AND (date<%s OR (date=%s AND id<=%s))', (acc,dt,dt,id)) - res[id] = cr.fetchone()[0] + def _balance(self, cr, uid, ids, name, arg, context=None): + if context is None: + context = {} + + c = context.copy() + c['initital_bal'] = True + + sql = [ + """select l2.id, sum(l1.debit-l1.credit) from account_move_line l1, account_move_line l2""", + """where l2.account_id=l1.account_id""", + """and""", + """l1.id<=l2.id""", + """and""", + """l2.id in %s""", + """and""", + self._query_get(cr, uid, obj='l1', context=c), + """ group by l2.id""", + ] + + cr.execute('\n'.join(sql), [tuple(ids)]) + res = dict(cr.fetchall()) return res def _invoice(self, cursor, user, ids, name, arg, context=None): diff --git a/addons/account_analytic_plans/i18n/nl.po b/addons/account_analytic_plans/i18n/nl.po index 3312a5bbe38..39d7454344b 100644 --- a/addons/account_analytic_plans/i18n/nl.po +++ b/addons/account_analytic_plans/i18n/nl.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2009-08-28 16:01+0000\n" -"PO-Revision-Date: 2010-09-30 13:07+0000\n" -"Last-Translator: Douwe Wullink (Dypalio) \n" +"PO-Revision-Date: 2010-10-01 11:48+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-10-01 08:47+0000\n" +"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_analytic_plans diff --git a/addons/account_anglo_saxon/i18n/nl.po b/addons/account_anglo_saxon/i18n/nl.po index 223258c73fa..c955e868340 100644 --- a/addons/account_anglo_saxon/i18n/nl.po +++ b/addons/account_anglo_saxon/i18n/nl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-11-24 12:50+0000\n" -"PO-Revision-Date: 2010-09-30 13:20+0000\n" -"Last-Translator: Douwe Wullink (Dypalio) \n" +"PO-Revision-Date: 2010-10-01 11:59+0000\n" +"Last-Translator: OpenERP Administrators \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n" +"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_anglo_saxon diff --git a/addons/account_coda/i18n/nl.po b/addons/account_coda/i18n/nl.po index 8a54707bf2d..ca39ba7fc79 100644 --- a/addons/account_coda/i18n/nl.po +++ b/addons/account_coda/i18n/nl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-11-24 13:11+0000\n" -"PO-Revision-Date: 2010-10-01 06:44+0000\n" -"Last-Translator: Douwe Wullink (Dypalio) \n" +"PO-Revision-Date: 2010-10-01 11:59+0000\n" +"Last-Translator: OpenERP Administrators \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n" +"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: account_coda diff --git a/addons/analytic/i18n/nl.po b/addons/analytic/i18n/nl.po index 24849b0b713..fbb8b85789d 100644 --- a/addons/analytic/i18n/nl.po +++ b/addons/analytic/i18n/nl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-06-18 10:59+0000\n" -"PO-Revision-Date: 2010-10-01 07:53+0000\n" -"Last-Translator: Douwe Wullink (Dypalio) \n" +"PO-Revision-Date: 2010-10-01 11:59+0000\n" +"Last-Translator: OpenERP Administrators \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n" +"X-Launchpad-Export-Date: 2010-10-02 05:05+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: analytic diff --git a/addons/base_action_rule/i18n/nl.po b/addons/base_action_rule/i18n/nl.po index 21385e6b602..6d6bc8f3d25 100644 --- a/addons/base_action_rule/i18n/nl.po +++ b/addons/base_action_rule/i18n/nl.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2010-08-19 12:20+0000\n" -"PO-Revision-Date: 2010-10-01 08:47+0000\n" -"Last-Translator: Douwe Wullink (Dypalio) \n" +"PO-Revision-Date: 2010-10-02 08:12+0000\n" +"Last-Translator: OpenERP Administrators \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2010-10-01 08:48+0000\n" +"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: base_action_rule @@ -185,42 +185,42 @@ msgstr "Laatste actiedatum" #. module: base_action_rule #: selection:base.action.rule,trg_date_range_type:0 msgid "Hours" -msgstr "" +msgstr "Uren" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_id)s = Object ID" -msgstr "" +msgstr "%(object_id)s = Object ID" #. module: base_action_rule #: view:base.action.rule:0 msgid "Delay After Trigger Date" -msgstr "" +msgstr "Vertraging na Activeerdatum" #. module: base_action_rule #: field:base.action.rule,act_remind_attach:0 msgid "Remind with Attachment" -msgstr "" +msgstr "Herinneren met bijlage" #. module: base_action_rule #: constraint:ir.cron:0 msgid "Invalid arguments" -msgstr "" +msgstr "Ongeldige argumenten" #. module: base_action_rule #: field:base.action.rule,act_user_id:0 msgid "Set Responsible to" -msgstr "" +msgstr "Zet verantwoordelijke op" #. module: base_action_rule #: selection:base.action.rule,trg_date_type:0 msgid "None" -msgstr "" +msgstr "Geen" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_user_phone)s = Responsible phone" -msgstr "" +msgstr "%(object_user_phone)s = Telefoon verantwoordelijke" #. module: base_action_rule #: view:base.action.rule:0 @@ -228,11 +228,14 @@ msgid "" "The rule uses the AND operator. The model must match all non-empty fields so " "that the rule executes the action described in the 'Actions' tab." msgstr "" +"De regel gebruikt een EN bewerking. Het model moet met alle niet-lege velden " +"overeenkomen om de regel de in de 'Acties' tab beschreven actie te laten " +"uitvoeren." #. module: base_action_rule #: field:base.action.rule,trg_date_range_type:0 msgid "Delay type" -msgstr "" +msgstr "Soort vertraging" #. module: base_action_rule #: help:base.action.rule,regex_name:0 @@ -242,11 +245,15 @@ msgid "" "string 'urgent'\n" "Note: This is case sensitive search." msgstr "" +"Reguliere expressie voor overeenkomende naam van de bron; \n" +"i.e.: 'urgent.*' zal zoeken naar records met de naam beginnend met de tekst " +"'urgent'\n" +"Opmerking: dit zoeken is hoofdletter gevoelig." #. module: base_action_rule #: field:base.action.rule,act_method:0 msgid "Call Object Method" -msgstr "" +msgstr "Object-methode aanroepen" #. module: base_action_rule #: help:base.action.rule,act_mail_to_watchers:0 @@ -254,31 +261,33 @@ msgid "" "Check this if you want the rule to mark CC(mail to any other person defined " "in actions)." msgstr "" +"Vink aan als u wilt dat de regel CC markeert (mail naar een andere in de " +"acties gedefinieerde persoon)." #. module: base_action_rule #: view:base.action.rule:0 msgid "%(partner)s = Partner name" -msgstr "" +msgstr "%(partner)s = Naam relatie" #. module: base_action_rule #: view:base.action.rule:0 msgid "Note" -msgstr "" +msgstr "Notitie" #. module: base_action_rule #: constraint:ir.ui.menu:0 msgid "Error ! You can not create recursive Menu." -msgstr "" +msgstr "Fout ! U kunt geen recursief menu maken." #. module: base_action_rule #: field:base.action.rule,trg_date_range:0 msgid "Delay after trigger date" -msgstr "" +msgstr "Vertraging na activeerdatum" #. module: base_action_rule #: view:base.action.rule:0 msgid "Conditions" -msgstr "" +msgstr "Voorwaarden" #. module: base_action_rule #: help:base.action.rule,trg_date_range:0 @@ -287,47 +296,50 @@ msgid "" "need a delay before the trigger date, like sending a reminder 15 minutes " "before a meeting." msgstr "" +"Vertraging na activeerdatum, specificeert dat u een negatief getal kunt " +"invoeren als u vertraging vóór de activeerdatum wilt, zoals een herinnering " +"15 minuten voor een vergadering versturen." #. module: base_action_rule #: field:base.action.rule,active:0 msgid "Active" -msgstr "" +msgstr "Actief" #. module: base_action_rule #: code:addons/base_action_rule/base_action_rule.py:0 #, python-format msgid "No E-Mail ID Found for your Company address!" -msgstr "" +msgstr "Geen email-ID gevonden bij uw bedrijfsadres!" #. module: base_action_rule #: field:base.action.rule,act_remind_user:0 msgid "Remind Responsible" -msgstr "" +msgstr "Herinneren verantwoordelijke" #. module: base_action_rule #: model:ir.module.module,description:base_action_rule.module_meta_information msgid "This module allows to implement action rules for any object." -msgstr "" +msgstr "Deze module laat u actieregels voor elk object implementeren." #. module: base_action_rule #: help:base.action.rule,sequence:0 msgid "Gives the sequence order when displaying a list of rules." -msgstr "" +msgstr "Geeft de volgorde aan waarin de lijst van regels wordt weergegeven." #. module: base_action_rule #: selection:base.action.rule,trg_date_range_type:0 msgid "Months" -msgstr "" +msgstr "Maanden" #. module: base_action_rule #: field:base.action.rule,filter_id:0 msgid "Filter" -msgstr "" +msgstr "Filter" #. module: base_action_rule #: selection:base.action.rule,trg_date_type:0 msgid "Date" -msgstr "" +msgstr "Datum" #. module: base_action_rule #: help:base.action.rule,server_action_id:0 @@ -335,108 +347,111 @@ msgid "" "Describes the action name.\n" "eg:on which object which action to be taken on basis of which condition" msgstr "" +"Beschrijft de actie naam.\n" +"ie: op welk object welke actie wordt uitgevoerd onder welke conditie" #. module: base_action_rule #: model:ir.model,name:base_action_rule.model_ir_cron msgid "ir.cron" -msgstr "" +msgstr "ir.cron" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_description)s = Object description" -msgstr "" +msgstr "%(object_description)s = Object omschrijving" #. module: base_action_rule #: view:base.action.rule:0 msgid "Email Actions" -msgstr "" +msgstr "Email acties" #. module: base_action_rule #: view:base.action.rule:0 msgid "Email Information" -msgstr "" +msgstr "Email Informatie" #. module: base_action_rule #: constraint:ir.model:0 msgid "" "The Object name must start with x_ and not contain any special character !" msgstr "" +"De objectnaam moet beginnen met x_ en mag geen speciale tekens bevatten !" #. module: base_action_rule #: model:ir.model,name:base_action_rule.model_base_action_rule msgid "Action Rules" -msgstr "" +msgstr "Actieregels" #. module: base_action_rule #: help:base.action.rule,act_mail_body:0 msgid "Content of mail" -msgstr "" +msgstr "Inhoud van mail" #. module: base_action_rule #: field:base.action.rule,trg_user_id:0 msgid "Responsible" -msgstr "" +msgstr "Verantwoordelijke" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(partner_email)s = Partner Email" -msgstr "" +msgstr "%(partner_email)s = Relatie email" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_date)s = Creation date" -msgstr "" +msgstr "%(object_date)s = Aanmaakdatum" #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_user_email)s = Responsible Email" -msgstr "" +msgstr "%(object_user_email)s = Verantwoordelijke email" #. module: base_action_rule #: field:base.action.rule,act_mail_body:0 msgid "Mail body" -msgstr "" +msgstr "E-mail berichttekst" #. module: base_action_rule #: field:base.action.rule,act_mail_to_watchers:0 msgid "Mail to Watchers (CC)" -msgstr "" +msgstr "E-mail naar toeschouwers (CC)" #. module: base_action_rule #: view:base.action.rule:0 msgid "Server Action to be Triggered" -msgstr "" +msgstr "Server actie om te activeren" #. module: base_action_rule #: field:base.action.rule,act_mail_to_user:0 msgid "Mail to Responsible" -msgstr "" +msgstr "E-mail naar verantwoordelijke" #. module: base_action_rule #: field:base.action.rule,act_email_cc:0 msgid "Add Watchers (Cc)" -msgstr "" +msgstr "Toevoegen toeschouwers (Cc)" #. module: base_action_rule #: view:base.action.rule:0 msgid "Conditions on Model Fields" -msgstr "" +msgstr "Voorwaarden op Model velden" #. module: base_action_rule #: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act #: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form msgid "Automated Actions" -msgstr "" +msgstr "Geautomatiseerde acties" #. module: base_action_rule #: field:base.action.rule,server_action_id:0 msgid "Server Action" -msgstr "" +msgstr "Server-actie" #. module: base_action_rule #: field:base.action.rule,regex_name:0 msgid "Regex on Resource Name" -msgstr "" +msgstr "Regex op bronnaam" #. module: base_action_rule #: help:base.action.rule,act_remind_attach:0 @@ -444,21 +459,23 @@ msgid "" "Check this if you want that all documents attached to the object be attached " "to the reminder email sent." msgstr "" +"Vink dit aan als u wilt dat alle bij het object gevoegde documenten worden " +"bijgevoegd bij de verstuurde herinnering." #. module: base_action_rule #: view:base.action.rule:0 msgid "Conditions on Timing" -msgstr "" +msgstr "Voorwaarden op timing" #. module: base_action_rule #: field:base.action.rule,sequence:0 msgid "Sequence" -msgstr "" +msgstr "Volgnummer" #. module: base_action_rule #: view:base.action.rule:0 msgid "Actions" -msgstr "" +msgstr "Acties" #. module: base_action_rule #: help:base.action.rule,active:0 @@ -466,23 +483,25 @@ msgid "" "If the active field is set to False, it will allow you to hide the rule " "without removing it." msgstr "" +"Als het actief veld uitzet, kunt u de regel verbergen zonder haar te " +"verwijderen." #. module: base_action_rule #: view:base.action.rule:0 msgid "%(object_user)s = Responsible name" -msgstr "" +msgstr "%(object_user)s = Naam verantwoordelijke" #. module: base_action_rule #: field:base.action.rule,create_date:0 msgid "Create Date" -msgstr "" +msgstr "Aanmaakdatum" #. module: base_action_rule #: view:base.action.rule:0 msgid "Conditions on States" -msgstr "" +msgstr "Voorwaarden op status" #. module: base_action_rule #: field:base.action.rule,trg_date_type:0 msgid "Trigger Date" -msgstr "" +msgstr "Activeerdatum" diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 5ccfbdb23d8..b71e2daa447 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -673,9 +673,10 @@ true, it will allow you to hide the event alarm information without removing it. new_res_alarm = res_alarm_obj.create(cr, uid, val, context=context) else: new_res_alarm = alarm_ids[0] - cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \ - where id=%s' % (model_obj._table, \ - cal_alarm.id, new_res_alarm, data.id)) + cr.execute('UPDATE %s ' % model_obj._table + \ + ' SET base_calendar_alarm_id=%s, alarm_id=%s ' \ + ' WHERE id=%s', + (cal_alarm.id, new_res_alarm, data.id)) self.do_alarm_unlink(cr, uid, [data.id], model) if basic_alarm: @@ -697,9 +698,10 @@ true, it will allow you to hide the event alarm information without removing it. 'user_id': uid } alarm_id = alarm_obj.create(cr, uid, vals) - cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \ - where id=%s' % (model_obj._table, \ - alarm_id, basic_alarm.id, data.id)) + cr.execute('UPDATE %s ' % model_obj._table + \ + ' SET base_calendar_alarm_id=%s, alarm_id=%s ' + ' WHERE id=%s', \ + ( alarm_id, basic_alarm.id, data.id) ) return True def do_alarm_unlink(self, cr, uid, ids, model, context=None): @@ -722,7 +724,7 @@ true, it will allow you to hide the event alarm information without removing it. if alarm_ids: alarm_obj.unlink(cr, uid, alarm_ids) cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\ - where id=%s' % (model_obj._table, datas.id)) + where id=%%d' % model_obj._table,(datas.id,)) return True res_alarm() @@ -994,10 +996,10 @@ class calendar_event(osv.osv): context = {} cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\ mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\ - day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id)) + day=0,select1='date',month_list=Null ,byday=Null where id=%%s" % (self._table), (id,)) if not value: - cr.execute("UPDATE %s set rrule_type='none' where id=%s" % (self._table, id)) + cr.execute("UPDATE %s set rrule_type='none' where id=%%s" % self._table,(id,)) return True val = {} for part in value.split(';'): @@ -1063,7 +1065,7 @@ class calendar_event(osv.osv): 'rule_type': rrule_type, 'id': id, }) - cr.execute(qry % val) + cr.execute(qry, val) # Hopefully psycopg2 works with dicts. But, FIXME return True def _get_rulestring(self, cr, uid, ids, name, arg, context=None): @@ -1081,7 +1083,7 @@ class calendar_event(osv.osv): if datas.get('rrule_type'): if datas.get('rrule_type') == 'none': result[event] = False - cr.execute("UPDATE %s set exrule=Null where id=%s" % (self._table, event)) + cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,)) elif datas.get('rrule_type') == 'custom': if datas.get('interval', 0) < 0: raise osv.except_osv('Warning!', 'Interval can not be Negative') @@ -1258,7 +1260,7 @@ true, it will allow you to hide the event alarm information without removing it. if defaults.get('location'): qry += ", location = '%(location)s'" qry += "WHERE id = %s" % (event_id) - cr.execute(qry %(defaults)) + cr.execute(qry, defaults) return True @@ -1283,8 +1285,7 @@ true, it will allow you to hide the event alarm information without removing it. if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \ m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \ - " m where m.id in ("\ - + ','.join(map(lambda x: str(x), ids))+")") + " m where m.id = ANY(%s)", (ids,) ) count = 0 for data in cr.dictfetchall(): @@ -1683,10 +1684,8 @@ class calendar_todo(osv.osv): @param context: A standard dictionary for contextual values """ - event = self.browse(cr, uid, id, context=context) - cr.execute("UPDATE %s set date_start='%s' where id=%s" \ - % (self._table, value, id)) - return True + assert name == 'date' + return self.write(cr, uid, id, { 'date_start': value }, context=context) _columns = { 'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \ diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index c3292452298..2a0ed14080f 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -122,7 +122,7 @@ separator="1" help="Delegated Invitations" /> - + diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index 98369962ab7..47f5681addf 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -159,8 +159,8 @@ send an Email to Invited Person') if not partner_id: return {'value': {'contact_ids': []}} - cr.execute('select id from res_partner_address \ - where partner_id=%s' % (partner_id)) + cr.execute('SELECT id FROM res_partner_address \ + WHERE partner_id=%s', (partner_id,)) contacts = map(lambda x: x[0], cr.fetchall()) return {'value': {'contact_ids': contacts}} diff --git a/addons/base_report_creator/base_report_creator_view.xml b/addons/base_report_creator/base_report_creator_view.xml index 8752a573725..ad438c710b4 100644 --- a/addons/base_report_creator/base_report_creator_view.xml +++ b/addons/base_report_creator/base_report_creator_view.xml @@ -143,34 +143,9 @@ - - - - base_report_creator.report.simple.tree - base_report_creator.report - tree - - - - - - - - - base_report_creator.report - tree - - - + diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml index 21537d3d63c..4ea4970d19a 100644 --- a/addons/base_report_designer/base_report_designer_installer.xml +++ b/addons/base_report_designer/base_report_designer_installer.xml @@ -72,21 +72,10 @@ {'menu':True} - - - - - - - - diff --git a/addons/base_setup/__init__.py b/addons/base_setup/__init__.py index 80680b6615e..59598f6577a 100644 --- a/addons/base_setup/__init__.py +++ b/addons/base_setup/__init__.py @@ -60,25 +60,15 @@ class base_setup_config_choice(osv.osv_memory): 'config_logo' : _get_image } - def set_default_menu(self, cr, uid, menu, context=None): - user = self.pool.get('res.users')\ - .browse(cr, uid, uid, context=context) - - user.write({'action_id': menu.id, - 'menu_id': menu.id}) - - def get_default_menu(self, cr, uid, context=None): - actions = self.pool.get('ir.actions.act_window') - - current_menu_id = actions.search(cr, uid, [('name','=','Menu')], - context=context) - assert len(current_menu_id) == 1,\ - 'A given user should only have one menu item' - return actions.browse(cr, uid, current_menu_id[0], context=context) + def reset_menu(self, cr, uid, context=None): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + menu_id = user._get_menu() + user.write({'action_id': False, + 'menu_id': menu_id}) + return self.pool.get('ir.actions.act_window').browse(cr, uid, menu_id, context=context) def menu(self, cr, uid, ids, context=None): - menu = self.get_default_menu(cr, uid, context=context) - self.set_default_menu(cr, uid, menu, context=context) + menu = self.reset_menu(cr, uid, context=context) if menu.view_id.id: view_id = (menu.view_id.id, menu.view_id.name) @@ -98,9 +88,7 @@ class base_setup_config_choice(osv.osv_memory): } def config(self, cr, uid, ids, context=None): - menu = self.get_default_menu(cr, uid, context=context) - self.set_default_menu(cr, uid, menu, context=context) - + self.reset_menu(cr, uid, context=context) return self.pool.get('res.config').next(cr, uid, [], context=context) base_setup_config_choice() diff --git a/addons/base_synchro/__openerp__.py b/addons/base_synchro/__openerp__.py index 69fcb839715..bd285821e2b 100644 --- a/addons/base_synchro/__openerp__.py +++ b/addons/base_synchro/__openerp__.py @@ -24,9 +24,12 @@ "version":"0.1", "author":"Tiny", "category":"Generic Modules/Base", + "description": """Synchronization with all objects.""", "depends":["base"], "demo_xml":[], - "update_xml":["base_synchro_wizard.xml","base_synchro_view.xml"], + "update_xml":[ "wizard/base_synchro_view.xml", + "base_synchro_view.xml", + "security/ir.model.access.csv",], "active":False, "installable":True, } diff --git a/addons/base_synchro/base_synchro_obj.py b/addons/base_synchro/base_synchro_obj.py index 5093c8f787e..64fad4cd687 100755 --- a/addons/base_synchro/base_synchro_obj.py +++ b/addons/base_synchro/base_synchro_obj.py @@ -42,7 +42,7 @@ class base_synchro_server(osv.osv): base_synchro_server() class base_synchro_obj(osv.osv): - '''Class to store the operations done by wizart''' + '''Class to store the operations done by wizard''' _name = "base.synchro.obj" _description = "Register Class" _columns = { @@ -66,6 +66,10 @@ class base_synchro_obj(osv.osv): # # Return a list of changes: [ (date, id) ] # + + def get_ids(self, cr, uid, object, dt, domain=[], context={}): + return self._get_ids(cr, uid, object, dt, domain, context) + def _get_ids(self, cr, uid, object, dt, domain=[], context={}): result = [] if dt: diff --git a/addons/base_synchro/base_synchro_view.xml b/addons/base_synchro/base_synchro_view.xml index 97995106070..e35a43837fa 100755 --- a/addons/base_synchro/base_synchro_view.xml +++ b/addons/base_synchro/base_synchro_view.xml @@ -30,6 +30,37 @@ + + base.synchro.obj.line.form + base.synchro.obj.line + search + + + + + + + + + + + + + + + + + + + + Filters + ir.actions.act_window + base.synchro.obj.line + form + + + + Synchronized instances @@ -56,7 +87,7 @@ - + @@ -81,6 +112,37 @@ + + base.synchro.obj.line.form + base.synchro.obj + search + + + + + + + + + + + + + + + + + + + + Filters + ir.actions.act_window + base.synchro.obj + form + + + + Synchronized objects ir.actions.act_window @@ -115,15 +177,15 @@ form
- - - - - - - - - + + + + + + + + +
diff --git a/addons/base_synchro/base_synchro_wizard.xml b/addons/base_synchro/base_synchro_wizard.xml deleted file mode 100644 index b26b3bbae2b..00000000000 --- a/addons/base_synchro/base_synchro_wizard.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/addons/base_synchro/security/ir.model.access.csv b/addons/base_synchro/security/ir.model.access.csv new file mode 100644 index 00000000000..fa0f00e8ccd --- /dev/null +++ b/addons/base_synchro/security/ir.model.access.csv @@ -0,0 +1,5 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"base_synchro_server","base.synchro.server","model_base_synchro_server","base.group_system",1,1,1,1 +" base_synchro_obj"," base.synchro.obj","model_base_synchro_obj","base.group_system",1,1,1,1 +"base_synchro_obj_avoid","base.synchro.obj.avoid","model_base_synchro_obj_avoid","base.group_system",1,1,1,1 +"base_synchro_obj_line","base.synchro.obj.line","model_base_synchro_obj_line","base.group_system",1,1,1,1 diff --git a/addons/base_synchro/wizard/__init__.py b/addons/base_synchro/wizard/__init__.py index 7ff450acd76..3deff83f9e3 100644 --- a/addons/base_synchro/wizard/__init__.py +++ b/addons/base_synchro/wizard/__init__.py @@ -19,4 +19,5 @@ # ############################################################################## import base_synchro + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_synchro/wizard/base_synchro.py b/addons/base_synchro/wizard/base_synchro.py index 3a394d4ba3b..c83ec7df0e9 100644 --- a/addons/base_synchro/wizard/base_synchro.py +++ b/addons/base_synchro/wizard/base_synchro.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +## -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution @@ -18,7 +18,6 @@ # along with this program. If not, see . # ############################################################################## -import wizard import osv from datetime import date import time @@ -27,26 +26,7 @@ import xmlrpclib import re import tools import threading - -acc_synchro_form = ''' -
- - - - - -''' - -acc_synchro_fields = { - 'server_url': {'string':'Server URL', 'type':'many2one', 'relation':'base.synchro.server','required':True}, - 'user_id': {'string':'Send Result To', 'type':'many2one', 'relation':'res.users', 'default': lambda uid,data,state: uid}, -} - -finish_form =''' -
-