rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if datas.get('interval') < 1: raise osv.except_osv(_('Error!'), ("Please select proper Interval")) | interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or '' | 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... | be62cac907e916d2ae64f7efd194e7c889eea71e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be62cac907e916d2ae64f7efd194e7c889eea71e/base_calendar.py |
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): | if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31): | 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... | be62cac907e916d2ae64f7efd194e7c889eea71e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be62cac907e916d2ae64f7efd194e7c889eea71e/base_calendar.py |
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\ | enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\ | 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... | be62cac907e916d2ae64f7efd194e7c889eea71e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be62cac907e916d2ae64f7efd194e7c889eea71e/base_calendar.py |
rrule_string = 'FREQ=' + freq.upper() + weekstring + ';INTERVAL=' + \ str(datas.get('interval')) + enddate + monthstring + yearstring | rrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \ + enddate + monthstring + yearstring | 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... | be62cac907e916d2ae64f7efd194e7c889eea71e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be62cac907e916d2ae64f7efd194e7c889eea71e/base_calendar.py |
"imaplib", "smtplib", "email", "yaml","pywebdav", | "imaplib", "smtplib", "email", "yaml", "DAV", | 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) | ed4a891e82f7aca10c965f97b63f88ec5331295f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4a891e82f7aca10c965f97b63f88ec5331295f/setup.py |
WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.category_id=aaa.id | WHERE pur.project_id=pp.id and pt.project_id=pp.id and pp.category_id=aaa.id AND pur.uid != aaa.user_id | 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... | d815b183ea7a3f937ca6126f59c5b78244faccb2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d815b183ea7a3f937ca6126f59c5b78244faccb2/project_report.py |
delay = partner_rec and partner_rec.delay or False newdate = newdate -(delay or datetime.strptime(tender.date_start, '%Y-%m-%d %H:%M:%S') ) | delay = partner_rec and partner_rec.delay or 0.0 newdate = newdate -(delay and relativedelta(days=delay) or datetime.strptime(tender.date_start, '%Y-%m-%d %H:%M:%S') ) | def create_order(self, cr, uid, ids, context): """ To Create a purchase orders . | 5b50147e6d0c225700994be96287e542e096f0af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b50147e6d0c225700994be96287e542e096f0af/purchase_requisition_partner.py |
self.user=uid | self.user = uid | 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, }) | 2ebe698dbd1ca6d5e285b9858079076d55f28413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2ebe698dbd1ca6d5e285b9858079076d55f28413/account_voucher_print.py |
cur = user_id.company_id.currency_id.name amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur); return amt_en | return amount_to_text_en.amount_to_text(amount, 'en', user_id.company_id.currency_id.name) | 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 | 2ebe698dbd1ca6d5e285b9858079076d55f28413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2ebe698dbd1ca6d5e285b9858079076d55f28413/account_voucher_print.py |
'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped'), | 'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True), | 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_... | f2aa6adb1517602b2ee7f9d349d56612ea8ccf2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f2aa6adb1517602b2ee7f9d349d56612ea8ccf2e/stock.py |
lines = end_lines = self._get_cash_close_box_lines(cr, uid, [], context) vals.update({ 'ending_details_ids':lines }) | if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash': lines = end_lines = self._get_cash_close_box_lines(cr, uid, [], context) vals.update({ 'ending_details_ids':lines }) else: vals.update({ 'ending_details_ids':False, 'starting_details_ids':False }) | 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... | 73f6400a1fc736d25995add13b9bb3d889de9382 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/73f6400a1fc736d25995add13b9bb3d889de9382/account_cash_statement.py |
class res_users(osv.osv): _name = 'res.users' _inherit = 'res.users' def create(self, cr, uid, data, context=None): if context is None: context = {} user_id = super(res_users, self).create(cr, uid, data, context) data_obj = self.pool.get('ir.model.data') try: data_id = data_obj._get_id(cr, uid, 'product', 'ir_ui_view... | 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 ... | 7ca5d63652092420e8e2ac3b7a268f05a4b4f45d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7ca5d63652092420e8e2ac3b7a268f05a4b4f45d/product.py | |
context['active_id'], | context['template_id'], | 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'... | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py |
'ref_template': lambda self, cr, uid, ctx:ctx['active_id'], | 'ref_template': lambda self, cr, uid, ctx:ctx['template_id'], | 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'... | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py |
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'... | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py | ||
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context) | template = self.pool.get('email.template').browse(cr, uid, context['template_id'], context) | 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... | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py |
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx) | template = self.pool.get('email.template').browse(cr, uid, context['template_id'], ctx) | 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... | cd97a6597003594b6958e306479584b11a7550bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd97a6597003594b6958e306479584b11a7550bd/email_template.py |
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
continue | continue | 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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py |
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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':... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
def check_vals(self, val1, val2): if val1 == val2 and val1 == 0: return True return False | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 =... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 =... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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, '... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 ... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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]), ... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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','... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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,... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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,... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
for slip in self.browse(cr, uid, ids, context=context): | for slip in self.browse(cr, uid, ids, context=context): | 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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py |
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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 | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
'code':fields.char('Code', size=64, required=False, readonly=False), | 'code':fields.char('Code', size=64, required=False, readonly=False), | 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}} | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py |
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, ... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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, ... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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, ... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
'basic':basic, 'gross':gross, | 'basic':basic, 'gross':gross, | 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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py |
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
'basic':basic, 'advantages_gross':allowance, 'gross':basic + allowance, | 'basic':basic, 'advantages_gross':allowance, 'gross':basic + allowance, | 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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py |
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
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}... | 90e8a2a9ac966d2bf970850306e713ecc1398f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/90e8a2a9ac966d2bf970850306e713ecc1398f14/hr_payroll.py | ||
domain += ['|',('user_id','=',uid)] | domain += ['|',('user_id','=',user_id)] | 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... | 7d8873c4ef8ba315c15fe9ac42f8ceb02c4809c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7d8873c4ef8ba315c15fe9ac42f8ceb02c4809c0/account_analytic_default.py |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit) | total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit) | total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, original_amount), | 'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, original_amount, context=context_multi_currency), | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled) | 'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
rs['amount'] = currency_pool.compute(cr, uid, company_currency, currency_id, amount) | rs['amount'] = currency_pool.compute(cr, uid, company_currency, currency_id, amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
rs['amount'] = currency_pool.compute(cr, uid, company_currency, currency_id, amount) | rs['amount'] = currency_pool.compute(cr, uid, company_currency, currency_id, amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
def onchange_date(self, cr, user, ids, date, context=None): | def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None): | 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... | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
pids = period_pool.search(cr, user, [('date_start', '<=', date), ('date_stop', '>=', date)]) if not pids: return {} return { 'value':{ 'period_id':pids[0] } } | res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=context) pids = period_pool.search(cr, uid, [('date_start', '<=', date), ('date_stop', '>=', date)]) if pids: res['value'].update({'period_id':pids[0]}) return res | 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... | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
credit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount) | credit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
debit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount) | debit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount) | line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount) | line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount) | amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context_multi_currency) | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1) or 0.0, | 'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0, | 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 | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py |
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)... | 02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py | ||
'partner_id': hasattr(case, 'partner_id') and (case.partner_id and case.partner_id.id or False) or False, | 'partner_id': partner_id, | 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... | 42c99b3536d326787b7bb7cb789f51c436639a72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/42c99b3536d326787b7bb7cb789f51c436639a72/mail_gateway.py |
if context.get('contact_display', 'contact')=='partner': | if context.get('contact_display', 'contact')=='partner' and r['partner_id']: | 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... | 0d8dcf48159c429f594e72e8630633bbc9c2823b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0d8dcf48159c429f594e72e8630633bbc9c2823b/partner.py |
val = 0.0 | val = val1 = 0.0 | 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... | 928d674dae1a25a5664fdabaa4fb2c374ca83d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/928d674dae1a25a5664fdabaa4fb2c374ca83d2e/point_of_sale.py |
res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val) | res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val) res[order.id]['amount_total'] = res[order.id]['amount_tax'] + cur_obj.round(cr, uid, cur, val1) | 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... | 928d674dae1a25a5664fdabaa4fb2c374ca83d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/928d674dae1a25a5664fdabaa4fb2c374ca83d2e/point_of_sale.py |
'amount_total': fields.function(_amount_total, method=True, string='Total'), | 'amount_total': fields.function(_amount_all, method=True, string='Total', multi='all'), | 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] ... | 928d674dae1a25a5664fdabaa4fb2c374ca83d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/928d674dae1a25a5664fdabaa4fb2c374ca83d2e/point_of_sale.py |
computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['taxes'] for tax in computed_taxes: tax_amount += tax['amount'] if line.discount!=0.0: res[line.id][f] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0) else: res[line.id][f] = line.price_unit * line.qty res[line.i... | price = line.price_unit * (1 - (line.discount or 0.0) / 100.0) computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, price, line.qty) cur = line.order_id.pricelist_id.currency_id res[line.id][f] = self.pool.get('res.currency').round(cr, uid, cur, computed_taxes['total']) | 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') | 928d674dae1a25a5664fdabaa4fb2c374ca83d2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/928d674dae1a25a5664fdabaa4fb2c374ca83d2e/point_of_sale.py |
return adr_id and res_partner_address.read(self.cr, self.uid, [adr_id])[0] or False | return adr_id and res_partner_address.read(self.cr, self.uid, [adr_id])[0] or {} | 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 ... | 8ba31fc711e01b9ae48ad6b3fe26b34ea1bd8d4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8ba31fc711e01b9ae48ad6b3fe26b34ea1bd8d4a/order.py |
'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder'), 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder'), | 'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder', store=True), 'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder', store=True), | 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 | 386aee4aeb9a44cbd2c27eca1b3ff2d270df280b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/386aee4aeb9a44cbd2c27eca1b3ff2d270df280b/mrp.py |
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': | 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'): | 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... | 0942c399131d6974a2ca57d1357d4dbb537703ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0942c399131d6974a2ca57d1357d4dbb537703ac/account_voucher.py |
'\n\nThis module is already installed on your system') | '\n\nThis addon is already installed on your system') | 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) | 1aadecf71f7e78e4fca6b4feadd7f5d8178d1f57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1aadecf71f7e78e4fca6b4feadd7f5d8178d1f57/res_config.py |
'datas_fname':tools.ustr( get_value( cursor, user, record_id, template.file_name, template, context ) or 'Report') + "." + format, | 'datas_fname': fname, | 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... | 52afa5e307bee1199252c4819b439ab58d8cd4e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/52afa5e307bee1199252c4819b439ab58d8cd4e6/email_template.py |
self._poolJobs(dbname) | self.setAlarm(self._poolJobs, time.time(), dbname, dbname) | def restart(self, dbname): self.cancel(dbname) self._poolJobs(dbname) | f434e3c4d32b76c1b33b186cb8cb0f05b0e8a5ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f434e3c4d32b76c1b33b186cb8cb0f05b0e8a5ce/ir_cron.py |
if not tools._email_send(msg, openobject_id=res_id) and email_error: | if not tools.misc._email_send(msg, openobject_id=res_id) and email_error: | 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... | 13917f92e07cad7be177ec62ba85151a4aaf8a44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/13917f92e07cad7be177ec62ba85151a4aaf8a44/mail_gateway.py |
tools._email_send(msg, openobject_id=res_id) | tools.misc._email_send(msg, openobject_id=res_id) | 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... | 13917f92e07cad7be177ec62ba85151a4aaf8a44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/13917f92e07cad7be177ec62ba85151a4aaf8a44/mail_gateway.py |
msg += "\n\nEither you wrongly customised this view, or some modules bringing those views are not compatible with your current data model" | msg += "\n\nEither you wrongly customized this view, or some modules bringing those views are not compatible with your current data model" | fields_def = self.__view_look_dom(cr, user, node, view_id, context=context) | e5527663523bcaa27d00375a36304d8462c61bc6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5527663523bcaa27d00375a36304d8462c61bc6/orm.py |
return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line, company_currency_id, next_number, context=context) | return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context) | 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: ... | 5b559ba35653d6e4da2217b9f80e9be20b881918 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b559ba35653d6e4da2217b9f80e9be20b881918/account_voucher.py |
unlink_ids.append(st_line.voucher_id.id) | if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) | 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... | 5b559ba35653d6e4da2217b9f80e9be20b881918 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b559ba35653d6e4da2217b9f80e9be20b881918/account_voucher.py |
'account_id': acc, | 'account_id': acc.id, | 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... | d43fc2378b3e4ab5882e0a264e0a562c6a9f6e14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d43fc2378b3e4ab5882e0a264e0a562c6a9f6e14/hr_expense.py |
base_calendar.base_calendar_id2real_id(id) | base_calendar_id2real_id(id) | 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 | 11a924327f6fe91ba6f8c11f36551bb26b0931e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/11a924327f6fe91ba6f8c11f36551bb26b0931e7/base_calendar.py |
def __getitem__(self, y): return self.dict.__getitem__(y) | def __ge__(self, y): return self.dict.__ge__(y) | 02e18c4262b2d4edf44b1fabf997891ba48e7e18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02e18c4262b2d4edf44b1fabf997891ba48e7e18/misc.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.