bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def prepare_unlink(self, cr, uid, storage_bo, fil_bo): """ Before we unlink a file (fil_boo), prepare the list of real files that have to be removed, too. """
def prepare_unlink(self, cr, uid, storage_bo, fil_bo): """ Before we unlink a file (fil_boo), prepare the list of real files that have to be removed, too. """
467,100
def simple_rename(self, cr, uid, file_node, new_name, context=None): """ A preparation for a file rename. It will not affect the database, but merely check and perhaps rename the realstore file. @return the dict of values that can safely be be stored in the db. """ sbro = self.browse(cr, uid, file_node.storage_id, con...
def if not sbro.online: raise IOError(errno.EREMOTE, 'medium offline') if sbro.readonly: raise IOError(errno.EPERM, "Readonly medium") simple_rename(self, if not sbro.online: raise IOError(errno.EREMOTE, 'medium offline') if sbro.readonly: raise IOError(errno.EPERM, "Readonly medium") cr, if not sbro.online: raise ...
467,101
def _get_group(self,cr, uid, context={}): ids = self.pool.get('res.groups').search(cr, uid, [('name','=','Employee')]) return ids or False
def _get_group(self,cr, uid, context={}): ids = self.pool.get('res.groups').search(cr, uid, [('name','=','Employee')]) return ids or False
467,102
def _get_survey(self, cr, uid, context=None): """ Set the value In survey_id field.
def _get_survey(self, cr, uid, context=None): """ Set the value In survey_id field.
467,103
def _get_survey(self, cr, uid, context=None): """ Set the value In survey_id field.
def _get_survey(self, cr, uid, context=None): """ Set the value In survey_id field.
467,104
def _getAnalyticJournal(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: journal = self.browse(cr, uid, id[0], context=context) if journal.journal_id: return journal.journal_id.id return False
def _getAnalyticJournal(self, cr, uid, context=None): md = self.pool.get('ir.model.data') try: result = md.get_object_reference(cr, uid, 'hr_timesheet', 'analytic_journal') return result[1] except ValueError, e: pass return False
467,105
def _getAnalyticJournal(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: journal = self.browse(cr, uid, id[0], context=context) if journal.journal_id: return journal.journal_id.id return False
def _getAnalyticJournal(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: journal = self.browse(cr, uid, id[0], context=context) if journal.journal_id: return journal.journal_id.id return False
467,106
def _getEmployeeProduct(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: prod = self.browse(cr, uid, id[0], context=context) if prod.product_id: return prod.product_id.id return False
def _getEmployeeProduct(self, cr, uid, context=None): md = self.pool.get('ir.model.data') try: result = md.get_object_reference(cr, uid, 'hr_timesheet', 'product_consultant') return result[1] except ValueError, e: pass return False
467,107
def _getEmployeeProduct(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: prod = self.browse(cr, uid, id[0], context=context) if prod.product_id: return prod.product_id.id return False
def _getEmployeeProduct(self, cr, uid, context=None): if context is None: context = {} id = self.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context) if id: prod = self.browse(cr, uid, id[0], context=context) if prod.product_id: return prod.product_id.id return False
467,108
def default_get(self, cr, uid, fields_list, context=None): self.view_init(cr, uid, fields_list, context) if not context: context = {} # we define default value for each field existing in the object value = dict.fromkeys(fields_list) # get the default values for the inherited fields for f in fields_list: if f in self._d...
def default_get(self, cr, uid, fields_list, context=None): self.view_init(cr, uid, fields_list, context) if not context: context = {} # we define default value for each field existing in the object value = dict.fromkeys(fields_list, False) # get the default values for the inherited fields for f in fields_list: if f in ...
467,109
def die(cond, msg): if cond: print msg sys.exit(1)
def die(cond, msg): if cond: print msg sys.exit(1)
467,110
def create_report(self, cr, uid, res_ids, report_name=False, file_name=False, context=None): """ If any user give answer of survey then last create report of this answer and if 'E-mail Notification on Answer' set True in survey then send mail on responsible person of this survey and attach survey answer report in pdf ...
def create_report(self, cr, uid, res_ids, report_name=False, file_name=False, context=None): """ If any user give answer of survey then last create report of this answer and if 'E-mail Notification on Answer' set True in survey then send mail on responsible person of this survey and attach survey answer report in pdf ...
467,111
def button_confirm(self, cr, uid, ids, context={}): done = [] res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') account_move_obj = self.pool.get('account.move') account_move_line_obj = self.pool.get('account.move.line') account_bank_statement_line_obj = \ self.pool.get('account...
def button_confirm(self, cr, uid, ids, context={}): done = [] res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') account_move_obj = self.pool.get('account.move') account_move_line_obj = self.pool.get('account.move.line') account_bank_statement_line_obj = \ self.pool.get('account...
467,112
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
467,113
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
467,114
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
def _flowable(self, node, extra_style=None): if node.tag=='pto': return self._pto(node) if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node...
467,115
def open_document(self, cr, uid, ids, context): """ To Open Document @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of messages @param context: A standard dictionary """ action_data = False if ids: message_id = ids[0] mailgate_data = self....
def open_document(self, cr, uid, ids, context): """ To Open Document @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of messages @param context: A standard dictionary """ action_data = False if ids: message_id = ids[0] mailgate_data = self....
467,116
def open_document(self, cr, uid, ids, context): """ To Open Document @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of messages @param context: A standard dictionary """ action_data = False if ids: message_id = ids[0] mailgate_data = self....
def open_document(self, cr, uid, ids, context): """ To Open Document @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of messages @param context: A standard dictionary """ action_data = False if ids: message_id = ids[0] mailgate_data = self....
467,117
def copy(self, cr, uid, id, default=None, context={}): group_name = self.read(cr, uid, [id], ['name'])[0]['name'] default.update({'name': _('%s (copy)')%group_name}) return super(groups, self).copy(cr, uid, id, default, context)
def copy(self, cr, uid, id, default=None, context=None): group_name = self.read(cr, uid, [id], ['name'])[0]['name'] default.update({'name': _('%s (copy)')%group_name}) return super(groups, self).copy(cr, uid, id, default, context)
467,118
def _lang_get(self, cr, uid, context={}): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, [('translatable','=',True)]) res = obj.read(cr, uid, ids, ['code', 'name'], context) res = [(r['code'], r['name']) for r in res] return res
def _lang_get(self, cr, uid, context=None): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, [('translatable','=',True)]) res = obj.read(cr, uid, ids, ['code', 'name'], context) res = [(r['code'], r['name']) for r in res] return res
467,119
def _lang_get(self, cr, uid, context={}): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, [('translatable','=',True)]) res = obj.read(cr, uid, ids, ['code', 'name'], context) res = [(r['code'], r['name']) for r in res] return res
def _lang_get(self, cr, uid, context={}): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, [('translatable','=',True)]) res = obj.read(cr, uid, ids, ['code', 'name'], context=context) res = [(r['code'], r['name']) for r in res] return res
467,120
def _tz_get(self,cr,uid, context={}): return [(x, x) for x in pytz.all_timezones]
def _tz_get(self,cr,uid, context=None): return [(x, x) for x in pytz.all_timezones]
467,121
def copy(self, cr, uid, id, default=None, context={}): user2copy = self.read(cr, uid, [id], ['login','name'])[0] if default is None: default = {} copy_pattern = _("%s (copy)") default.update(login=(copy_pattern % user2copy['login']), name=(copy_pattern % user2copy['name']), address_id=False, # avoid sharing the address...
def copy(self, cr, uid, id, default=None, context=None): user2copy = self.read(cr, uid, [id], ['login','name'])[0] if default is None: default = {} copy_pattern = _("%s (copy)") default.update(login=(copy_pattern % user2copy['login']), name=(copy_pattern % user2copy['name']), address_id=False, # avoid sharing the addre...
467,122
def action_get(self, cr, uid, context={}): dataobj = self.pool.get('ir.model.data') data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my') return dataobj.browse(cr, uid, data_id, context).res_id
def action_get(self, cr, uid, context=None): dataobj = self.pool.get('ir.model.data') data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my') return dataobj.browse(cr, uid, data_id, context).res_id
467,123
def action_get(self, cr, uid, context={}): dataobj = self.pool.get('ir.model.data') data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my') return dataobj.browse(cr, uid, data_id, context).res_id
def action_get(self, cr, uid, context={}): dataobj = self.pool.get('ir.model.data') data_id = dataobj._get_id(cr, 1, 'base', 'action_res_users_my') return dataobj.browse(cr, uid, data_id, context).res_id
467,124
def login(self, db, login, password): if not password: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) res = cr.fetchone() result = False if res: cr.execute("update res_users set date=%s where id=%s"...
def login(self, db, login, password): if not password: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) res = cr.fetchone() result = False if res: cr.execute("update res_users set date=%s where id=%s"...
467,125
def check(self, db, uid, passwd): if not passwd: return False cached_pass = self._uid_cache.get(db, {}).get(uid) if (cached_pass is not None) and cached_pass == passwd: return True cr = pooler.get_db(db).cursor() cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, T...
def check(self, db, uid, passwd): if not passwd: return False cached_pass = self._uid_cache.get(db, {}).get(uid) if (cached_pass is not None) and cached_pass == passwd: return True cr = pooler.get_db(db).cursor() cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, T...
467,126
def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0]
def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0]
467,127
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
def tax_ids = self.pool.get('account.tax').search(cr, uid, [('company_id', '=', company_id)]) product_id_change(self, tax_ids = self.pool.get('account.tax').search(cr, uid, [('company_id', '=', company_id)]) cr, tax_ids = self.pool.get('account.tax').search(cr, uid, [('company_id', '=', company_id)]) uid, tax_ids = sel...
467,128
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
467,129
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
467,130
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
defproduct_id_change(self,cr,uid,ids,product,uom,qty=0,name='',type='out_invoice',partner_id=False,fposition_id=False,price_unit=False,address_invoice_id=False,currency_id=False,context=None):ifcontextisNone:context={}company_id=context.get('company_id',False)ifnotpartner_id:raiseosv.except_osv(_('NoPartnerDefined!'),_...
467,131
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep...
467,132
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,133
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,134
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,135
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,136
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,137
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,138
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,139
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac...
467,140
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op...
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False operator = ( operator in ['<','>','<=','>='] ) and 'in' or operator dict_op = {'not in':'!=','in':'=','=':'in','!=':'not in','<>':'not in'} if isinstance(right,tupl...
467,141
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op...
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op...
467,142
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_a...
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense if not acc: acc = l.product_id.categ_id.property_acco...
467,143
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_a...
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_a...
467,144
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string according to value type RECUR of iCalendar from the values given. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: diction...
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string according to value type RECUR of iCalendar from the values given. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: diction...
467,145
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string according to value type RECUR of iCalendar from the values given. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: diction...
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string according to value type RECUR of iCalendar from the values given. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: diction...
467,146
def write(self, cr, uid, ids, vals, context={}): resource_calendar_obj = self.pool.get('resource.calendar') resource_obj = self.pool.get('resource.resource') if not context: context = {} if context.get('scheduler',False): return super(task, self).write(cr, uid, ids, vals, context=context)
def write(self, cr, uid, ids, vals, context={}): resource_calendar_obj = self.pool.get('resource.calendar') resource_obj = self.pool.get('resource.resource') if not context: context = {} if context.get('scheduler',False): return super(task, self).write(cr, uid, ids, vals, context=context)
467,147
def unlink(self, cr, uid, ids, context=None): for id in ids: if len(str(id).split('-')) > 1: date_new = time.strftime("%Y-%m-%d %H:%M:%S", \ time.strptime(str(str(id).split('-')[1]), "%Y%m%d%H%M%S")) for record in self.read(cr, uid, [common.caldevIDs2readIDs(id)], \ ['date', 'rdates', 'rrule', 'exdate']): if record['rr...
def unlink(self, cr, uid, ids, context=None): for id in ids: if len(str(id).split('-')) > 1: date_new = time.strftime("%Y-%m-%d %H:%M:%S", \ time.strptime(str(str(id).split('-')[1]), "%Y%m%d%H%M%S")) for record in self.read(cr, uid, [common.caldevIDs2readIDs(id)], \ ['date', 'rrule', 'exdate']): if record['rrule']: exd...
467,148
def _membership_cancel(self, cr, uid, ids, name, args, context=None): '''Return the cancel date of membership''' res = {} member_line_obj = self.pool.get('membership.membership_line') for partner in self.browse(cr, uid, ids, context=context): if partner.membership_state != 'canceled': res[partner.id] = False else: line...
def _membership_cancel(self, cr, uid, ids, name, args, context=None): '''Return the cancel date of membership''' res = {} member_line_obj = self.pool.get('membership.membership_line') for partner in self.browse(cr, uid, ids, context=context): res[partner.id] = False if partner.membership_state == 'canceled': line_id = ...
467,149
def _membership_cancel(self, cr, uid, ids, name, args, context=None): '''Return the cancel date of membership''' res = {} member_line_obj = self.pool.get('membership.membership_line') for partner in self.browse(cr, uid, ids, context=context): if partner.membership_state != 'canceled': res[partner.id] = False else: line...
def _membership_cancel(self, cr, uid, ids, name, args, context=None): '''Return the cancel date of membership''' res = {} member_line_obj = self.pool.get('membership.membership_line') for partner in self.browse(cr, uid, ids, context=context): if partner.membership_state != 'canceled': res[partner.id] = False else: line...
467,150
def _get_partners(self, cr, uid, ids, context={}): ids2 = ids while ids2: ids2 = self.search(cr, uid, [('associate_member','in',ids2)], context=context) ids+=ids2 return ids
def _get_partners(self, cr, uid, ids, context={}): ids2 = ids while ids2: ids2 = self.search(cr, uid, [('associate_member','in',ids2)], context=context) ids+=ids2 return ids
467,151
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param view_id: list of fields, which required to read signatures @param view_type: defines a view type. it can be one of ...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param view_id: list of fields, which required to read signatures @param view_type: defines a view type. it can be one of ...
467,152
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param view_id: list of fields, which required to read signatures @param view_type: defines a view type. it can be one of ...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param view_id: list of fields, which required to read signatures @param view_type: defines a view type. it can be one of ...
467,153
def _child_get(self, cr, name=False, parent_id=False, domain=None): dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) where = [('collection_id','=',self.dir_id)] if name: where.append(('name','=',name)) if not domain: domain = [] where = where + domain fil_obj ...
def _child_get(self, cr, name=False, parent_id=False, domain=None): dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) where = [('collection_id','=',self.dir_id)] ext = False if name: res = name.split('.ics') if len(res) > 1: name = res[0] ext = '.ics' if name: ...
467,154
def _child_get(self, cr, name=False, parent_id=False, domain=None): dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) where = [('collection_id','=',self.dir_id)] if name: where.append(('name','=',name)) if not domain: domain = [] where = where + domain fil_obj ...
def _child_get(self, cr, name=False, parent_id=False, domain=None): dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) where = [('collection_id','=',self.dir_id)] if name: where.append(('name','=',name)) if not domain: domain = [] where = where + domain fil_obj ...
467,155
def __init__(self,path, parent, context, res_obj, res_model, res_id=None): super(res_node_calendar,self).__init__(path, parent, context) self.calendar_id = parent.calendar_id self.mimetype = 'text/calendar' self.create_date = parent.create_date self.write_date = parent.write_date or parent.create_date if res_obj: self....
def __init__(self,path, parent, context, res_obj, res_model=None, res_id=None): super(res_node_calendar,self).__init__(path, parent, context) self.mimetype = 'text/calendar' self.create_date = parent.create_date self.write_date = parent.write_date or parent.create_date if res_obj: self.create_date = res_obj.create_date...
467,156
def _get_ttag(self,cr): return '%s_%d' % (self.model, self.res_id)
def _get_ttag(self,cr): return '%s_%d' % (self.model, self.res_id)
467,157
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ Overrides orm write method. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm meeting's ids @param vals: Dictionary of ...
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ Overrides orm write method. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm meeting's ids @param vals: Dictionary of ...
467,158
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ Overrides orm write method. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm meeting's ids @param vals: Dictionary of ...
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ Overrides orm write method. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm meeting's ids @param vals: Dictionary of ...
467,159
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" create or replace view purchase_report as ( select min(l.id) as id, s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_appro...
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" create or replace view purchase_report as ( select min(l.id) as id, s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_appro...
467,160
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" create or replace view purchase_report as ( select min(l.id) as id, s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_appro...
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'purchase_report') cr.execute(""" create or replace view purchase_report as ( select min(l.id) as id, s.date_order as date, to_char(s.date_order, 'YYYY') as name, to_char(s.date_order, 'MM') as month, to_char(s.date_order, 'YYYY-MM-DD') as day, s.state, s.date_appro...
467,161
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = [] if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting...
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = [] if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting...
467,162
def _models_field_get(self, cr, uid, field_key, field_value, context=None): get = attrgetter(field_key, field_value) obj = self.pool.get('ir.model.fields') ids = obj.search(cr, uid, [('view_load','=',1)], context=context) res = set() for o in obj.browse(cr, uid, ids, context=context): res.add(get(o)) return res
def _models_field_get(self, cr, uid, field_key, field_value, context=None): get = attrgetter(field_key, field_value) obj = self.pool.get('ir.model.fields') ids = obj.search(cr, uid, [('view_load','=',1)], context=context) res = set() for o in obj.browse(cr, uid, ids, context=context): res.add(get(o)) return res
467,163
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, openobject_id=False, ssl=False, debug=False, subtype='plain', x_headers=None, priority='3'): """Send an email. Arguments: `email_from`: A string used to fill the `From` header, if falsy, config['email_from...
def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, openobject_id=False, ssl=False, debug=False, subtype='plain', x_headers=None, priority='3'): """Send an email. Arguments: `email_from`: A string used to fill the `From` header, if falsy, config['email_from...
467,164
def compute_refund(self, cr, uid, ids, mode, context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs
def compute_refund(self, cr, uid, ids, mode, context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs
467,165
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False)
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False)
467,166
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False)
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False)
467,167
def do_action(self, cr, uid, action, model_obj, obj, context=None): """ Do Action @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param action: pass action @param model_obj: pass Model object @param context: A standard diction...
def do_action(self, cr, uid, action, model_obj, obj, context=None): """ Do Action @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param action: pass action @param model_obj: pass Model object @param context: A standard diction...
467,168
def get_module_info(self, name): info = {} try: info = addons.load_information_from_description_file(name) if 'version' in info: info['version'] = release.major_version + '.' + info['version'] except Exception: self.__logger.debug('Error when trying to fetch informations for ' 'module %s', name, exc_info=True) return i...
@classmethod def get_module_info(cls, name): info = {} try: info = addons.load_information_from_description_file(name) if 'version' in info: info['version'] = release.major_version + '.' + info['version'] except Exception: self.__logger.debug('Error when trying to fetch informations for ' 'module %s', name, exc_info=Tr...
467,169
def get_module_info(self, name): info = {} try: info = addons.load_information_from_description_file(name) if 'version' in info: info['version'] = release.major_version + '.' + info['version'] except Exception: self.__logger.debug('Error when trying to fetch informations for ' 'module %s', name, exc_info=True) return i...
def get_module_info(self, name): info = {} try: info = addons.load_information_from_description_file(name) if 'version' in info: info['version'] = release.major_version + '.' + info['version'] except Exception: cls.__logger.debug('Error when trying to fetch informations for ' 'module %s', name, exc_info=True) return in...
467,170
def state_update(self, cr, uid, ids, newstate, states_to_update, context=None, level=100): if level<1: raise orm.except_orm(_('Error'), _('Recursion error in modules dependencies !')) demo = False for module in self.browse(cr, uid, ids): mdemo = False for dep in module.dependencies_id: if dep.state == 'unknown': raise ...
def state_update(self, cr, uid, ids, newstate, states_to_update, context=None, level=100): if level<1: raise orm.except_orm(_('Error'), _('Recursion error in modules dependencies !')) demo = False for module in self.browse(cr, uid, ids): mdemo = False for dep in module.dependencies_id: if dep.state == 'unknown': raise ...
467,171
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, qty, uom, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,172
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,173
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,174
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,175
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, qty, uom, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,176
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,177
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,178
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,179
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
467,180
def price_by_product(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False): if not product_id: return 0.0 if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) p_obj = self.pool.get('product.produ...
def price_by_product(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False): if not product_id: return 0.0 if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) p_obj = self.pool.get('product.produ...
467,181
def price_by_product(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False): if not product_id: return 0.0 if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) p_obj = self.pool.get('product.produ...
def price_by_product(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False): if not product_id: return 0.0 if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist in the sale form !\n' \ 'Please set one before choosing a product.')) p_obj = self.pool.get('product.produ...
467,182
def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=False, fiscal_position=False, date_planned=False, name=False, price_unit=False, notes=False): if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist or a supplier in the purchase form !\...
def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom, partner_id, date_order=False, fiscal_position=False, date_planned=False, name=False, price_unit=False, notes=False): if not pricelist: raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist or a supplier in the purchase form !\...
467,183
def import_cal(self, cr, uid, content, data_id=None, context=None): """ Import Calendar @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param data_id: Get Data’s ID or False @param context: A standard dictionary for contextual...
def import_cal(self, cr, uid, content, data_id=None, context=None): """ Import Calendar @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param data_id: Get Data’s ID or False @param context: A standard dictionary for contextual...
467,184
def create(self, cr, uid, vals, context=None): """ create calendar's line @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param vals: Get the Values @param context: A standard dictionary for contextual values """
def create(self, cr, uid, vals, context=None): """ create calendar's line @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param vals: Get the Values @param context: A standard dictionary for contextual values """
467,185
def import_cal(self, cr, uid, ical_data, context=None): """ Import Calendar @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ical_data: Get calendar's Data @param context: A standard dictionary for contextual values """
def import_cal(self, cr, uid, ical_data, context=None): """ Import Calendar @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ical_data: Get calendar's Data @param context: A standard dictionary for contextual values """
467,186
def fields_get(self, cr, user, fields=None, context=None): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_get(cr, user, fields, context) report = self.browse(cr, user, context['report_id']) models = {} for model in report.model_ids: models[model.model] = self.pool.get(model.mo...
def fields_get(self, cr, user, fields=None, context=None): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_get(cr, user, fields, context) report = self.browse(cr, user, context['report_id']) models = {} for model in report.model_ids: models[model.model] = self.pool.get(model.mo...
467,187
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
467,188
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
467,189
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
467,190
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
467,191
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False): if (not context) or 'report_id' not in context: return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar) report = self.browse(cr, user, context['report_id']) models = {} for model ...
467,192
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if (not context) or 'report_id' not in context: return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count) report = self.browse(cr, user, context['report_id']) i = 0 fields = {} for f in r...
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if (not context) or 'report_id' not in context: return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count) report = self.browse(cr, user, context['report_id']) i = 0 fields = {} for f in r...
467,193
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if (not context) or 'report_id' not in context: return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count) report = self.browse(cr, user, context['report_id']) i = 0 fields = {} for f in r...
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if (not context) or 'report_id' not in context: return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count) report = self.browse(cr, user, context['report_id']) i = 0 fields = {} for f in r...
467,194
def _sql_query_get(self, cr, uid, ids, prop, unknow_none, context, where_plus=[], limit=None, offset=None): result = {} for obj in self.browse(cr, uid, ids): fields = [] groupby = [] i = 0 for f in obj.field_ids: t = self.pool.get(f.field_id.model_id.model)._table if f.group_method == 'group': fields.append('\t'+t+'.'+...
def _sql_query_get(self, cr, uid, ids, prop, unknow_none, context, where_plus=[], limit=None, offset=None): result = {} for obj in self.browse(cr, uid, ids): fields = [] groupby = [] i = 0 for f in obj.field_ids: t = self.pool.get(f.field_id.model_id.model)._table if f.group_method == 'group': fields.append('\t'+t+'.'+...
467,195
def _sql_query_get(self, cr, uid, ids, prop, unknow_none, context, where_plus=[], limit=None, offset=None): result = {} for obj in self.browse(cr, uid, ids): fields = [] groupby = [] i = 0 for f in obj.field_ids: t = self.pool.get(f.field_id.model_id.model)._table if f.group_method == 'group': fields.append('\t'+t+'.'+...
def_sql_query_get(self,cr,uid,ids,prop,unknow_none,context,where_plus=[],limit=None,offset=None):result={}forobjinself.browse(cr,uid,ids):fields=[]groupby=[]i=0forfinobj.field_ids:t=self.pool.get(f.field_id.model_id.model)._tableiff.group_method=='group':fields.append('\t'+t+'.'+f.field_id.name+'asfield'+str(i))groupby...
467,196
def __init__(self, fname=None): self.options = { 'email_from':False, 'interface': '', # this will bind the server to all interfaces 'port': 8069, 'netinterface': '', 'netport': 8070, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'ne...
def __init__(self, fname=None): self.options = { 'email_from':False, 'interface': '', # this will bind the server to all interfaces 'port': 8069, 'netinterface': '', 'netport': 8070, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'ne...
467,197
def merge(match): obj_pool = self.pool.get(action.model_id.model) id = context.get('active_id') obj = obj_pool.browse(cr, uid, id) exp = str(match.group()[2:-2]).strip() result = eval(exp, {'object':obj, 'context': context,'time':time}) if result in (None, False): return str("--------") return str(result)
def merge(match): obj_pool = self.pool.get(action.model_id.model) id = context.get('active_id') obj = obj_pool.browse(cr, uid, id) exp = str(match.group()[2:-2]).strip() result = eval(exp, {'object':obj, 'context': context,'time':time}) if result in (None, False): return str("--------") return tools.ustr(result)
467,198
def create_xml(self, cr, uid, ids, datas, context=None): obj_emp = pooler.get_pool(cr.dbname).get('hr.employee') start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d') end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d') first_monday = start_date - relativedelta(days=start_date.date().we...
def create_xml(self, cr, uid, ids, datas, context=None): obj_emp = pooler.get_pool(cr.dbname).get('hr.employee') start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d') end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d') first_monday = start_date - relativedelta(days=start_date.date().we...
467,199