bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and... | def process_function(self, node): if self.mode != 'init': return local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and (not 'eval' in value or not 'searc... | 468,300 |
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and... | def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(function, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value... | 468,301 |
def process_menuitem(self, node): self.validate_xml_id(node.id) | def process_menuitem(self, node): self.validate_xml_id(node.id) | 468,302 |
def process_act_window(self, node): self.validate_xml_id(node.id) view_id = False if node.view: view_id = self.get_id(node.view) context = eval(node.context, {'ref': self._ref, '_ref': self._ref}) | def process_act_window(self, node): self.validate_xml_id(node.id) view_id = False if node.view: view_id = self.get_id(node.view) context = eval(node.context, {'ref': self._ref, '_ref': self._ref}) | 468,303 |
def process_url(self, node): self.validate_xml_id(node.id) | def process_url(self, node): self.validate_xml_id(node.id) | 468,304 |
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields | 468,305 |
def uid2openobjectid(cr, uidval, oomodel, rdate): """ UID To Open Object Id @param cr: the current row, from the database cursor, @param uidval: Get USerId vale @oomodel: Open Object ModelName @param rdate: Get Recurrent Date """ __rege = re.compile(r'OpenObject-([\w|\.]+)_([0-9]+)@(\w+)$') if not uidval: return (False... | def uid2openobjectid(cr, uidval, oomodel, rdate): """ UID To Open Object Id @param cr: the current row, from the database cursor, @param uidval: Get USerId vale @oomodel: Open Object ModelName @param rdate: Get Recurrent Date """ __rege = re.compile(r'OpenObject-([\w|\.]+)_([0-9]+)@(\w+)$') if not uidval: return (False... | 468,306 |
def _check_company(self, cr, uid, ids, context=None): return all(((this.company_id in this.company_ids) or not this.company_ids) for this in self.browse(cr, uid, ids, context)) | def _check_company(self, cr, uid, ids, context=None): return all(((this.company_id in this.company_ids) or not this.company_ids) for this in self.browse(cr, uid, ids, context)) | 468,307 |
def _sum_period(self, cr, uid, ids, name, args, context): if context is None: context = {} move_state = ('posted', ) if context.get('state', False) == 'all': move_state = ('draft', 'posted', ) if context.get('period_id', False): period_id = context['period_id'] else: period_id = self.pool.get('account.period').find(cr,... | def_sum_period(self,cr,uid,ids,name,args,context):ifcontextisNone:context={}move_state=('posted',)ifcontext.get('state',False)=='all':move_state=('draft','posted',)ifcontext.get('period_id',False):period_id=context['period_id']else:period_id=self.pool.get('account.period').find(cr,uid)ifnotperiod_id:returndict.fromkeys... | 468,308 |
def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() default.update({'line_ids': []}) return super(account_tax_code, self).copy(cr, uid, id, default, context) | def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() default.update({'line_ids': []}) return super(account_tax_code, self).copy(cr, uid, id, default, context) | 468,309 |
def start(self, cr, uid, ids, context=None): todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get('ir.model.data') result = data... | def start(self, cr, uid, ids, context=None): todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get... | 468,310 |
def __init__(self, cr, module, id_map, mode, filename, noupdate=False): self.cr = cr self.module = module self.id_map = id_map self.mode = mode self.filename = filename self.assert_report = TestReport() self.noupdate = noupdate self.logger = logging.getLogger("%s.%s" % (logger_channel, self.module)) self.pool = pooler.... | def __init__(self, cr, module, id_map, mode, filename, noupdate=False): self.cr = cr self.module = module self.id_map = id_map self.mode = mode self.filename = filename self.assert_report = TestReport() self.noupdate = noupdate self.logger = logging.getLogger("%s.%s" % (logger_channel, self.module)) self.pool = pooler.... | 468,311 |
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ... | def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ... | 468,312 |
def action_done(self, cr, uid, ids, context=None): """ Makes the move done and if all moves are done, it will finish the picking. @return: """ track_flag = False picking_ids = [] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.prod... | def action_done(self, cr, uid, ids, context=None): """ Makes the move done and if all moves are done, it will finish the picking. @return: """ track_flag = False picking_ids = [] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.prod... | 468,313 |
def __init__(self, cr, uid, name, context=None): if context is None: context = {} super(partner_balance, self).__init__(cr, uid, name, context=context) self.date_lst = [] self.account_ids = [] self.localcontext.update( { 'time': time, 'lines': self.lines, 'sum_debit': self._sum_debit, 'sum_credit': self._sum_credit, 's... | def __init__(self, cr, uid, name, context=None): if context is None: context = {} super(partner_balance, self).__init__(cr, uid, name, context=context) self.account_ids = [] self.localcontext.update( { 'time': time, 'lines': self.lines, 'sum_debit': self._sum_debit, 'sum_credit': self._sum_credit, 'sum_litige': self._s... | 468,314 |
def get_periods(self, form): result = '' if form.has_key('periods') and form['periods']: period_ids = form['periods'] per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods']) for r in per_ids: if r == per_ids[len(per_ids)-1]: result+=r.name+". " else: result+=r.name+", " else: fy_obj = self.... | def get_periods(self, form): result = '' if form.has_key('periods') and form['periods']: period_ids = form['periods'] per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods']) for r in per_ids: if r == per_ids[len(per_ids)-1]: result+=r.name+". " else: result+=r.name+", " else: fy_obj = self.... | 468,315 |
def transform_period_into_date_array(self, data): ## Get All Period Date # # If we have no period we will take all perdio in the FiscalYear. if not data['form']['periods']: periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])]) else: periods_id = data... | def transform_period_into_date_array(self, data): ## Get All Period Date # # If we have no period we will take all perdio in the FiscalYear. if not data['form']['periods']: periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])]) else: periods_id = data... | 468,316 |
def comma_me(self, amount): if type(amount) is float : amount = str('%.2f'%amount) else : amount = str(amount) if (amount == '0'): return ' ' orig = amount new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) if orig == new: return new else: return self.comma_me(new) | def comma_me(self, amount): if type(amount) is float : amount = str('%.2f'%amount) else : amount = str(amount) if (amount == '0'): return ' ' orig = amount new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) if orig == new: return new else: return self.comma_me(new) | 468,317 |
def set_context(self, objects, data, ids, report_type=None): # Transformation des date # # if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.tran... | def set_context(self, objects, data, ids, report_type=None): # Transformation des date # # if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.tran... | 468,318 |
def set_context(self, objects, data, ids, report_type=None): # Transformation des date # # if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.tran... | defset_context(self,objects,data,ids,report_type=None):#Transformationdesdate##ifdata['form']['filter']=='filter_no':self.transform_none_into_date_array(data)elifdata['form']['filter']=='filter_date':self.transform_date_into_date_array(data)elifdata['form']['filter']=='filter_period':self.transform_period_into_date_arr... | 468,319 |
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ... | def _sum_debit(self, data): if not self.ids: return 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.init... | 468,320 |
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ... | def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + "" , (tuple(self.account_ids), )) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.initial_balance: s... | 468,321 |
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ... | def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ... | 468,322 |
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o... | def _sum_credit(self, data): if not self.ids: return 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.in... | 468,323 |
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o... | def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + "" , (tuple(self.account_ids),)) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.initial_balance: s... | 468,324 |
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o... | def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o... | 468,325 |
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ... | def _sum_litige(self, data): if not self.ids: return 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.f... | 468,326 |
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ... | def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + " " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), )) temp_res = float(self.cr.fetchone()[0] or ... | 468,327 |
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ... | def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ... | 468,328 |
def _sum_sdebit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.part... | def _sum_sdebit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.part... | 468,329 |
def _sum_scredit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.par... | def _sum_scredit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.par... | 468,330 |
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | def _get_partners(self, data): if data['form']['result_selection'] == 'customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | 468,331 |
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection'] == 'supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | 468,332 |
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return '' | def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection'] == 'customer_supplier': return 'Receivable and Payable Accounts' return '' | 468,333 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,334 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,335 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,336 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,337 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,338 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,339 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,340 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain. | 468,341 |
def account_tax_chart_open_window(self, cr, uid, ids, context=None): """ Opens chart of Accounts @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of account chart’s IDs @return: dictionary of Open account chart window on given fiscalyear and a... | def account_tax_chart_open_window(self, cr, uid, ids, context=None): """ Opens chart of Accounts @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of account chart’s IDs @return: dictionary of Open account chart window on given fiscalyear and a... | 468,342 |
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty=... | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty=... | 468,343 |
def holidays_cancel(self, cr, uid, ids, *args): for record in self.browse(cr, uid, ids): if record.state=='validate': holiday_id=self.pool.get('hr.holidays.per.user').search(cr, uid, [('employee_id','=', record.employee_id.id),('holiday_status','=',record.holiday_status.id)]) if holiday_id: obj_holidays_per_user=self.p... | def holidays_cancel(self, cr, uid, ids, *args): self._update_user_holidays(cr, uid, ids) self.write(cr, uid, ids, { 'state':'cancel' }) self._create_holiday(cr, uid, ids) return True | 468,344 |
def _get_dav_displayname(self,uri): self.parent.log_message('get DN: %s' % uri) cr, uid, pool, dbname, uri2 = self.get_cr(uri) if not dbname: if cr: cr.close() return COLLECTION node = self.uri2object(cr, uid, pool, uri2) if not node: if cr: cr.close() raise DAV_NotFound2(uri2) cr.close() return node.displayname | def _get_dav_displayname(self,uri): self.parent.log_message('get DN: %s' % uri) cr, uid, pool, dbname, uri2 = self.get_cr(uri) if not dbname: if cr: cr.close() if uri2 and len(uri2) < 2: return uri2[-1] return '' node = self.uri2object(cr, uid, pool, uri2) if not node: if cr: cr.close() raise DAV_NotFound2(uri2) cr.c... | 468,345 |
def _connection_get(self, cr, uid, ids, field_name, arg, context = {}): """ Return a connection string url needed by SQL Alchemy. Exemple: 'postgres://scott:tiger@localhost:5432/mydatabase' @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of c... | def _connection_get(self, cr, uid, ids, field_name, arg, context = {}): """ Return a connection string url needed by SQL Alchemy. Exemple: 'postgres://scott:tiger@localhost:5432/mydatabase' @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of c... | 468,346 |
def test_connection(self, cr, uid, ids, context = {}): | deftest_connection(self,cr,uid,ids,context={}): | 468,347 |
def test_connection(self, cr, uid, ids, context = {}): | deftest_connection(self,cr,uid,ids,context={}): | 468,348 |
def _app_detect(self, cr, uid, ids, field_name, arg, context = {}): | def _app_detect(self, cr, uid, ids, field_name, arg, context = {}): | 468,349 |
def action_dbconnect(self, cr, uid, ids, context = {}): | defaction_dbconnect(self,cr,uid,ids,context={}): | 468,350 |
def action_dbconnect(self, cr, uid, ids, context = {}): | def action_dbconnect(self, cr, uid, ids, context = {}): | 468,351 |
def action_dbload(self, cr, uid, ids, context = {}): | defaction_dbload(self,cr,uid,ids,context={}): | 468,352 |
def action_dbconfigure(self, cr, uid, ids, context = {}): | defaction_dbconfigure(self,cr,uid,ids,context={}): | 468,353 |
def action_dbconfigure(self, cr, uid, ids, context = {}): | def action_dbconfigure(self, cr, uid, ids, context = {}): | 468,354 |
def action_dbready(self, cr, uid, ids, context = {}): | def action_dbready(self, cr, uid, ids, context = {}): | 468,355 |
def action_dbready(self, cr, uid, ids, context = {}): | def action_dbready(self, cr, uid, ids, context = {}): | 468,356 |
def action_done(self, cr, uid, ids, context = {}): | def action_done(self, cr, uid, ids, context = {}): | 468,357 |
def action_done(self, cr, uid, ids, context = {}): | def action_done(self, cr, uid, ids, context = {}): | 468,358 |
def request(self, cr, uid, name, request, context = {}): | def request(self, cr, uid, name, request, context = {}): | 468,359 |
def request(self, cr, uid, name, request, context = {}): | defrequest(self,cr,uid,name,request,context={}): | 468,360 |
def request(self, cr, uid, name, request, context = {}): | def request(self, cr, uid, name, request, context = {}): | 468,361 |
def name_get(self, cr, uid, ids, context = {}): | defname_get(self,cr,uid,ids,context={}): | 468,362 |
def show_col_view(self, cr, uid, ids, context = {}): """ Open Tree View of Database Columns @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Column’s IDs @param context: A standard dictionary for contextual values """ | def show_col_view(self, cr, uid, ids, context = {}): """ Open Tree View of Database Columns @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Column’s IDs @param context: A standard dictionary for contextual values """ | 468,363 |
def _datatypes_get(self, *args, **argv): | def _datatypes_get(self, *args, **argv): | 468,364 |
def name_get(self, cr, uid, ids, context = {}): | defname_get(self,cr,uid,ids,context={}): | 468,365 |
def search(self, cr, uid, args, offset = 0, limit = None, order = None, context = None, count = False): | def search(self, cr, uid, args, offset = 0, limit = None, order = None, context = None, count = False): | 468,366 |
def hide_col(self, cr, uid, ids, context = {}): | def hide_col(self, cr, uid, ids, context = {}): | 468,367 |
def write(self, cr, uid, ids, vals, context = None): | def write(self, cr, uid, ids, vals, context = None): | 468,368 |
def write(self, cr, uid, ids, vals, context=None): | def write(self, cr, uid, ids, vals, context=None): | 468,369 |
def convert_field(f): if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isi... | def convert_field(f): if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isi... | 468,370 |
def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin... | def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin... | 468,371 |
def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin... | def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin... | 468,372 |
def create(self, cr, user, vals, context=None): self.vaccum(cr, user) self.next_id += 1 id_new = self.next_id default = [] for f in self._columns.keys(): if not f in vals: default.append(f) if len(default): vals.update(self.default_get(cr, user, default, context)) vals2 = {} upd_todo = [] for field in vals: if self._co... | def create(self, cr, user, vals, context=None): self.vaccum(cr, user) self.next_id += 1 id_new = self.next_id defaults = self.default_get(cr, user, [], context) defaults.update(vals) vals = defaults vals2 = {} upd_todo = [] for field in vals: if self._columns[field]._classic_write: vals2[field] = vals[field] else: u... | 468,373 |
def create(self, cr, user, vals, context=None): """ Create new record with specified value | def create(self, cr, user, vals, context=None): """ Create new record with specified value | 468,374 |
def init(self, cr): | def init(self, cr): | 468,375 |
def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs | def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs | 468,376 |
def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs | def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs | 468,377 |
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, context=None): if context is None: context = {} if not partner_id: raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partn... | 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, context=None): if context is None: context = {} if not partner_id: raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partn... | 468,378 |
def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price=False item_id=0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('... | def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price=False item_id=0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('... | 468,379 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,380 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,381 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,382 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,383 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,384 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,385 |
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,386 |
def copy(self, cr, uid, id, default=None,context=None): if not default: default = {} default.update({ 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'), 'move_lines' : [], 'move_created_ids': [], 'state': 'draft' }) return super(mrp_production, self).copy(cr, uid, id, default, context) | def copy(self, cr, uid, id, default=None,context=None): if not default: default = {} default.update({ 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'), 'move_lines' : [], 'move_lines2' : [], 'move_created_ids' : [], 'move_created_ids2' : [], 'product_lines' : [], 'state': 'draft', 'picking_id': False... | 468,387 |
def _fnct_read(self, obj, cr, uid, ids, prop, val, context=None): if not context: context = {} property = obj.pool.get('ir.property') definition_id = self._field_get(cr, uid, obj._name, prop) | def _fnct_read(self, obj, cr, uid, ids, prop, val, context=None): if not context: context = {} property = obj.pool.get('ir.property') definition_id = self._field_get(cr, uid, obj._name, prop) | 468,388 |
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | 468,389 |
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | 468,390 |
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object. | 468,391 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,392 |
def _make_packing(obj, cursor, user, data, context): wkf_service = netsvc.LocalService('workflow') pool = pooler.get_pool(cursor.dbname) picking_obj = pool.get('stock.picking') ids = data['form']['pickings'][0][2] print"-------ids--------",ids picking_obj.force_assign(cursor, user, ids) picking_obj.action_move(cursor, ... | def _make_packing(obj, cursor, user, data, context): wkf_service = netsvc.LocalService('workflow') pool = pooler.get_pool(cursor.dbname) picking_obj = pool.get('stock.picking') ids = data['form']['pickings'][0][2] print"-------ids--------",ids picking_obj.force_assign(cursor, user, ids) picking_obj.action_move(cursor, ... | 468,393 |
def _make_packing(obj, cursor, user, data, context): wkf_service = netsvc.LocalService('workflow') pool = pooler.get_pool(cursor.dbname) picking_obj = pool.get('stock.picking') ids = data['form']['pickings'][0][2] print"-------ids--------",ids picking_obj.force_assign(cursor, user, ids) picking_obj.action_move(cursor, ... | def_make_packing(obj,cursor,user,data,context):wkf_service=netsvc.LocalService('workflow')pool=pooler.get_pool(cursor.dbname)picking_obj=pool.get('stock.picking')ids=data['form']['pickings'][0][2]print"-------ids--------",idspicking_obj.force_assign(cursor,user,ids)picking_obj.action_move(cursor,user,ids)forpicking_idi... | 468,394 |
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_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_posi... | 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_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_posi... | 468,395 |
def format_body(self, body): return body and tools.ustr(body.encode('ascii', 'replace')) or '' | def format_body(self, body): return body and tools.ustr(body.encode('ascii', 'replace')) or '' | 468,396 |
def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod... | def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod... | 468,397 |
def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod... | def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod... | 468,398 |
def _get_source(self, cr, uid, name, types, lang, source=None): """ Returns the translation for the given combination of name, type, language and source. All values passed to this method should be unicode (not byte strings), especially ``source``. | def _get_source(self, cr, uid, name, types, lang, source=None): """ Returns the translation for the given combination of name, type, language and source. All values passed to this method should be unicode (not byte strings), especially ``source``. | 468,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.