bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 470,500 |
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 470,501 |
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | def_get_payment_term_lines(term_id,amount):term_pool=self.pool.get('account.payment.term')ifterm_idandamount:terms=term_pool.compute(cr,uid,term_id,amount)returntermsreturnFalse | 470,502 |
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 470,503 |
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 470,504 |
def default_get(self, cr, uid, fields_list, context=None): self.view_init(cr, uid, fields_list, context) if not context: context = {} value = {} # get the default values for the inherited fields for f in fields_list: if f in self._defaults: if callable(self._defaults[f]): value[f] = self._defaults[f](self, cr, uid, con... | def default_get(self, cr, uid, fields_list, context=None): self.view_init(cr, uid, fields_list, context) if not context: context = {} value = dict.fromkeys(fields_list) # get the default values for the inherited fields for f in fields_list: if f in self._defaults: if callable(self._defaults[f]): value[f] = self._defau... | 470,505 |
def get(self, cr, uid, context=None): unread_log_ids = self.search(cr, uid, [('user_id','=',uid), ('read', '=', False)], context=context) res = self.read(cr, uid, unread_log_ids, ['name','res_model','res_id'], context=context) res.reverse() result = [] res_dict = {} for r in res: if r['res_model'] not in res_dict: res_... | def get(self, cr, uid, context=None): unread_log_ids = self.search(cr, uid, [('user_id','=',uid), ('read', '=', False)], context=context) res = self.read(cr, uid, unread_log_ids, ['name','res_model','res_id'], context=context) res.reverse() result = [] res_dict = {} for r in res: t = (r['res_model'], r['res_id']) if t ... | 470,506 |
def convert_to_period(self, cr, uid, context={}): period_obj = self.pool.get('account.period') #check if the period_id changed in the context from client side if context.get('period_id', False): period_id = context.get('period_id') if type(period_id) == str: ids = period_obj.search(cr, uid, [('name','ilike',period_id)... | def convert_to_period(self, cr, uid, context={}): period_obj = self.pool.get('account.period') #check if the period_id changed in the context from client side if context.get('period_id', False): period_id = context.get('period_id') if type(period_id) == str: ids = period_obj.search(cr, uid, [('name','ilike',period_id)... | 470,507 |
def convert_to_period(self, cr, uid, context={}): period_obj = self.pool.get('account.period') #check if the period_id changed in the context from client side if context.get('period_id', False): period_id = context.get('period_id') if type(period_id) == str: ids = period_obj.search(cr, uid, [('name','ilike',period_id)... | def convert_to_period(self, cr, uid, context={}): period_obj = self.pool.get('account.period') #check if the period_id changed in the context from client side if context.get('period_id', False): period_id = context.get('period_id') if type(period_id) == str: ids = period_obj.search(cr, uid, [('name','ilike',period_id)... | 470,508 |
def _default_get(self, cr, uid, fields, context={}): period_obj = self.pool.get('account.period') | def _default_get(self, cr, uid, fields, context={}): period_obj = self.pool.get('account.period') | 470,509 |
def _default_get(self, cr, uid, fields, context={}): period_obj = self.pool.get('account.period') | def _default_get(self, cr, uid, fields, context={}): period_obj = self.pool.get('account.period') | 470,510 |
def _invoice(self, cursor, user, ids, name, arg, context=None): invoice_obj = self.pool.get('account.invoice') res = {} for line_id in ids: res[line_id] = False cursor.execute('SELECT l.id, i.id ' \ 'FROM account_move_line l, account_invoice i ' \ 'WHERE l.move_id = i.move_id ' \ 'AND l.id IN %s', (tuple(ids),)) invoic... | def _invoice(self, cursor, user, ids, name, arg, context=None): invoice_obj = self.pool.get('account.invoice') res = {} for line_id in ids: res[line_id] = False cursor.execute('SELECT l.id, i.id ' \ 'FROM account_move_line l, account_invoice i ' \ 'WHERE l.move_id = i.move_id ' \ 'AND l.id IN %s', (tuple(ids),)) invoic... | 470,511 |
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | 470,512 |
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | 470,513 |
def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | def onchange_partner_id(self, cr, uid, ids, move_id, partner_id, account_id=None, debit=0, credit=0, date=False, journal=False): val = {} val['date_maturity'] = False | 470,514 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,515 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,516 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,517 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,518 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,519 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,520 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,521 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) if view_type != 'tree': #Remove the toolbar... | 470,522 |
def save(self): p = ConfigParser.ConfigParser() loglevelnames = dict(zip(self._LOGLEVELS.values(), self._LOGLEVELS.keys())) p.add_section('options') for opt in self.options.keys(): if opt in ('version', 'language', 'translate_out', 'translate_in', 'init', 'update'): continue if opt in ('log_level', 'assert_exit_level')... | def save(self): p = ConfigParser.ConfigParser() loglevelnames = dict(zip(self._LOGLEVELS.values(), self._LOGLEVELS.keys())) p.add_section('options') for opt in self.options.keys(): if opt in ('version', 'language', 'translate_out', 'translate_in', 'init', 'update'): continue if opt in ('log_level', 'assert_exit_level')... | 470,523 |
def save(self): p = ConfigParser.ConfigParser() loglevelnames = dict(zip(self._LOGLEVELS.values(), self._LOGLEVELS.keys())) p.add_section('options') for opt in self.options.keys(): if opt in ('version', 'language', 'translate_out', 'translate_in', 'init', 'update'): continue if opt in ('log_level', 'assert_exit_level')... | def save(self): p = ConfigParser.ConfigParser() loglevelnames = dict(zip(self._LOGLEVELS.values(), self._LOGLEVELS.keys())) p.add_section('options') for opt in self.options.keys(): if opt in ('version', 'language', 'translate_out', 'translate_in', 'init', 'update'): continue if opt in ('log_level', 'assert_exit_level')... | 470,524 |
def generate_phases(self, cr, uid, ids, *args): import random phase_obj = self.pool.get('document.change.process.phase') phase_type_obj = self.pool.get('document.change.process.phase.type') document_type_obj = self.pool.get('document.change.type') directory_obj = self.pool.get('document.directory') document_obj = self.... | def generate_phases(self, cr, uid, ids, *args): phase_obj = self.pool.get('document.change.process.phase') phase_type_obj = self.pool.get('document.change.process.phase.type') document_type_obj = self.pool.get('document.change.type') directory_obj = self.pool.get('document.directory') document_obj = self.pool.get('ir.a... | 470,525 |
def _set_previous_todo(self, cr, uid, state, context=None): """ lookup the previous (which is still the next at this point) ir.actions.todo, set it to whatever state was provided. | def _set_previous_todo(self, cr, uid, state, context=None): """ lookup the previous (which is still the next at this point) ir.actions.todo, set it to whatever state was provided. | 470,526 |
def _mass_mail_send(self, cr, uid, data, context): attach = filter(lambda x: x, [data['form']['doc1'], data['form']['doc2'], data['form']['doc3']]) attach = map(lambda x: x and ('Attachment'+str(attach.index(x)+1), base64.decodestring(x)), attach) pool = pooler.get_pool(cr.dbname) case_pool=pool.get('crm.case') cas... | def _mass_mail_send(self, cr, uid, data, context): attach = filter(lambda x: x, [data['form']['doc1'], data['form']['doc2'], data['form']['doc3']]) attach = map(lambda x: x and ('Attachment'+str(attach.index(x)+1), base64.decodestring(x)), attach) pool = pooler.get_pool(cr.dbname) case_pool=pool.get(data['model']) ... | 470,527 |
def _get_info(self, cr, uid, data, context): if not data['id']: return {} pool = pooler.get_pool(cr.dbname) case = pool.get('crm.lead').browse(cr, uid, data['id']) if not case.user_id: raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!')) return { '... | def _get_info(self, cr, uid, data, context): if not data['id']: return {} pool = pooler.get_pool(cr.dbname) case = pool.get(data['model']).browse(cr, uid, data['id']) if not case.user_id: raise wizard.except_wizard(_('Error'),_('You must define a responsible user for this case in order to use this action!')) return ... | 470,528 |
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}): """ Changes balance start and starting details if journal_id changes" @param statement_id: Changed statement_id @param journal_id: Changed journal_id @return: Dictionary of changed values """ cash_pool = self.pool.get('account.cashbox.line'... | def def _equal_balance(self, cr, uid, ids, statement, context={}): if statement.balance_end != statement.balance_end_cash: return False else: return True def _user_allow(self, cr, uid, ids, statement, context={}): return True onchange_journal_id(self, def _equal_balance(self, cr, uid, ids, statement, context={}): if ... | 470,529 |
def button_confirm(self, cr, uid, ids, context={}): """ Check the starting and ending detail of statement @return: True """ 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('acco... | def button_confirm(self, cr, uid, ids, context={}): """ Check the starting and ending detail of statement @return: True """ 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('acco... | 470,530 |
def parse_message(self, message): #TOCHECK: put this function in mailgateway module msg_txt = email.message_from_string(message) message_id = msg_txt.get('message-id', False) msg = {} msg_txt = email.message_from_string(message) fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = message_id | def parse_message(self, message): #TOCHECK: put this function in mailgateway module message_id = msg_txt.get('message-id', False) msg = {} fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = message_id | 470,531 |
def parse_message(self, message): #TOCHECK: put this function in mailgateway module msg_txt = email.message_from_string(message) message_id = msg_txt.get('message-id', False) msg = {} msg_txt = email.message_from_string(message) fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = message_id | defparse_message(self,message):#TOCHECK:putthisfunctioninmailgatewaymodulemsg_txt=email.message_from_string(message)message_id=msg_txt.get('message-id',False)msg={}msg_txt=email.message_from_string(message)fields=msg_txt.keys()msg['id']=message_idmsg['message-id']=message_id | 470,532 |
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ... | def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ... | 470,533 |
def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ... | def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ... | 470,534 |
def test_cancel(self, cr, uid, ids, context=None): """ Test whether the move lines are canceled or not. @return: True or False """ for pick in self.browse(cr, uid, ids, context=context): if not pick.move_lines: return False for move in pick.move_lines: if move.state not in ('cancel',): return False return True | def def allow_cancel(self, cr, uid, ids, context={}): for pick in self.browse(cr, uid, ids, context=context): if not pick.move_lines: return True for move in pick.move_lines: if move.state == 'done': return False return True test_cancel(self, def allow_cancel(self, cr, uid, ids, context={}): for pick in self.browse(cr,... | 470,535 |
def set_context(self, objects, data, ids, report_type=None): obj_move = self.pool.get('account.move.line') self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {})) self.init_query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context_i... | def set_context(self, objects, data, ids, report_type=None): obj_move = self.pool.get('account.move.line') self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=data['form'].get('used_context', {})) ctx2 = data['form'].get('used_context',{}).copy() ctx2.update({'initial_bal': True}) self.init_query = obj... | 470,536 |
def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s... | def html2plaintext(html, body_id=None, encoding='utf-8'): ## (c) Fry-IT, www.fry-it.com, 2007 ## <peter@fry-it.com> ## download here: http://www.peterbe.com/plog/html2plaintext """ from an HTML text, convert the HTML to plain text. If @body_id is provided then this is the tag where the body (not necessarily <body>) s... | 470,537 |
def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | defrun_test(self,cr,uid,module_path):pool=pooler.get_pool(cr.dbname)module_name=module_path.split('/')[-1]obj_list=self.get_objects(cr,uid,module_name) | 470,538 |
def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | 470,539 |
def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | 470,540 |
def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | def run_test(self, cr, uid, module_path): pool = pooler.get_pool(cr.dbname) module_name = module_path.split('/')[-1] obj_list = self.get_objects(cr, uid, module_name) | 470,541 |
def onchange_operation_type(self, cr, uid, ids, type, guarantee_limit): """ On change of operation type it sets source location, destination location and to invoice field. @param product: Changed operation type. @param guarantee_limit: Guarantee limit of current record. @return: Dictionary of values. """ if not type: r... | def onchange_operation_type(self, cr, uid, ids, type, guarantee_limit): """ On change of operation type it sets source location, destination location and to invoice field. @param product: Changed operation type. @param guarantee_limit: Guarantee limit of current record. @return: Dictionary of values. """ if not type: r... | 470,542 |
def __init__(self, cr, uid, name, context=None): super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context=context) self.obj_pl = report_pl.report_pl_account_horizontal(cr, uid, name, context=context) self.result_sum_dr = 0.0 self.result_sum_cr = 0.0 self.result = {} self.res_bl = {} self.result_temp ... | def __init__(self, cr, uid, name, context=None): super(report_balancesheet_horizontal, self).__init__(cr, uid, name, context=context) self.obj_pl = account_profit_loss.report_pl_account_horizontal(cr, uid, name, context=context) self.result_sum_dr = 0.0 self.result_sum_cr = 0.0 self.result = {} self.res_bl = {} self.re... | 470,543 |
def export_cal(self, cr, uid, ids, context={}): ids = map(lambda x: base_calendar_id2real_id(x), ids) event_data = self.read(cr, uid, ids) event_obj = self.pool.get('basic.calendar.event') ical = event_obj.export_cal(cr, uid, event_data, context={'model': self._name}) return ical.serialize() | def export_cal(self, cr, uid, ids, context={}): ids = map(lambda x: base_calendar.base_calendar_id2real_id(x), ids) event_data = self.read(cr, uid, ids) event_obj = self.pool.get('basic.calendar.event') ical = event_obj.export_cal(cr, uid, event_data, context={'model': self._name}) return ical.serialize() | 470,544 |
def _build_context(self, cr, uid, ids, data, context = None): result = {} result['fiscalyear'] = data['form']['fiscalyear_id'] and data['form']['fiscalyear_id'] or False if data['form']['filter'] == 'filter_date': result['date_from'] = data['form']['date_from'] result['date_to'] = data['form']['date_to'] elif data['for... | def _build_context(self, cr, uid, ids, data, context = None): result = {} result['fiscalyear'] = data['form']['fiscalyear_id'] and data['form']['fiscalyear_id'] or False if data['form']['filter'] == 'filter_date': result['date_from'] = data['form']['date_from'] result['date_to'] = data['form']['date_to'] elif data['for... | 470,545 |
def _create_returns(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) move_obj = pool.get('stock.move') pick_obj = pool.get('stock.picking') uom_obj = pool.get('product.uom') pick=pick_obj.browse(cr, uid, [data['id']])[0] new_picking=None date_cur=time.strftime('%Y-%m-%d %H:%M:%S') for move in move_obj... | def new_qty = data['form']['return%s' % move.id] returned_qty = move.product_qty for rec in move.move_stock_return_history: returned_qty -= rec.product_qty if returned_qty != new_qty: set_invoice_state_to_none = False _create_returns(self, new_qty = data['form']['return%s' % move.id] returned_qty = move.product_qty ... | 470,546 |
def _create_returns(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) move_obj = pool.get('stock.move') pick_obj = pool.get('stock.picking') uom_obj = pool.get('product.uom') pick=pick_obj.browse(cr, uid, [data['id']])[0] new_picking=None date_cur=time.strftime('%Y-%m-%d %H:%M:%S') for move in move_obj... | def _create_returns(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) move_obj = pool.get('stock.move') pick_obj = pool.get('stock.picking') uom_obj = pool.get('product.uom') pick=pick_obj.browse(cr, uid, [data['id']])[0] new_picking=None date_cur=time.strftime('%Y-%m-%d %H:%M:%S') for move in move_obj... | 470,547 |
def _create_returns(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) move_obj = pool.get('stock.move') pick_obj = pool.get('stock.picking') uom_obj = pool.get('product.uom') pick=pick_obj.browse(cr, uid, [data['id']])[0] new_picking=None date_cur=time.strftime('%Y-%m-%d %H:%M:%S') for move in move_obj... | def _create_returns(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) move_obj = pool.get('stock.move') pick_obj = pool.get('stock.picking') uom_obj = pool.get('product.uom') pick=pick_obj.browse(cr, uid, [data['id']])[0] new_picking=None date_cur=time.strftime('%Y-%m-%d %H:%M:%S') for move in move_obj... | 470,548 |
def setup(self): self.davpath = '/'+config.get_misc('webdav','vdir','webdav') addr, port = self.server.server_name, self.server.server_port server_proto = getattr(self.server,'proto', 'http').lower() try: addr, port = self.request.getsockname() except Exception, e: self.log_error("Cannot calculate own address:" , e) # ... | def setup(self): self.davpath = '/'+config.get_misc('webdav','vdir','webdav') addr, port = self.server.server_name, self.server.server_port server_proto = getattr(self.server,'proto', 'http').lower() try: if hasattr(self.request, 'getsockname'): addr, port = self.request.getsockname() except Exception, e: self.log_erro... | 470,549 |
def setup(self): self.davpath = '/'+config.get_misc('webdav','vdir','webdav') addr, port = self.server.server_name, self.server.server_port server_proto = getattr(self.server,'proto', 'http').lower() try: addr, port = self.request.getsockname() except Exception, e: self.log_error("Cannot calculate own address:" , e) # ... | def setup(self): self.davpath = '/'+config.get_misc('webdav','vdir','webdav') addr, port = self.server.server_name, self.server.server_port server_proto = getattr(self.server,'proto', 'http').lower() try: addr, port = self.request.getsockname() except Exception, e: self.log_error("Cannot calculate own address: %s" , e)... | 470,550 |
def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) | def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) | 470,551 |
def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) | def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) | 470,552 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Returns a list of ids based on search domain {args} @param cr: A database cursor @param user: ID of the user currently logged in @param args: list of conditions to be applied in search opertion @param offset: default fro... | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Returns a list of ids based on search domain {args} @param cr: A database cursor @param user: ID of the user currently logged in @param args: list of conditions to be applied in search opertion @param offset: default fro... | 470,553 |
def view_init(self, cr, uid, fields_list, context=None): res = super(stock_partial_move, self).view_init(cr, uid, fields_list, context=context) move_obj = self.pool.get('stock.move') if not context: context={} for m in move_obj.browse(cr, uid, context.get('active_ids', [])): if m.state in ('done', 'cancel'): raise osv.... | def view_init(self, cr, uid, fields_list, context=None): res = super(stock_partial_move, self).view_init(cr, uid, fields_list, context=context) move_obj = self.pool.get('stock.move') if not context: context={} for m in move_obj.browse(cr, uid, context.get('active_ids', [])): if m.state in ('done', 'cancel'): raise osv.... | 470,554 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(stock_partial_move, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) move_obj = self.pool.get('stock.move') move_ids = context.get('active_ids', False) move_ids = mov... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(stock_partial_move, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) move_obj = self.pool.get('stock.move') move_ids = context.get('active_ids', False) move_ids = mov... | 470,555 |
def do_partial(self, cr, uid, ids, context): """ Makes partial moves and pickings done. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for which we want default values @param context: A standard dictionary @return: A dictionary ... | def do_partial(self, cr, uid, ids, context): """ Makes partial moves and pickings done. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for which we want default values @param context: A standard dictionary @return: A dictionary ... | 470,556 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda... | 470,557 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,558 |
def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | def get_recurrent_ids(self, cr, uid, ids, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meeting m\ join crm_case c on (c.id=m.inherit_case_id) \ where m.id in ("+ ','.join(map(lambda x:... | 470,559 |
def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | def search(self, cr, uid, args, offset=0, limit=100, order=None, context=None, count=False): args_without_date = [] start_date = False until_date = False for arg in args: if arg[0] not in ('date', unicode('date')): args_without_date.append(arg) else: if arg[1] in ('>', '>='): start_date = arg[2] elif arg[1] in ('<', '<... | 470,560 |
def action_move_line_create(self, cr, uid, ids, *args): for inv in self.browse(cr, uid, ids): if inv.move_id: continue company_currency = inv.company_id.currency_id.id | def action_move_line_create(self, cr, uid, ids, *args): for inv in self.browse(cr, uid, ids): if inv.move_id: continue company_currency = inv.company_id.currency_id.id | 470,561 |
def action_move_line_create(self, cr, uid, ids, *args): for inv in self.browse(cr, uid, ids): if inv.move_id: continue company_currency = inv.company_id.currency_id.id | def action_move_line_create(self, cr, uid, ids, *args): for inv in self.browse(cr, uid, ids): if inv.move_id: continue company_currency = inv.company_id.currency_id.id | 470,562 |
def onchange_type(self, cr, uid, ids, type, currency): obj_data = self.pool.get('ir.model.data') user_pool = self.pool.get('res.users') | def onchange_type(self, cr, uid, ids, type, currency, context=None): obj_data = self.pool.get('ir.model.data') user_pool = self.pool.get('res.users') | 470,563 |
def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst | def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst | 470,564 |
def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst | def_create_parent_category_list(id,lst):ifnotid:return[]parent=product_category_tree.get(id)ifparent:lst.append(parent)return_create_parent_category_list(parent,lst)else:returnlst | 470,565 |
def unlink_action(self, cr, uid, ids, context): for template in self.browse(cr, uid, ids, context): obj = self.pool.get(template.object_name.model) try: if template.ref_ir_act_window: self.pool.get('ir.actions.act_window').unlink(cr, uid, template.ref_ir_act_window.id, context) if template.ref_ir_value: self.pool.get('... | def unlink_action(self, cr, uid, ids, context): for template in self.browse(cr, uid, ids, context): try: if template.ref_ir_act_window: self.pool.get('ir.actions.act_window').unlink(cr, uid, template.ref_ir_act_window.id, context) if template.ref_ir_value: self.pool.get('ir.values').unlink(cr, uid, template.ref_ir_valu... | 470,566 |
def _update_values(self, cr, uid, ids, values): value = values.pop('value', None) if not value: return values | def _update_values(self, cr, uid, ids, values): value = values.pop('value', None) if not value: return values | 470,567 |
def _sheet_search(self, cursor, user, obj, name, args, context): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | def _sheet_search(self, cursor, user, obj, name, args, context=None): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | 470,568 |
def _sheet_search(self, cursor, user, obj, name, args, context={}): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | def _sheet_search(self, cursor, user, obj, name, args, context=None): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | 470,569 |
def __init__(self, model, action, **kwargs): self.model = model self.action = action super(Workflow, self).__init__(**kwargs) | def __init__(self, model, action, **kwargs): self.model = model self.action = action super(Workflow, self).__init__(**kwargs) | 470,570 |
def __init__(self, expression): self.expression = expression super(Eval, self).__init__() | def __init__(self, expression): self.expression = expression super(Eval, self).__init__() | 470,571 |
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid) | def ir_set_constructor(loader, node): kwargs = loader.construct_mapping(node) return IrSet(**kwargs) | 470,572 |
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid) | def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid) | 470,573 |
def is_ref(node): return isinstance(node, Ref) | def is_ir_set(node): return _is_yaml_mapping(node, IrSet) | 470,574 |
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.... | 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._... | 470,575 |
def _inherit_apply(src, inherit): def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given... | def raise_view_error(error_msg, child_view_id): view, child_view = self.pool.get('ir.ui.view').browse(cr, user, [view_id, child_view_id], context) raise AttributeError(("View definition error for inherited view '%(xml_id)s' on '%(model)s' model: " + error_msg) % { 'xml_id': child_view.xml_id, 'parent_xml_id': view.xml... | 470,576 |
def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel express... | def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel express... | 470,577 |
def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel express... | def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel express... | 470,578 |
def _inherit_apply_rec(result, inherit_id): # get all views which inherit from (ie modify) this view cr.execute('select arch,id from ir_ui_view where inherit_id=%s and model=%s order by priority', (inherit_id, self._name)) sql_inherit = cr.fetchall() for (inherit, id) in sql_inherit: result = _inherit_apply(result, inh... | def _inherit_apply_rec(result, inherit_id): # get all views which inherit from (ie modify) this view cr.execute('select arch,id from ir_ui_view where inherit_id=%s and model=%s order by priority', (inherit_id, self._name)) sql_inherit = cr.fetchall() for (inherit, id) in sql_inherit: result = _inherit_apply(result, inh... | 470,579 |
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': for root, _, names in os.walk(join('bin','addons')): files.append((root, [join(root, name) for name in names])) for root, _, names in os.walk('doc'): files.append((root, [join(root, name) for name in names])) files.append(('... | def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': for root, _, names in os.walk(join('bin','addons')): files.append((root, [join(root, name) for name in names])) for root, _, names in os.walk('doc'): files.append((root, [join(root, name) for name in names])) files.append(('... | 470,580 |
def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': for root, _, names in os.walk(join('bin','addons')): files.append((root, [join(root, name) for name in names])) for root, _, names in os.walk('doc'): files.append((root, [join(root, name) for name in names])) files.append(('... | def data_files(): '''Build list of data files to be installed''' files = [] if os.name == 'nt': for root, _, names in os.walk(join('bin','addons')): files.append((root, [join(root, name) for name in names])) for root, _, names in os.walk('doc'): files.append((root, [join(root, name) for name in names])) files.append(('... | 470,581 |
def _process_email(self, cr, uid, server, message, context={}): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = me... | def res_id = False _process_email(self, res_id = False cr, res_id = False uid, res_id = False server, res_id = False message, res_id = False context={}): res_id = False history_pool res_id = False = res_id = False self.pool.get('mail.server.history') res_id = False msg_txt res_id = False = res_id = False email.message_... | 470,582 |
def _process_email(self, cr, uid, server, message, context={}): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = me... | def _process_email(self, cr, uid, server, message, context={}): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = me... | 470,583 |
def _process_email(self, cr, uid, server, message, context={}): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = me... | def _process_email(self, cr, uid, server, message, context={}): history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg['id'] = message_id msg['message-id'] = me... | 470,584 |
def fetch_mail(self, cr, uid, ids, context={}): fp = os.popen('ping www.google.com -c 1 -w 5',"r") if not fp.read(): logger.notifyChannel('imap', netsvc.LOG_WARNING, 'No address associated with hostname !') | def fetch_mail(self, cr, uid, ids, context={}): fp = os.popen('ping www.google.com -c 1 -w 5',"r") if not fp.read(): logger.notifyChannel('imap', netsvc.LOG_WARNING, 'No address associated with hostname !') | 470,585 |
def _get_charts(self, cr, uid, context=None): modules = self.pool.get('ir.module.module') ids = modules.search(cr, uid, [('category_id','=','Account Charts')]) charts = list( sorted(((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids)), key=itemgetter(1))) charts.insert(0,('configurable','Generic Chart Of Accou... | def _get_charts(self, cr, uid, context=None): modules = self.pool.get('ir.module.module') ids = modules.search(cr, uid, [('category_id','=','Account Charts')]) charts = list( sorted(((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids)), key=itemgetter(1))) charts.insert(0,('configurable','Generic Chart Of Accou... | 470,586 |
def _get_default_charts(self, cr, uid, context=None): module_name = False company_id = self._default_company(cr, uid, context=context) company = self.pool.get('res.company').browse(cr, uid, company_id) address_id = self.pool.get('res.partner').address_get(cr, uid, [company.partner_id.id]) if address_id['default']: addr... | def _get_default_charts(self, cr, uid, context=None): module_name = False company_id = self._default_company(cr, uid, context=context) company = self.pool.get('res.company').browse(cr, uid, company_id) address_id = self.pool.get('res.partner').address_get(cr, uid, [company.partner_id.id]) if address_id['default']: addr... | 470,587 |
def modules_to_install(self, cr, uid, ids, context=None): modules = super(account_installer, self).modules_to_install( cr, uid, ids, context=context) chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Installing chart of accounts %s'%char... | def modules_to_install(self, cr, uid, ids, context=None): modules = super(account_installer, self).modules_to_install( cr, uid, ids, context=context) chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Installing chart of accounts %s'%char... | 470,588 |
def modules_to_install(self, cr, uid, ids, context=None): modules = super(account_installer, self).modules_to_install( cr, uid, ids, context=context) chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Installing chart of accounts %s'%char... | def modules_to_install(self, cr, uid, ids, context=None): modules = super(account_installer, self).modules_to_install( cr, uid, ids, context=context) chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Installing chart of accounts %s'%char... | 470,589 |
def init(self, cr): tools.drop_view_if_exists(cr, 'hr_holidays_report') cr.execute(""" create or replace view hr_holidays_report as ( select min(s.id) as id, s.create_date as date, to_char(s.date_from,'YYYY/mm/dd') as date_from, to_char(s.date_to,'YYYY/mm/dd') as date_to, s.number_of_days_temp, s.employee_id, s.user_id... | def init(self, cr): tools.drop_view_if_exists(cr, 'hr_holidays_report') cr.execute(""" create or replace view hr_holidays_report as ( select min(s.id) as id, date_trunc('seconds',s.create_date) as date, date_trunc('day',s.date_from) as date_from, date_trunc('day',s.date_to) as date_to, s.number_of_days_temp, s.employee... | 470,590 |
def set_context(self, objects, data, ids, report_type=None): super(journal_print, self).set_context(objects, data, ids, report_type) self.cr.execute('SELECT period_id, journal_id ' 'FROM account_journal_period ' 'WHERE id IN %s', (tuple(ids),)) res = self.cr.fetchall() self.period_ids, self.journal_ids = zip(*res) | def set_context(self, objects, data, ids, report_type=None): super(journal_print, self).set_context(objects, data, ids, report_type) if (data['model'] == 'account.journal.period'): self.cr.execute('SELECT period_id, journal_id ' 'FROM account_journal_period ' 'WHERE id IN %s', (tuple(ids),)) else: self.cr.execute('SELE... | 470,591 |
def _compute_total(self, cr, uid, ids, name, args, context=None): position_pool = self.pool.get('account.fiscal.position') voucher_pool = self.pool.get('account.voucher') voucher_line_pool = self.pool.get('account.voucher.line') partner_pool = self.pool.get('res.partner') tax_pool = self.pool.get('account.tax') res = ... | def _compute_total(self, cr, uid, ids, name, args, context=None): position_pool = self.pool.get('account.fiscal.position') voucher_pool = self.pool.get('account.voucher') voucher_line_pool = self.pool.get('account.voucher.line') partner_pool = self.pool.get('res.partner') tax_pool = self.pool.get('account.tax') res = ... | 470,592 |
def create(self, cr, uid, vals, context={}): """ Create a new record for a model account_voucher @param cr: A database cursor @param user: ID of the user currently logged in @param vals: provides data for new record @param context: context arguments, like lang, time zone @return: Returns an id of the new record """ | def create(self, cr, uid, vals, context={}): """ Create a new record for a model account_voucher @param cr: A database cursor @param user: ID of the user currently logged in @param vals: provides data for new record @param context: context arguments, like lang, time zone @return: Returns an id of the new record """ | 470,593 |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | 470,594 |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | 470,595 |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | 470,596 |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | 470,597 |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other argu... | 470,598 |
def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | 470,599 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.