"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-12 05:25+0000\n"
+"X-Launchpad-Export-Date: 2014-03-13 07:15+0000\n"
"X-Generator: Launchpad (build 16963)\n"
#. module: account
result[event] = ""
return result
+ # hook method to fix the wrong signature
+ def _set_rulestring(self, cr, uid, ids, field_name, field_value, args, context=None):
+ return self._rrule_write(self, cr, uid, ids, field_name, field_value, args, context=context)
+
def _rrule_write(self, obj, cr, uid, ids, field_name, field_value, args, context=None):
+ if not isinstance(ids, list):
+ ids = [ids]
data = self._get_empty_rrule_data()
if field_value:
data['recurrency'] = True
for event in self.browse(cr, uid, ids, context=context):
- rdate = rule_date or event.date
- update_data = self._parse_rrule(field_value, dict(data), rdate)
+ update_data = self._parse_rrule(field_value, dict(data), event.date)
data.update(update_data)
- super(calendar_event, obj).write(cr, uid, ids, data, context=context)
+ super(calendar_event, self).write(cr, uid, ids, data, context=context)
return True
_columns = {
'exrule': fields.char('Exception Rule', size=352, help="Defines a \
rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, \
- fnct_inv=_rrule_write, store=True, string='Recurrent Rule'),
+ fnct_inv=_set_rulestring, store=True, string='Recurrent Rule'),
'rrule_type': fields.selection([
('daily', 'Day(s)'),
('weekly', 'Week(s)'),
#repeat monthly by nweekday ((weekday, weeknumber), )
if r._bynweekday:
data['week_list'] = day_list[r._bynweekday[0][0]].upper()
- data['byday'] = r._bynweekday[0][1]
+ data['byday'] = str(r._bynweekday[0][1])
data['select1'] = 'day'
data['rrule_type'] = 'monthly'
# set end_date for calendar searching
if vals.get('recurrency', True) and vals.get('end_type', 'count') in ('count', unicode('count')) and \
(vals.get('rrule_type') or vals.get('count') or vals.get('date') or vals.get('date_deadline')):
- for data in self.read(cr, uid, ids, ['date', 'date_deadline', 'recurrency', 'rrule_type', 'count', 'end_type'], context=context):
+ for data in self.read(cr, uid, ids, ['end_date', 'date_deadline', 'recurrency', 'rrule_type', 'count', 'end_type'], context=context):
end_date = self._set_recurrency_end_date(data, context=context)
super(calendar_event, self).write(cr, uid, [data['id']], {'end_date': end_date}, context=context)
return res
def _set_recurrency_end_date(self, data, context=None):
+ if not data.get('recurrency'):
+ return False
+
+ end_type = data.get('end_type')
end_date = data.get('end_date')
- rel_date = False
- if data.get('recurrency') and data.get('end_type') in ('count', unicode('count')):
- data_date_deadline = datetime.strptime(data.get('date_deadline'), '%Y-%m-%d %H:%M:%S')
- if data.get('rrule_type') in ('daily', unicode('count')):
- rel_date = relativedelta(days=data.get('count')+1)
- elif data.get('rrule_type') in ('weekly', unicode('weekly')):
- rel_date = relativedelta(days=(data.get('count')+1)*7)
- elif data.get('rrule_type') in ('monthly', unicode('monthly')):
- rel_date = relativedelta(months=data.get('count')+1)
- elif data.get('rrule_type') in ('yearly', unicode('yearly')):
- rel_date = relativedelta(years=data.get('count')+1)
- end_date = data_date_deadline
- if rel_date:
- end_date += rel_date
+
+ if end_type == 'count' and all(data.get(key) for key in ['count', 'rrule_type', 'date_deadline']):
+ count = data['count'] + 1
+ delay, mult = {
+ 'daily': ('days', 1),
+ 'weekly': ('days', 7),
+ 'monthly': ('months', 1),
+ 'yearly': ('years', 1),
+ }[data['rrule_type']]
+
+ deadline = datetime.strptime(data['date_deadline'], tools.DEFAULT_SERVER_DATETIME_FORMAT)
+ return deadline + relativedelta(**{delay: count * mult})
return end_date
def create(self, cr, uid, vals, context=None):
if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'):
vals['vtimezone'] = vals['vtimezone'][40:]
- vals['end_date'] = self._set_recurrency_end_date(vals, context=context)
res = super(calendar_event, self).create(cr, uid, vals, context)
+ data = self.read(cr, uid, [res], ['end_date', 'date_deadline', 'recurrency', 'rrule_type', 'count', 'end_type'], context=context)[0]
+ end_date = self._set_recurrency_end_date(data, context=context)
+ self.write(cr, uid, [res], {'end_date': end_date}, context=context)
+
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
self.create_attendees(cr, uid, [res], context)
-
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
+-
+ I create a recuring rule for my event
+-
+ !record {model: crm.meeting, id: crm_meeting_sprintreview1}:
+ name: Begin of month meeting
+ date: !eval time.strftime('%Y-%m-%d 12:00:00')
+ recurrency: true
+ rrule: FREQ=MONTHLY;INTERVAL=1;COUNT=12;BYDAY=1MO
+-
+ I check that the attributes are set correctly
+-
+ !assert {model: crm.meeting, id: crm_meeting_sprintreview1}:
+ - rrule_type == 'monthly'
+ - count == 12
+ - select1 == 'day'
+ - byday == '1'
+ - week_list == 'MO'
import psycopg2
from openerp.osv import orm, fields
+from openerp.osv.orm import BaseModel
from openerp.tools.translate import _
FIELDS_RECURSION_LIMIT = 2
}]
_logger.info('importing %d rows...', len(data))
- import_result = self.pool[record.res_model].load(
- cr, uid, import_fields, data, context=context)
+ # DO NOT FORWARD PORT, already fixed in trunk
+ # hack to avoid to call the load method from ir_translation (name clash)
+ if record.res_model == 'ir.translation':
+ import_result = BaseModel.load(self.pool['ir.translation'], cr, uid, import_fields, data, context=context)
+ else:
+ import_result = self.pool[record.res_model].load(cr, uid, import_fields, data, context=context)
_logger.info('done')
# If transaction aborted, RELEASE SAVEPOINT is going to raise
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2014-01-07 16:56+0000\n"
-"PO-Revision-Date: 2014-03-05 21:13+0000\n"
+"PO-Revision-Date: 2014-03-13 08:00+0000\n"
"Last-Translator: hiro TAKADA <tkhiro0712@gmail.com>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-06 06:14+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-14 06:58+0000\n"
+"X-Generator: Launchpad (build 16963)\n"
#. module: crm
#: view:crm.lead.report:0
msgid ""
"This field is used to distinguish stages related to Leads from stages "
"related to Opportunities, or to specify stages available for both types."
-msgstr ""
+msgstr "このフィールドは商談とリードの区別、あるいは両方を指定するために使用します。"
#. module: crm
#: model:mail.message.subtype,name:crm.mt_lead_create
#. module: crm
#: help:crm.case.stage,sequence:0
msgid "Used to order stages. Lower is better."
-msgstr ""
+msgstr "ステージの順位に使用します。 低いほど良好です。"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_phonecall_categ_action
msgid ""
"This stage is not visible, for example in status bar or kanban view, when "
"there are no records in that stage to display."
-msgstr ""
+msgstr "ステータスバーやかんばんビューで表示すべきレコードが存在しない場合、このステージは表示されません。"
#. module: crm
#: field:crm.lead.report,nbr:0
--- /dev/null
+# Chinese (Simplified) translation for openobject-addons
+# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2012-11-24 02:53+0000\n"
+"PO-Revision-Date: 2014-03-13 03:38+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-03-14 06:58+0000\n"
+"X-Generator: Launchpad (build 16963)\n"
+
+#. module: l10n_be_invoice_bba
+#: sql_constraint:account.invoice:0
+msgid "Invoice Number must be unique per Company!"
+msgstr "发票号必须在公司范围内唯一"
+
+#. module: l10n_be_invoice_bba
+#: model:ir.model,name:l10n_be_invoice_bba.model_account_invoice
+msgid "Invoice"
+msgstr "发票"
+
+#. module: l10n_be_invoice_bba
+#: constraint:res.partner:0
+msgid "Error ! You cannot create recursive associated members."
+msgstr "错误,您不能创建循环引用的会员用户"
+
+#. module: l10n_be_invoice_bba
+#: constraint:account.invoice:0
+msgid "Invalid BBA Structured Communication !"
+msgstr "BBA结构化传输有误!"
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Random"
+msgstr "随机"
+
+#. module: l10n_be_invoice_bba
+#: help:res.partner,out_inv_comm_type:0
+msgid "Select Default Communication Type for Outgoing Invoices."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: help:res.partner,out_inv_comm_algorithm:0
+msgid ""
+"Select Algorithm to generate the Structured Communication on Outgoing "
+"Invoices."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:109
+#: code:addons/l10n_be_invoice_bba/invoice.py:135
+#, python-format
+msgid ""
+"The daily maximum of outgoing invoices with an automatically generated BBA "
+"Structured Communications has been exceeded!\n"
+"Please create manually a unique BBA Structured Communication."
+msgstr "自动生成结构化BBA传输已超出每日销售发票的最大值,请手动建立BBA结构化传输"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:150
+#, python-format
+msgid "Error!"
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:121
+#, python-format
+msgid ""
+"The Partner should have a 3-7 digit Reference Number for the generation of "
+"BBA Structured Communications!\n"
+"Please correct the Partner record."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: constraint:res.partner:0
+msgid "Error: Invalid ean code"
+msgstr "错误:无效的EAN编码"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:108
+#: code:addons/l10n_be_invoice_bba/invoice.py:120
+#: code:addons/l10n_be_invoice_bba/invoice.py:134
+#: code:addons/l10n_be_invoice_bba/invoice.py:162
+#: code:addons/l10n_be_invoice_bba/invoice.py:172
+#: code:addons/l10n_be_invoice_bba/invoice.py:197
+#, python-format
+msgid "Warning!"
+msgstr "警告!"
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Customer Reference"
+msgstr "客户参考号"
+
+#. module: l10n_be_invoice_bba
+#: field:res.partner,out_inv_comm_type:0
+msgid "Communication Type"
+msgstr "讯息类型"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:173
+#: code:addons/l10n_be_invoice_bba/invoice.py:198
+#, python-format
+msgid ""
+"The BBA Structured Communication has already been used!\n"
+"Please create manually a unique BBA Structured Communication."
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: selection:res.partner,out_inv_comm_algorithm:0
+msgid "Date"
+msgstr "事务处理日期"
+
+#. module: l10n_be_invoice_bba
+#: model:ir.model,name:l10n_be_invoice_bba.model_res_partner
+msgid "Partner"
+msgstr "合作伙伴"
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:151
+#, python-format
+msgid ""
+"Unsupported Structured Communication Type Algorithm '%s' !\n"
+"Please contact your OpenERP support channel."
+msgstr "不支持的结构化传输算法类型\"%s\"!请联系你的OpenERP 维护人员"
+
+#. module: l10n_be_invoice_bba
+#: field:res.partner,out_inv_comm_algorithm:0
+msgid "Communication Algorithm"
+msgstr ""
+
+#. module: l10n_be_invoice_bba
+#: code:addons/l10n_be_invoice_bba/invoice.py:163
+#, python-format
+msgid ""
+"Empty BBA Structured Communication!\n"
+"Please fill in a unique BBA Structured Communication."
+msgstr ""
if res[id]['message_unread_count']:
title = res[id]['message_unread_count'] > 1 and _("You have %d unread messages") % res[id]['message_unread_count'] or _("You have one unread message")
res[id]['message_summary'] = "<span class='oe_kanban_mail_new' title='%s'><span class='oe_e'>9</span> %d %s</span>" % (title, res[id].pop('message_unread_count'), _("New"))
+ res[id].pop('message_unread_count', None)
return res
def _get_subscription_data(self, cr, uid, ids, name, args, context=None):
class pad_common(osv.osv_memory):
_name = 'pad.common'
+ def pad_is_configured(self, cr, uid, context=None):
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ return bool(user.company_id.pad_server)
+
def pad_generate_url(self, cr, uid, context=None):
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id;
.oe_pad_loading{
text-align: center;
opacity: 0.75;
+ font-style: italic;
}
.etherpad_readonly ul, .etherpad_readonly ol {
openerp.pad = function(instance) {
+ var _t = instance.web._t;
instance.web.form.FieldPad = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeWidgetMixin, {
template: 'FieldPad',
content: "",
init: function() {
+ var self = this;
this._super.apply(this, arguments);
- this.set("configured", true);
- this.on("change:configured", this, this.switch_configured);
+ this._configured_deferred = this.view.dataset.call('pad_is_configured').done(function(data) {
+ self.set("configured", !!data);
+ }).fail(function(data, event) {
+ event.preventDefault();
+ self.set("configured", true);
+ });
},
initialize_content: function() {
var self = this;
- this.switch_configured();
this.$('.oe_pad_switch').click(function() {
self.$el.toggleClass('oe_pad_fullscreen');
self.view.$el.find('.oe_chatter').toggle();
});
+ this._configured_deferred.always(function() {
+ var configured = self.get('configured');
+ self.$(".oe_unconfigured").toggle(!configured);
+ self.$(".oe_configured").toggle(configured);
+ });
this.render_value();
},
- switch_configured: function() {
- this.$(".oe_unconfigured").toggle(! this.get("configured"));
- this.$(".oe_configured").toggle(this.get("configured"));
- },
render_value: function() {
- var self = this;
- if (this.get("configured") && ! this.get("value")) {
- self.view.dataset.call('pad_generate_url', {
- context: {
- model: self.view.model,
- field_name: self.name,
- object_id: self.view.datarecord.id
- },
- }).done(function(data) {
- if (! data.url) {
- self.set("configured", false);
+ var self = this;
+ this._configured_deferred.always(function() {
+ if (! self.get('configured')) {
+ return;
+ };
+ var value = self.get('value');
+ if (self.get('effective_readonly')) {
+ if (_.str.startsWith(value, 'http')) {
+ this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
+ self.$('.oe_pad_content').removeClass('oe_pad_loading').html('<div class="oe_pad_readonly"><div>');
+ self.$('.oe_pad_readonly').html(data);
+ }).fail(function() {
+ self.$('.oe_pad_content').text(_t('Unable to load pad'));
+ });
} else {
- self.set("value", data.url);
+ self.$('.oe_pad_content').addClass('oe_pad_loading').show().text(_t("This pad will be initialized on first edit"));
+ }
+ }
+ else {
+ var def = $.when();
+ if (! value || !_.str.startsWith(value, 'http')) {
+ def = self.view.dataset.call('pad_generate_url', {
+ context: {
+ model: self.view.model,
+ field_name: self.name,
+ object_id: self.view.datarecord.id
+ },
+ }).done(function(data) {
+ if (! data.url) {
+ self.set("configured", false);
+ } else {
+ self.set("value", data.url);
+ }
+ });
}
- });
- }
- this.$('.oe_pad_content').html("");
- var value = this.get('value');
- if (this.pad_loading_request) {
- this.pad_loading_request.abort();
- }
- if (_.str.startsWith(value, 'http')) {
- if (! this.get('effective_readonly')) {
- var content = '<iframe width="100%" height="100%" frameborder="0" src="' + value + '?showChat=false&userName=' + this.session.username + '"></iframe>';
- this.$('.oe_pad_content').html(content);
- this._dirty_flag = true;
- } else {
- this.content = '<div class="oe_pad_loading">... Loading pad ...</div>';
- this.pad_loading_request = $.get(value + '/export/html').done(function(data) {
- groups = /\<\s*body\s*\>(.*?)\<\s*\/body\s*\>/.exec(data);
- data = (groups || []).length >= 2 ? groups[1] : '';
- self.$('.oe_pad_content').html('<div class="oe_pad_readonly"><div>');
- self.$('.oe_pad_readonly').html(data);
- }).fail(function() {
- self.$('.oe_pad_content').text('Unable to load pad');
+ def.then(function() {
+ value = self.get('value');
+ if (_.str.startsWith(value, 'http')) {
+ var content = '<iframe width="100%" height="100%" frameborder="0" src="' + value + '?showChat=false&userName=' + self.session.username + '"></iframe>';
+ self.$('.oe_pad_content').html(content);
+ self._dirty_flag = true;
+ }
+ else {
+ self.$('.oe_pad_content').text(value);
+ }
});
}
- }
+ });
},
});
'login': fields.related('user_id', 'login', string='Login', type='char', size=64, required=True, readonly=True),
'password': fields.char('Password', size=64, readonly=True),
'share_url': fields.function(_share_url, string='Share URL', type='char', size=512),
- 'share_wizard_id': fields.many2one('share.wizard', 'Share Wizard', required=True),
+ 'share_wizard_id': fields.many2one('share.wizard', 'Share Wizard', required=True, ondelete='cascade'),
'newly_created': fields.boolean('Newly created', readonly=True),
}
_defaults = {
</group>
<notebook>
<page string="Products">
- <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
+ <field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree', 'picking_type': 'internal'}" options='{"reload_on_button": true}'/>
<field name="note" placeholder="Add an internal note..." class="oe_inline"/>
</page>
<page string="Additional Info">
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Customer" domain="[('customer','=',True)]" />
</xpath>
<xpath expr="//field[@name='move_lines']" position="replace">
- <field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
+ <field name="move_lines" context="{'address_out_id': partner_id, 'picking_type': 'out', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">
<field name="partner_id" on_change="onchange_partner_in(partner_id)" string="Supplier" domain="[('supplier','=',True)]" context="{'default_supplier':1,'default_customer':0}"/>
</xpath>
<xpath expr="//field[@name='move_lines']" position="replace">
- <field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree'}" options='{"reload_on_button": true}'/>
+ <field name="move_lines" context="{'address_in_id': partner_id, 'picking_type': 'in', 'form_view_ref':'stock.view_move_picking_form', 'tree_view_ref':'stock.view_move_picking_tree'}" options='{"reload_on_button": true}'/>
</xpath>
<xpath expr="/form/sheet" position="after">
<div class="oe_chatter">
sign = -1;
field = field.slice(1);
}
+ //m2o should be searched based on value[1] not based whole value(i.e. [id, value])
+ if(_.isArray(a[field]) && a[field].length == 2 && _.isString(a[field][1])){
+ return sign * compare(a[field][1], b[field][1]);
+ }
return sign * compare(a[field], b[field]);
}, 0);
});
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2013-06-07 19:35+0000\n"
-"PO-Revision-Date: 2014-03-07 12:12+0000\n"
+"PO-Revision-Date: 2014-03-13 08:48+0000\n"
"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-08 06:53+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-14 06:58+0000\n"
+"X-Generator: Launchpad (build 16963)\n"
#. module: base
#: model:ir.module.module,description:base.module_account_check_writing
#. module: base
#: view:res.partner:0
msgid "(edit company address)"
-msgstr "(bijwerken adres bedrijf)"
+msgstr "(bijwerken bedrijfsadres)"
#. module: base
#: model:ir.module.module,summary:base.module_base_calendar
def change_password_button(self, cr, uid, id, context=None):
wizard = self.browse(cr, uid, id, context=context)[0]
- user_ids = []
- for user in wizard.user_ids:
- user_ids.append(user.id)
- self.pool.get('change.password.user').change_password_button(cr, uid, user_ids, context=context)
+ need_reload = any(uid == user.user_id.id for user in wizard.user_ids)
+ line_ids = [user.id for user in wizard.user_ids]
+
+ self.pool.get('change.password.user').change_password_button(cr, uid, line_ids, context=context)
# don't keep temporary password copies in the database longer than necessary
- self.pool.get('change.password.user').unlink(cr, uid, user_ids)
- return {
- 'type': 'ir.actions.act_window_close',
- }
+ self.pool.get('change.password.user').write(cr, uid, line_ids, {'new_passwd': False}, context=context)
+
+ if need_reload:
+ return {
+ 'type': 'ir.actions.client',
+ 'tag': 'reload'
+ }
+
+ return {'type': 'ir.actions.act_window_close'}
+
class change_password_user(osv.TransientModel):
"""
##############################################################################
#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>)
+# Copyright (C) 2004-2014 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
record.levelname = COLOR_PATTERN % (30 + fg_color, 40 + bg_color, record.levelname)
return DBFormatter.format(self, record)
+_logger_init = False
def init_logger():
+ global _logger_init
+ if _logger_init:
+ return
+ _logger_init = True
+
from tools.translate import resetlocale
resetlocale()
formatter = DBFormatter(format)
handler.setFormatter(formatter)
+ logging.getLogger().addHandler(handler)
+
# Configure handlers
default_config = [
'openerp.netsvc.rpc.request:INFO',
loggername, level = logconfig_item.split(':')
level = getattr(logging, level, logging.INFO)
logger = logging.getLogger(loggername)
- logger.handlers = []
logger.setLevel(level)
- logger.addHandler(handler)
- if loggername != '':
- logger.propagate = False
for logconfig_item in default_config + pseudo_config + logconfig:
_logger.debug('logger level set: "%s"', logconfig_item)