obj_fiscal_position = self.pool.get('account.fiscal.position')
in_ids = obj_fiscal_position_template.search(cr, uid, [('chart_template_id', '=', obj_multi.chart_template_id.id)], order='id')
out_ids = obj_fiscal_position.search(cr, uid, [('company_id', '=', company_id)], order='id')
- return self.process_translations(cr, uid, langs, obj_fiscal_position_template, field, in_ids, obj_fiscal_position, out_ids, force_write=False, context=context)
+ return self.process_translations(cr, uid, langs, obj_fiscal_position_template, field, in_ids, obj_fiscal_position, out_ids, context=context)
-wizard_multi_charts_accounts()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
return [task.project_id.message_get_reply_to()[0] if task.project_id else False
for task in self.browse(cr, uid, ids, context=context)]
+ def check_mail_message_access(self, cr, uid, mids, operation, model_obj=None, context=None):
+ """ mail.message document permission rule: can post a new message if can read
+ because of portal document. """
+ if not model_obj:
+ model_obj = self
+ if operation == 'create':
+ model_obj.check_access_rights(cr, uid, 'read')
+ model_obj.check_access_rule(cr, uid, mids, 'read', context=context)
+ else:
+ return super(task, self).check_mail_message_access(cr, uid, mids, operation, model_obj=model_obj, context=context)
+
def message_new(self, cr, uid, msg, custom_values=None, context=None):
""" Override to updates the document according to the email. """
- if custom_values is None: custom_values = {}
+ if custom_values is None:
+ custom_values = {}
defaults = {
'name': msg.get('subject'),
'planned_hours': 0.0,