bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | 467,300 |
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | 467,301 |
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | 467,302 |
def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | def compute_rule_string(self, cr, uid, datas, context=None, *args): """ Compute rule string. @param self: the object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param datas: dictionary of freq and interval value. @return: string value which compu... | 467,303 |
def run(self): # create startup script start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n"\ % (join(self.install_libbase, "openerp-server"), sys.executable) # write script f = open('openerp-server', 'w') f.write(start_script) f.close() install.run(self) | def run(self): # create startup script start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n"\ % (join(self.install_libbase, "openerp-server"), sys.executable) # write script f = open('openerp-server', 'w') f.write(start_script) f.close() install.run(self) | 467,304 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'project_vs_hours') cr.execute(""" CREATE or REPLACE view project_vs_hours as ( select min(pt.id) as id, aaa.user_id as uid, aaa.name as project, aaa.state, sum(pt.remaining_hours) as remaining_hours, sum(pt.planned_hours) as planned_hours, sum(pt.total_hours) as to... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'project_vs_hours') cr.execute(""" CREATE or REPLACE view project_vs_hours as ( select min(pt.id) as id, aaa.user_id as uid, aaa.name as project, aaa.state, sum(pt.remaining_hours) as remaining_hours, sum(pt.planned_hours) as planned_hours, sum(pt.total_hours) as to... | 467,305 |
def create_order(self, cr, uid, ids, context): """ To Create a purchase orders . | def create_order(self, cr, uid, ids, context): """ To Create a purchase orders . | 467,306 |
def __init__(self, cr, uid, name, context=None): super(report_voucher_move, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, 'convert':self.convert, 'get_title': self.get_title, 'debit':self.debit, 'credit':self.credit, }) | def __init__(self, cr, uid, name, context=None): super(report_voucher_move, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, 'convert':self.convert, 'get_title': self.get_title, 'debit':self.debit, 'credit':self.credit, }) | 467,307 |
def convert(self, amount): user_id = self.pool.get('res.users').browse(self.cr, self.user, [self.user])[0] cur = user_id.company_id.currency_id.name amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); return amt_en | def convert(self, amount): user_id = self.pool.get('res.users').browse(self.cr, self.user, [self.user])[0] cur = user_id.company_id.currency_id.name amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); return amt_en | 467,308 |
def _check_product_lot(self, cr, uid, ids, context=None): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids, context=context): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_... | def _check_product_lot(self, cr, uid, ids, context=None): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids, context=context): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_... | 467,309 |
def create(self, cr, uid, vals, context=None): company_id = vals and vals.get('company_id',False) if company_id: sql = [ ('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open') ] open_jrnl = self.search(cr, uid, sql) if open_jrnl: raise osv.except_osv('Error', _('You can... | def create(self, cr, uid, vals, context=None): company_id = vals and vals.get('company_id',False) if company_id: sql = [ ('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open') ] open_jrnl = self.search(cr, uid, sql) if open_jrnl: raise osv.except_osv('Error', _('You can... | 467,310 |
def price_get(self, cr, uid, supplier_ids, product_id, product_qty=1, context=None): """ Calculate price from supplier pricelist. @param supplier_ids: Ids of res.partner object. @param product_id: Id of product. @param product_qty: specify quantity to purchase. """ if not context: context = {} if type(supplier_ids) in ... | def price_get(self, cr, uid, supplier_ids, product_id, product_qty=1, context=None): """ Calculate price from supplier pricelist. @param supplier_ids: Ids of res.partner object. @param product_id: Id of product. @param product_qty: specify quantity to purchase. """ if not context: context = {} if type(supplier_ids) in ... | 467,311 |
def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['active_id'], ['object_name'], context)['object_name'... | def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['template_id'], ['object_name'], context)['object_nam... | 467,312 |
def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['active_id'], ['object_name'], context)['object_name'... | def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['active_id'], ['object_name'], context)['object_name'... | 467,313 |
def _default_model(self, cursor, user, context=None): """ Returns the default value for model field @param cursor: Database Cursor @param user: ID of current user @param context: Open ERP Context """ return self.pool.get('email.template').read( cursor, user, context['active_id'], ['object_name'], context)['object_name'... | def_default_model(self,cursor,user,context=None):"""Returnsthedefaultvalueformodelfield@paramcursor:DatabaseCursor@paramuser:IDofcurrentuser@paramcontext:OpenERPContext"""returnself.pool.get('email.template').read(cursor,user,context['active_id'],['object_name'],context)['object_name'] | 467,314 |
def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None): if context is None: context = {} if not rel_model_ref: return {} vals = {} if context == {}: context = self.context template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context) #Search translated template lang = get_value(c... | def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None): if context is None: context = {} if not rel_model_ref: return {} vals = {} if context == {}: context = self.context template = self.pool.get('email.template').browse(cr, uid, context['template_id'], context) #Search translated template lang = get_value... | 467,315 |
def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None): if context is None: context = {} if not rel_model_ref: return {} vals = {} if context == {}: context = self.context template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context) #Search translated template lang = get_value(c... | def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None): if context is None: context = {} if not rel_model_ref: return {} vals = {} if context == {}: context = self.context template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context) #Search translated template lang = get_value(c... | 467,316 |
def prev_bounds(cdate=False): when = date.fromtimestamp(time.mktime(time.strptime(cdate,"%Y-%m-%d"))) this_first = date(when.year, when.month, 1) month = when.month + 1 year = when.year if month > 12: month = 1 year += 1 next_month = date(year, month, 1) prev_end = next_month - timedelta(days=1) return this_first, prev... | def prev_bounds(cdate=False): when = date.fromtimestamp(time.mktime(time.strptime(cdate,"%Y-%m-%d"))) this_first = date(when.year, when.month, 1) month = when.month + 1 year = when.year if month > 12: month = 1 year += 1 next_month = date(year, month, 1) prev_end = next_month - timedelta(days=1) return this_first, prev... | 467,317 |
def copy(self, cr, uid, id, default=None, context=None): """ Create a new record in hr_payroll_structure model from existing one @param cr: cursor to database @param user: id of current user @param id: list of record ids on which copy method executes @param default: dict type contains the values to be override during c... | def copy(self, cr, uid, id, default=None, context=None): """ Create a new record in hr_payroll_structure model from existing one @param cr: cursor to database @param user: id of current user @param id: list of record ids on which copy method executes @param default: dict type contains the values to be override during c... | 467,318 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,319 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,320 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,321 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,322 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,323 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,324 |
def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | def compute_basic(self, cr, uid, ids, context={}): res = {} ids += context.get('employee_structure', []) slip_pool = self.pool.get('hr.payslip') slip_line_pool = self.pool.get('hr.payslip.line') for contract in self.browse(cr, uid, ids, context): all_per = 0.0 ded_per = 0.0 all_fix = 0.0 ded_fix = 0.0 obj = {'basic':... | 467,325 |
def check_vals(self, val1, val2): if val1 == val2 and val1 == 0: return True return False | def check_vals(self, val1, val2): if val1 == val2 and val1 == 0: return True return False | 467,326 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | 467,327 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | 467,328 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | 467,329 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): res = self.compute_basic(cr, uid, ids, context) vals = {} for rs in self.browse(cr, uid, ids, context=context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':res[rs.id], 'gross':0.0, 'net':0.0} if rs.wage_type_id.type == 'gross': obj['gro... | 467,330 |
def final_verify_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') advice_pool = self.pool.get('hr.payroll.advice') advice_line_pool = self.pool.get('hr.payroll.advice.line') sequence_pool = self.pool.get('ir.sequence') users_pool = self.pool.get('res.users') if context is None: context =... | def final_verify_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') advice_pool = self.pool.get('hr.payroll.advice') advice_line_pool = self.pool.get('hr.payroll.advice.line') sequence_pool = self.pool.get('ir.sequence') users_pool = self.pool.get('res.users') if context is None: context =... | 467,331 |
def final_verify_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') advice_pool = self.pool.get('hr.payroll.advice') advice_line_pool = self.pool.get('hr.payroll.advice.line') sequence_pool = self.pool.get('ir.sequence') users_pool = self.pool.get('res.users') if context is None: context =... | def final_verify_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') advice_pool = self.pool.get('hr.payroll.advice') advice_line_pool = self.pool.get('hr.payroll.advice.line') sequence_pool = self.pool.get('ir.sequence') users_pool = self.pool.get('res.users') if context is None: context =... | 467,332 |
def process_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') for id in ids: sids = slip_pool.search(cr, uid, [('register_id','=',id), ('state','=','confirm')], context=context) wf_service = netsvc.LocalService("workflow") for sid in sids: wf_service.trg_validate(uid, 'hr.payslip', sid, '... | def process_sheet(self, cr, uid, ids, context=None): slip_pool = self.pool.get('hr.payslip') for id in ids: sids = slip_pool.search(cr, uid, [('register_id','=',id), ('state','=','confirm')], context=context) wf_service = netsvc.LocalService("workflow") for sid in sids: wf_service.trg_validate(uid, 'hr.payslip', sid, '... | 467,333 |
def onchange_company_id(self, cr, uid, ids, company_id=False, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) if company.partner_id.bank_ids: res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return ... | def onchange_company_id(self, cr, uid, ids, company_id=False, context=None): res = {} if context is None: context = {} if company_id: company = self.pool.get('res.company').browse(cr, uid, company_id, context=context) if company.partner_id.bank_ids: res.update({'bank': company.partner_id.bank_ids[0].bank.name}) return ... | 467,334 |
def onchange_employee_id(self, cr, uid, ids, ddate, employee_id, context=None): vals = {} slip_pool = self.pool.get('hr.payslip') if context is None: context = {} if employee_id: dates = prev_bounds(ddate) sids = False sids = slip_pool.search(cr, uid, [('paid','=',False),('state','=','confirm'),('date','>=',dates[0]), ... | def onchange_employee_id(self, cr, uid, ids, ddate, employee_id, context=None): vals = {} slip_pool = self.pool.get('hr.payslip') if context is None: context = {} if employee_id: dates = prev_bounds(ddate) sids = False sids = slip_pool.search(cr, uid, [('paid','=',False),('state','=','confirm'),('date','>=',dates[0]), ... | 467,335 |
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') | def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') | 467,336 |
def _total(self, cr, uid, ids, field_names, arg, context=None): if context is None: context = {} res={} for line in self.browse(cr, uid, ids, context=context): res[line.id] = line.emp_deduction + line.comp_deduction return res | def _total(self, cr, uid, ids, field_names, arg, context=None): if context is None: context = {} res={} for line in self.browse(cr, uid, ids, context=context): res[line.id] = line.emp_deduction + line.comp_deduction return res | 467,337 |
def _execute_function(self, cr, uid, id, value, context=None): """ self: pointer to self object cr: cursor to database uid: user id of current executer """ line_pool = self.pool.get('company.contribution.line') if context is None: context = {} res = 0 ids = line_pool.search(cr, uid, [('category_id','=',id), ('to_val','... | def _execute_function(self, cr, uid, id, value, context=None): """ self: pointer to self object cr: cursor to database uid: user id of current executer """ line_pool = self.pool.get('company.contribution.line') if context is None: context = {} res = 0 ids = line_pool.search(cr, uid, [('category_id','=',id), ('to_val','... | 467,338 |
def compute(self, cr, uid, id, value, context={}): contrib = self.browse(cr, uid, id, context) if contrib.amount_type == 'fix': return contrib.contribute_per elif contrib.amount_type == 'per': return value * contrib.contribute_per elif contrib.amount_type == 'func': return self._execute_function(cr, uid, id, value, con... | def compute(self, cr, uid, id, value, context={}): contrib = self.browse(cr, uid, id, context) if contrib.amount_type == 'fix': return contrib.contribute_per elif contrib.amount_type == 'per': return value * contrib.contribute_per elif contrib.amount_type == 'func': return self._execute_function(cr, uid, id, value, con... | 467,339 |
def compute(self, cr, uid, id, value, context={}): contrib = self.browse(cr, uid, id, context) if contrib.amount_type == 'fix': return contrib.contribute_per elif contrib.amount_type == 'per': return value * contrib.contribute_per elif contrib.amount_type == 'func': return self._execute_function(cr, uid, id, value, con... | def compute(self, cr, uid, id, value, context={}): contrib = self.browse(cr, uid, id, context) if contrib.amount_type == 'fix': return contrib.contribute_per elif contrib.amount_type == 'per': return value * contrib.contribute_per elif contrib.amount_type == 'func': return self._execute_function(cr, uid, id, value, con... | 467,340 |
def process_sheet(self, cr, uid, ids, context=None): if context is None: context = {} self.write(cr, uid, ids, {'paid':True, 'state':'done'}, context=context) return True | def process_sheet(self, cr, uid, ids, context=None): if context is None: context = {} self.write(cr, uid, ids, {'paid':True, 'state':'done'}, context=context) return True | 467,341 |
def verify_sheet(self, cr, uid, ids, context={}): payslip_pool = self.pool.get('hr.payslip.line') register_pool = self.pool.get('company.contribution') register_line_pool = self.pool.get('hr.contibution.register.line') for slip in self.browse(cr, uid, ids, context=context): base = { 'basic':slip.basic, 'net':slip.net,... | def verify_sheet(self, cr, uid, ids, context={}): payslip_pool = self.pool.get('hr.payslip.line') register_pool = self.pool.get('company.contribution') register_line_pool = self.pool.get('hr.contibution.register.line') for slip in self.browse(cr, uid, ids, context=context): base = { 'basic':slip.basic, 'net':slip.net,... | 467,342 |
def verify_sheet(self, cr, uid, ids, context={}): payslip_pool = self.pool.get('hr.payslip.line') register_pool = self.pool.get('company.contribution') register_line_pool = self.pool.get('hr.contibution.register.line') for slip in self.browse(cr, uid, ids, context=context): base = { 'basic':slip.basic, 'net':slip.net,... | def verify_sheet(self, cr, uid, ids, context={}): payslip_pool = self.pool.get('hr.payslip.line') register_pool = self.pool.get('company.contribution') register_line_pool = self.pool.get('hr.contibution.register.line') for slip in self.browse(cr, uid, ids, context=context): base = { 'basic':slip.basic, 'net':slip.net,... | 467,343 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,344 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,345 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,346 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,347 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,348 |
def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | def get_days(start, end, month, year, calc_day): count = 0 import datetime for day in range(start, end): if datetime.date(year, month, day).weekday() == calc_day: count += 1 return count | 467,349 |
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}} | def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}} | 467,350 |
def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | 467,351 |
def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | 467,352 |
def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | def execute_function(self, cr, uid, id, value, context=None): if context is None: context = {} line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)], context=context) if not ids: ids = line_pool.search(cr, uid, ... | 467,353 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,354 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,355 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,356 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,357 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,358 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,359 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,360 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,361 |
def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | def _calculate_salary(self, cr, uid, ids, field_names, arg, context=None): vals = {} slip_line_pool = self.pool.get('hr.payslip.line') for employee in self.browse(cr, uid, ids, context): if not employee.contract_id: vals[employee.id] = {'basic':0.0, 'gross':0.0, 'net':0.0, 'advantages_gross':0.0, 'advantages_net':0.0}... | 467,362 |
def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}): domain = [] if product_id: domain += ['|',('product_id','=',product_id)] domain += [('product_id','=',False)] if partner_id: domain += ['|',('partner_id','=',partner_id)] domain += [('partner_id','=',False)] if user_i... | def account_get(self, cr, uid, product_id=None, partner_id=None, user_id=None, date=None, context={}): domain = [] if product_id: domain += ['|',('product_id','=',product_id)] domain += [('product_id','=',False)] if partner_id: domain += ['|',('partner_id','=',partner_id)] domain += [('partner_id','=',False)] if user_i... | 467,363 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): """price Returns a dict that contains new values and context | 467,364 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,365 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,366 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,367 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,368 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,369 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 467,370 |
def onchange_date(self, cr, user, ids, date, context=None): """ @param date: latest value from user input for field date @param args: other arguments @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context """ period_pool = self.pool.get('account.period') p... | def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): """ @param date: latest value from user input for field date @param args: other arguments @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context "... | 467,371 |
def onchange_date(self, cr, user, ids, date, context=None): """ @param date: latest value from user input for field date @param args: other arguments @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context """ period_pool = self.pool.get('account.period') p... | def onchange_date(self, cr, user, ids, date, context=None): """ @param date: latest value from user input for field date @param args: other arguments @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context """ period_pool = self.pool.get('account.period') p... | 467,372 |
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 | 467,373 |
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 | 467,374 |
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 | 467,375 |
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 | 467,376 |
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 | 467,377 |
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 | 467,378 |
def unlink(self, cr, uid, ids, context=None): voucher_obj = self.pool.get('account.voucher') statement_line = self.browse(cr, uid, ids, context=context) unlink_ids = [] for st_line in statement_line: if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) voucher_obj.unlink(cr, uid, unlink_ids, context=context)... | def unlink(self, cr, uid, ids, context=None): voucher_obj = self.pool.get('account.voucher') statement_line = self.browse(cr, uid, ids, context=context) unlink_ids = [] for st_line in statement_line: if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) voucher_obj.unlink(cr, uid, unlink_ids, context=context)... | 467,379 |
def history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, \ email_from=False, message_id=False, references=None, attach=None, email_cc=None, \ email_bcc=None, email_date=None, context=None): """ @param self: The object pointer @param cr: the current row, from the database cursor... | def history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, \ email_from=False, message_id=False, references=None, attach=None, email_cc=None, \ email_bcc=None, email_date=None, context=None): """ @param self: The object pointer @param cr: the current row, from the database cursor... | 467,380 |
def name_get(self, cr, user, ids, context={}): if not len(ids): return [] res = [] for r in self.read(cr, user, ids, ['name','zip','city','partner_id', 'street']): if context.get('contact_display', 'contact')=='partner': res.append((r['id'], r['partner_id'][1])) else: addr = r['name'] or '' if r['name'] and (r['zip'] o... | def name_get(self, cr, user, ids, context={}): if not len(ids): return [] res = [] for r in self.read(cr, user, ids, ['name','zip','city','partner_id', 'street']): if context.get('contact_display', 'contact')=='partner' and r['partner_id']: res.append((r['id'], r['partner_id'][1])) else: addr = r['name'] or '' if r['na... | 467,381 |
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') res = {} for order in self.browse(cr, uid, ids, context=context): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } val = 0.0 cur = order.pricelist_i... | def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') res = {} for order in self.browse(cr, uid, ids, context=context): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } val = val1 = 0.0 cur = order.pric... | 467,382 |
def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') res = {} for order in self.browse(cr, uid, ids, context=context): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } val = 0.0 cur = order.pricelist_i... | def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') res = {} for order in self.browse(cr, uid, ids, context=context): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } val = 0.0 cur = order.pricelist_i... | 467,383 |
def _get_v( self, cr, uid, ids, *a): """ Changed the Validation state of order @return: State """ res_obj = self.pool.get('res.users') company_disc = self.browse(cr, uid, ids) list_jrnl = [] r = {} if not company_disc: comp = res_obj.browse(cr, uid, uid).company_id.company_discount or 0.0 else: comp = company_disc[0] ... | def _get_v( self, cr, uid, ids, *a): """ Changed the Validation state of order @return: State """ res_obj = self.pool.get('res.users') company_disc = self.browse(cr, uid, ids) list_jrnl = [] r = {} if not company_disc: comp = res_obj.browse(cr, uid, uid).company_id.company_discount or 0.0 else: comp = company_disc[0] ... | 467,384 |
def _amount_line_all(self, cr, uid, ids, field_names, arg, context): res = dict([(i, {}) for i in ids]) account_tax_obj = self.pool.get('account.tax') | def _amount_line_all(self, cr, uid, ids, field_names, arg, context): res = dict([(i, {}) for i in ids]) account_tax_obj = self.pool.get('account.tax') | 467,385 |
def _adr_get(self, partner, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) adr_id = addresses and addresses[type] or False return adr_id ... | def _adr_get(self, partner, type): res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) adr_id = addresses and addresses[type] or False return adr_id ... | 467,386 |
def _production_date(self, cr, uid, ids, prop, unknow_none, context={}): """ Finds production planned date. @param prop: Name of field. @param unknow_none: @return: Dictionary of values. """ result = {} for prod in self.browse(cr, uid, ids, context=context): result[prod.id] = prod.date_planned[:10] return result | def _production_date(self, cr, uid, ids, prop, unknow_none, context={}): """ Finds production planned date. @param prop: Name of field. @param unknow_none: @return: Dictionary of values. """ result = {} for prod in self.browse(cr, uid, ids, context=context): result[prod.id] = prod.date_planned[:10] return result | 467,387 |
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): if not view_id: mod_obj = self.pool.get('ir.model.data') if context.get('invoice_type', False) in ('out_invoice', 'out_refund') or context.get('line_type', False) == 'customer': result = mod_obj.get_object_ref... | def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): mod_obj = self.pool.get('ir.model.data') if not view_id and context.get('invoice_type', False): if context.get('invoice_type', False) in ('out_invoice', 'out_refund'): result = mod_obj.get_object_reference(cr,... | 467,388 |
def fields_get(self, cr, uid, fields=None, context=None, read_access=True): """ If an addon is already installed, set it to readonly as res.config.installer doesn't handle uninstallations of already installed addons """ fields = super(res_config_installer, self).fields_get( cr, uid, fields, context, read_access) | def fields_get(self, cr, uid, fields=None, context=None, read_access=True): """ If an addon is already installed, set it to readonly as res.config.installer doesn't handle uninstallations of already installed addons """ fields = super(res_config_installer, self).fields_get( cr, uid, fields, context, read_access) | 467,389 |
def generate_attach_reports(self, cursor, user, template, record_id, mail, context=None): """ Generate report to be attached and attach it to the email @param cursor: Database Cursor @param user: ID of User @param template: Browse record of template @param record_id: ID of the target model for which this mail has to b... | def generate_attach_reports(self, cursor, user, template, record_id, mail, context=None): """ Generate report to be attached and attach it to the email @param cursor: Database Cursor @param user: ID of User @param template: Browse record of template @param record_id: ID of the target model for which this mail has to b... | 467,390 |
def restart(self, dbname): self.cancel(dbname) self._poolJobs(dbname) | def restart(self, dbname): self.cancel(dbname) self._poolJobs(dbname) | 467,391 |
def email_forward(self, cr, uid, model, res_ids, msg, email_error=False, context=None): """Sends an email to all people following the thread @param res_id: Id of the record of OpenObject model created from the email message @param msg: email.message.Message to forward @param email_error: Default Email address in case o... | def email_forward(self, cr, uid, model, res_ids, msg, email_error=False, context=None): """Sends an email to all people following the thread @param res_id: Id of the record of OpenObject model created from the email message @param msg: email.message.Message to forward @param email_error: Default Email address in case o... | 467,392 |
def email_forward(self, cr, uid, model, res_ids, msg, email_error=False, context=None): """Sends an email to all people following the thread @param res_id: Id of the record of OpenObject model created from the email message @param msg: email.message.Message to forward @param email_error: Default Email address in case o... | def email_forward(self, cr, uid, model, res_ids, msg, email_error=False, context=None): """Sends an email to all people following the thread @param res_id: Id of the record of OpenObject model created from the email message @param msg: email.message.Message to forward @param email_error: Default Email address in case o... | 467,393 |
fields_def = self.__view_look_dom(cr, user, node, view_id, context=context) | fields_def = self.__view_look_dom(cr, user, node, view_id, context=context) | 467,394 |
def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None): voucher_obj = self.pool.get('account.voucher') wf_service = netsvc.LocalService("workflow") st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context) if st_line.voucher_id: ... | def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, next_number, context=None): voucher_obj = self.pool.get('account.voucher') wf_service = netsvc.LocalService("workflow") st_line = self.pool.get('account.bank.statement.line').browse(cr, uid, st_line_id, context=context) if st_line.voucher_id: ... | 467,395 |
def unlink(self, cr, uid, ids, context=None): statement_line = self.browse(cr, uid, ids, context) unlink_ids = [] for st_line in statement_line: unlink_ids.append(st_line.voucher_id.id) self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context) return super(account_bank_statement_line, self).unlink(c... | def unlink(self, cr, uid, ids, context=None): statement_line = self.browse(cr, uid, ids, context) unlink_ids = [] for st_line in statement_line: if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) self.pool.get('account.voucher').unlink(cr, uid, unlink_ids, context=context) return super(account_bank_stateme... | 467,396 |
def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_a... | def action_invoice_create(self, cr, uid, ids): res = False invoice_obj = self.pool.get('account.invoice') for exp in self.browse(cr, uid, ids): lines = [] for l in exp.line_ids: tax_id = [] if l.product_id: acc = l.product_id.product_tmpl_id.property_account_expense.id if not acc: acc = l.product_id.categ_id.property_a... | 467,397 |
def onchange_edit_all(self, cr, uid, ids, rrule_type,edit_all, context=None): if not context: context = {} data_obj = self.pool.get('ir.model.data') value = {} if edit_all and rrule_type: for id in ids: base_calendar.base_calendar_id2real_id(id) return value | def onchange_edit_all(self, cr, uid, ids, rrule_type,edit_all, context=None): if not context: context = {} data_obj = self.pool.get('ir.model.data') value = {} if edit_all and rrule_type: for id in ids: base_calendar_id2real_id(id) return value | 467,398 |
def __ge__(self, y): return self.dict.__ge__(y) | def __ge__(self, y): return self.dict.__ge__(y) | 467,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.