rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
function, values = node.items()[0]
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and...
88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py
context = self.get_context(node, local_context)
context = self.get_context(function, local_context)
def process_function(self, node): if self.mode != 'init': return function, values = node.items()[0] local_context = {'ref': self._ref, '_ref': self._ref} context = self.get_context(node, local_context) args = [] if function.eval: args = eval(function.eval, local_context) for value in values: if not 'model' in value and...
88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py
res_id=res and res[0] or False)
noupdate=self.isnoupdate(node), res_id=res and res[0] or False)
def process_menuitem(self, node): self.validate_xml_id(node.id)
88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py
self.pool.get('ir.model.data').ir_set(self.cr, self.uid, 'action', \ keyword, node.id, [node.src_model], value, replace=replace, isobject=True, xml_id=node.id)
self.pool.get('ir.model.data').ir_set(self.cr, self.uid, 'action', keyword, \ node.id, [node.src_model], value, replace=replace, noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id)
def process_act_window(self, node): self.validate_xml_id(node.id) view_id = False if node.view: view_id = self.get_id(node.view) context = eval(node.context, {'ref': self._ref, '_ref': self._ref})
88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py
self.pool.get('ir.model.data').ir_set(self.cr, self.uid, \ 'action', keyword, node.url, ["ir.actions.url"], value, replace=replace, isobject=True, xml_id=node.id)
self.pool.get('ir.model.data').ir_set(self.cr, self.uid, 'action', \ keyword, node.url, ["ir.actions.url"], value, replace=replace, \ noupdate=self.isnoupdate(node), isobject=True, xml_id=node.id)
def process_url(self, node): self.validate_xml_id(node.id)
88635654ce8aa65af2e0d311178c356dd8e2cd42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/88635654ce8aa65af2e0d311178c356dd8e2cd42/yaml_test.py
data = self.read(cr, uid, alldata.keys(), groupby and [groupby] or [], context=context)
data = self.read(cr, uid, alldata.keys(), groupby and [groupby] or ['id'], context=context)
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields
14ecc8dff196b3bdffb094cf1095c8bcca34c4ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/14ecc8dff196b3bdffb094cf1095c8bcca34c4ab/orm.py
qry += " WHERE recurrent_id=%s" cr.execute(qry, (rdate,))
qry += " where recurrent_id='%s'" % (rdate) cr.execute(qry)
def uid2openobjectid(cr, uidval, oomodel, rdate): """ UID To Open Object Id @param cr: the current row, from the database cursor, @param uidval: Get USerId vale @oomodel: Open Object ModelName @param rdate: Get Recurrent Date """ __rege = re.compile(r'OpenObject-([\w|\.]+)_([0-9]+)@(\w+)$') if not uidval: return (False...
551862ccc61d042fb25b170c335b710419d393a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/551862ccc61d042fb25b170c335b710419d393a8/calendar.py
('login_key', 'UNIQUE (login)', _('You can not have two users with the same login !'))
('login_key', 'UNIQUE (login)', 'You can not have two users with the same login !')
def _check_company(self, cr, uid, ids, context=None): return all(((this.company_id in this.company_ids) or not this.company_ids) for this in self.browse(cr, uid, ids, context))
bba8926e32ba74e5ae7047a2c59dd1be57409b1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/bba8926e32ba74e5ae7047a2c59dd1be57409b1a/res_user.py
def _sum_period(self, cr, uid, ids, name, args, context): if context is None: context = {} move_state = ('posted', ) if context.get('state', False) == 'all': move_state = ('draft', 'posted', ) if context.get('period_id', False): period_id = context['period_id'] else: period_id = self.pool.get('account.period').find(cr,...
0cf8decf21693de75d6a8a48c5d13f6dc0fa5883 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cf8decf21693de75d6a8a48c5d13f6dc0fa5883/account.py
_order = 'code,name'
_order = 'code'
def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() default.update({'line_ids': []}) return super(account_tax_code, self).copy(cr, uid, id, default, context)
0cf8decf21693de75d6a8a48c5d13f6dc0fa5883 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cf8decf21693de75d6a8a48c5d13f6dc0fa5883/account.py
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')])
todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', '|', ('restart','=','always'), ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')])
def start(self, cr, uid, ids, context=None): todo_ids = self.pool.get('ir.actions.todo').search(cr, uid, ['|', ('state', '=', 'open'), '&', ('state', '=', 'skip'), ('restart', '=', 'onskip')]) if not todo_ids: # When there is no wizard todo it will display message data_obj = self.pool.get('ir.model.data') result = data...
4c1a9e61399655f34652dea50ee46a5bd5b5e6e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4c1a9e61399655f34652dea50ee46a5bd5b5e6e1/base_module_configuration.py
self.eval_context = {'ref': self._ref, '_ref': self._ref, 'time': time}
self.eval_context = {'ref': self._ref(), '_ref': self._ref(), 'time': time}
def __init__(self, cr, module, id_map, mode, filename, noupdate=False): self.cr = cr self.module = module self.id_map = id_map self.mode = mode self.filename = filename self.assert_report = TestReport() self.noupdate = noupdate self.logger = logging.getLogger("%s.%s" % (logger_channel, self.module)) self.pool = pooler....
f1b72c67438c626e33fd124307e4d540c40967cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1b72c67438c626e33fd124307e4d540c40967cd/yaml_import.py
if prodlot_id: move_obj.write(cr, uid, [move.id],{'prodlot_id': prodlot_id,})
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial picking and moves done. @param partial_datas : Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom @return: Dictionary of values """ if context is ...
d672ae367f522aaa216aee2ee41d022ec54065f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d672ae367f522aaa216aee2ee41d022ec54065f3/stock.py
self.write(cr, uid, ids, {'state': 'done', 'date': time.strftime('%Y-%m-%d %H:%M:%S')})
prodlot_id = partial_datas.get('move%s_prodlot_id'%(move.id), False) if prodlot_id: self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}) self.write(cr, uid, ids, {'state': 'done', 'date': time.strftime('%Y-%m-%d %H:%M:%S')})
def action_done(self, cr, uid, ids, context=None): """ Makes the move done and if all moves are done, it will finish the picking. @return: """ track_flag = False picking_ids = [] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.prod...
d672ae367f522aaa216aee2ee41d022ec54065f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d672ae367f522aaa216aee2ee41d022ec54065f3/stock.py
self.date_lst = []
def __init__(self, cr, uid, name, context=None): if context is None: context = {} super(partner_balance, self).__init__(cr, uid, name, context=context) self.date_lst = [] self.account_ids = [] self.localcontext.update( { 'time': time, 'lines': self.lines, 'sum_debit': self._sum_debit, 'sum_credit': self._sum_credit, 's...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result = '' if form.has_key('periods') and form['periods']: period_ids = form['periods'] per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods']) for r in per_ids: if r == per_ids[len(per_ids)-1]: result+=r.name+". " else: result+=r.name+", " else: fy_obj = self.pool.get('account.fiscalyear'...
result = '' if form.has_key('periods') and form['periods']: period_ids = form['periods'] per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods']) for r in per_ids: if r == per_ids[len(per_ids)-1]: result+=r.name+". " else: result+=r.name+", "
def get_periods(self, form): result = '' if form.has_key('periods') and form['periods']: period_ids = form['periods'] per_ids = self.pool.get('account.period').browse(self.cr, self.uid, form['periods']) for r in per_ids: if r == per_ids[len(per_ids)-1]: result+=r.name+". " else: result+=r.name+", " else: fy_obj = self....
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
periods_id = data['form']['periods'] date_array = [] for period_id in periods_id: period_obj = self.pool.get('account.period').browse(self.cr, self.uid, period_id) date_array = date_array + self.date_range(period_obj.date_start, period_obj.date_stop) self.date_lst = date_array self.date_lst.sort() def transform_date_i...
fy_obj = self.pool.get('account.fiscalyear').browse(self.cr, self.uid, form['fiscalyear']) res = fy_obj.period_ids len_res = len(res) for r in res: if r == res[len_res-1]: result += r.name + ". " else: result += r.name + ", " return str(result and result[:-1]) or 'ALL'
def transform_period_into_date_array(self, data): ## Get All Period Date # # If we have no period we will take all perdio in the FiscalYear. if not data['form']['periods']: periods_id = self.pool.get('account.period').search(self.cr, self.uid, [('fiscalyear_id','=',data['form']['fiscalyear'])]) else: periods_id = data...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if type(amount) is float :
if type(amount) is float :
def comma_me(self, amount): if type(amount) is float : amount = str('%.2f'%amount) else : amount = str(amount) if (amount == '0'): return ' ' orig = amount new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount) if orig == new: return new else: return self.comma_me(new)
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.transform_period_into_date_array(data)
def set_context(self, objects, data, ids, report_type=None): # Transformation des date # # if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.tran...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
def set_context(self, objects, data, ids, report_type=None): # Transformation des date # # if data['form']['filter'] == 'filter_no': self.transform_none_into_date_array(data) elif data['form']['filter'] == 'filter_date': self.transform_date_into_date_array(data) elif data['form']['filter'] == 'filter_period': self.tran...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result_tmp = 0.0
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or 0.0)
self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + "" , (tuple(self.account_ids), )) temp_res = float(self.cr.fetchone()[0] or 0.0)
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result_tmp = result_tmp + temp_res return result_tmp
return temp_res
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result_tmp = 0.0
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] or 0.0)
self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + "" , (tuple(self.account_ids),)) temp_res = float(self.cr.fetchone()[0] or 0.0)
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result_tmp = result_tmp + temp_res return result_tmp
return temp_res
def _sum_credit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] o...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
result_tmp = 0.0
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if self.date_lst:
self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + " " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), )) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.initial_balance:
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
"WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.initial_balance: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s " \ "AND " + self....
"WHERE l.account_id IN %s " \ "AND l.blocked=TRUE "\ "AND " + self.init_query + "" , (tuple(self.account_ids), )) temp_res += float(self.cr.fetchone()[0] or 0.0) return temp_res
def _sum_litige(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit-credit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res ...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.partner_id", (tuple(self.account_ids), tuple(self.date_lst),)) a = self.cr.fetchone()[...
self.cr.execute( "SELECT CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + " " \ "GROUP BY l.partner_id", (tuple(self.account_ids),)) a = self.cr.fetchone()[0] if self.cr.fetchone() != None:...
def _sum_sdebit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) > sum(credit) " \ "THEN sum(debit) - sum(credit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.part...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.partner_id", (tuple(self.account_ids), tuple(self.date_lst),)) a = self.cr.fetchone()[...
self.cr.execute( "SELECT CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND " + self.query + " " \ "GROUP BY l.partner_id", (tuple(self.account_ids), )) a = self.cr.fetchone()[0] or 0.0 if self.cr.fetchone() !...
def _sum_scredit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 a = 0.0 if self.date_lst: self.cr.execute( "SELECT CASE WHEN sum(debit) < sum(credit) " \ "THEN sum(credit) - sum(debit) " \ "ELSE 0 " \ "END " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s " \ "GROUP BY l.par...
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
if data['form']['result_selection']=='customer':
if data['form']['result_selection'] == 'customer':
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
elif data['form']['result_selection']=='supplier':
elif data['form']['result_selection'] == 'supplier':
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
elif data['form']['result_selection']=='customer_supplier':
elif data['form']['result_selection'] == 'customer_supplier':
def _get_partners(self, data): if data['form']['result_selection']=='customer': return 'Receivable Accounts' elif data['form']['result_selection']=='supplier': return 'Payable Accounts' elif data['form']['result_selection']=='customer_supplier': return 'Receivable and Payable Accounts' return ''
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
(qu1, qu2, tables) = self._where_calc(cr, user, args, context=context)
(where_clause, where_clause_params, tables) = self._where_calc(cr, user, args, context=context)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
qu1 = qu1 + dom[0] qu2 = qu2 + dom[1]
where_clause += dom[0] where_clause_params += dom[1]
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
where = qu1
where = where_clause
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
qu1_join = []
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
table_join,qu1_join = self._inherits_join_calc(o,[],[]) order_by = table_join[0] + '.' + order tables += table_join
inherited_tables, inherit_join = self._inherits_join_calc(o,[],[]) inherited_sort_table = inherited_tables[0] order_by = inherited_sort_table + '.' + order if inherited_sort_table not in tables: self._inherits_join_calc(o, tables, where_clause)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
where.extend(qu1_join)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
','.join(tables) + where_str + limit_str + offset_str, qu2)
','.join(tables) + where_str + limit_str + offset_str, where_clause_params)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
cr.execute('select %s.id from ' % self._table + ','.join(tables) + where_str +' order by '+order_by+limit_str+offset_str, qu2)
cr.execute('select %s.id from ' % self._table + ','.join(tables) + where_str +' order by '+order_by+limit_str+offset_str, where_clause_params)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
497518057d83648e49b98dd33b74213ed3fb31f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/497518057d83648e49b98dd33b74213ed3fb31f4/orm.py
result['name'] += ':' + self.pool.get('account.period').read(cr, uid, [data['period_id']], context=context)[0]['code']
period_code = period_obj.read(cr, uid, [data['period_id']], context=context)[0]['code'] result['name'] += period_code and (':' + period_code) or ''
def account_tax_chart_open_window(self, cr, uid, ids, context=None): """ Opens chart of Accounts @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of account chart’s IDs @return: dictionary of Open account chart window on given fiscalyear and a...
d49ef5795e0c3e6fc925c0887750b1d8be5150d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d49ef5795e0c3e6fc925c0887750b1d8be5150d9/account_tax_chart.py
res['value'].update({'purchase_price': purchase_price})
res['value'].update({'purchase_price': purchase_price * rate})
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty=...
69c31f245b86f2a9eee5c3f2bad9c1ab458210f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/69c31f245b86f2a9eee5c3f2bad9c1ab458210f8/sale_margin.py
for record in self.browse(cr, uid, ids): if record.state=='validate': holiday_id=self.pool.get('hr.holidays.per.user').search(cr, uid, [('employee_id','=', record.employee_id.id),('holiday_status','=',record.holiday_status.id)]) if holiday_id: obj_holidays_per_user=self.pool.get('hr.holidays.per.user').browse(cr, uid,h...
self._update_user_holidays(cr, uid, ids)
def holidays_cancel(self, cr, uid, ids, *args): for record in self.browse(cr, uid, ids): if record.state=='validate': holiday_id=self.pool.get('hr.holidays.per.user').search(cr, uid, [('employee_id','=', record.employee_id.id),('holiday_status','=',record.holiday_status.id)]) if holiday_id: obj_holidays_per_user=self.p...
89ff447c2ce6332778a7693ab0668387c03e7cf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/89ff447c2ce6332778a7693ab0668387c03e7cf0/hr.py
return COLLECTION
if uri2 and len(uri2) < 2: return uri2[-1] return ''
def _get_dav_displayname(self,uri): self.parent.log_message('get DN: %s' % uri) cr, uid, pool, dbname, uri2 = self.get_cr(uri) if not dbname: if cr: cr.close() return COLLECTION node = self.uri2object(cr, uid, pool, uri2) if not node: if cr: cr.close() raise DAV_NotFound2(uri2) cr.close() return node.displayname
2743ee0b97431df101efeab129eff8a952345b26 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2743ee0b97431df101efeab129eff8a952345b26/dav_fs.py
Return a connection string url needed by SQL Alchemy. Exemple: 'postgres://scott:tiger@localhost:5432/mydatabase' @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of connection’s IDs @param context: A standard dictionary for contextual values ...
Return a connection string url needed by SQL Alchemy. Exemple: 'postgres://scott:tiger@localhost:5432/mydatabase' @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of connection’s IDs @param context: A standard dictionary for contextual values
def _connection_get(self, cr, uid, ids, field_name, arg, context = {}): """ Return a connection string url needed by SQL Alchemy. Exemple: 'postgres://scott:tiger@localhost:5432/mydatabase' @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of c...
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def test_connection(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def test_connection(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" Return a Application type @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Detected Application’s IDs @param context: A standard dictionary for contextual values
""" Return a Application type @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Detected Application’s IDs @param context: A standard dictionary for contextual values
def _app_detect(self, cr, uid, ids, field_name, arg, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def action_dbconnect(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
"""
"""
def action_dbconnect(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def action_dbload(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def action_dbconfigure(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
@param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Database Configuraion Action’s IDs @param context: A standard dictionary for contextual values """
@param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Database Configuraion Action’s IDs @param context: A standard dictionary for contextual values """
def action_dbconfigure(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks,
"""Makes Database ready for query browsing @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks,
def action_dbready(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
@param context: A standard dictionary for contextual values """
@param context: A standard dictionary for contextual values """
def action_dbready(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks,
"""Makes schema as done @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks,
def action_done(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
@param context: A standard dictionary for contextual values """
@param context: A standard dictionary for contextual values """
def action_done(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
"""
"""Handles MDX request
def request(self, cr, uid, name, request, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def request(self, cr, uid, name, request, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" Database Tables """
"""Database Tables"""
def request(self, cr, uid, name, request, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def name_get(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" Open Tree View of Database Columns @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Column’s IDs @param context: A standard dictionary for contextual values """
"""Open Tree View of Database Columns @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Column’s IDs @param context: A standard dictionary for contextual values """
def show_col_view(self, cr, uid, ids, context = {}): """ Open Tree View of Database Columns @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Column’s IDs @param context: A standard dictionary for contextual values """
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" @param *args: For Positional Argument @param **args: For Keyword Argument """
""" @param *args: For Positional Argument @param **args: For Keyword Argument """
def _datatypes_get(self, *args, **argv):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
def name_get(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
if make_ids:
if make_ids and cube_obj.table_id.line_ids:
def search(self, cr, uid, args, offset = 0, limit = None, order = None, context = None, count = False):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Hide Column’s IDs @param context: A standard dictionary for contextual values """
"""Hides column @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Hide Column’s IDs @param context: A standard dictionary for contextual values """
def hide_col(self, cr, uid, ids, context = {}):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
""" @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Cube Table’s IDs @param context: A standard dictionary for contextual values """
""" @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Cube Table’s IDs @param context: A standard dictionary for contextual values """
def write(self, cr, uid, ids, vals, context = None):
1dc268e357fe6ce10746aa6f778e8fad1db095de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1dc268e357fe6ce10746aa6f778e8fad1db095de/olap.py
tasks = self.browse( cr, uid, ids[0])
task_id = ids if isinstance(ids, list): task_id = ids[0] tasks = self.browse(cr, uid, task_id, context=context)
def write(self, cr, uid, ids, vals, context=None):
fe8c833019c9b551bcb66ab3458e4e98b3118a0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fe8c833019c9b551bcb66ab3458e4e98b3118a0a/project.py
query += " AND " + d1
query += " AND " + (' OR '.join(d1))
def convert_field(f): if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isi...
9584b1b46826c262b6b4d5a584d7df21d2aa012a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9584b1b46826c262b6b4d5a584d7df21d2aa012a/orm.py
'price':i_line.product_id.product_tmpl_id.standard_price * i_line.quantity,
'price':get_price(cr, uid, inv, company_currency, i_line),
def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin...
01152d412373ef527cbc9fdfa88601c98d6c6e0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/01152d412373ef527cbc9fdfa88601c98d6c6e0f/invoice.py
'price': -1 * i_line.product_id.product_tmpl_id.standard_price * i_line.quantity,
'price': -1 * get_price(cr, uid, inv, company_currency, i_line),
def move_line_get(self, cr, uid, invoice_id, context=None): res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context) inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) if inv.type in ('out_invoice','out_refund'): for i_line in inv.invoice_line: if i_lin...
01152d412373ef527cbc9fdfa88601c98d6c6e0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/01152d412373ef527cbc9fdfa88601c98d6c6e0f/invoice.py
default = [] for f in self._columns.keys(): if not f in vals: default.append(f) if len(default): vals.update(self.default_get(cr, user, default, context))
defaults = self.default_get(cr, user, [], context) defaults.update(vals) vals = defaults
def create(self, cr, user, vals, context=None): self.vaccum(cr, user) self.next_id += 1 id_new = self.next_id default = [] for f in self._columns.keys(): if not f in vals: default.append(f) if len(default): vals.update(self.default_get(cr, user, default, context)) vals2 = {} upd_todo = [] for field in vals: if self._co...
0125777a078a9452307f189fbcf9d649a3b1f17e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0125777a078a9452307f189fbcf9d649a3b1f17e/orm.py
vals.update(default_values)
default_values.update(vals) vals = default_values
def create(self, cr, user, vals, context=None): """ Create new record with specified value
0125777a078a9452307f189fbcf9d649a3b1f17e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0125777a078a9452307f189fbcf9d649a3b1f17e/orm.py
(SELECT count(id) FROM mailgate_message WHERE model='crm.helpdesk' AND res_id=c.id AND history=True) AS email,
(SELECT count(id) FROM mailgate_message WHERE model='crm.claim' AND res_id=c.id AND history=True) AS email, (SELECT avg(probability) FROM crm_case_stage WHERE type='claim' AND id=c.stage_id) AS probability,
def init(self, cr):
d1aaeb22512d9ee730e706d950a0421c940f1169 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1aaeb22512d9ee730e706d950a0421c940f1169/crm_claim_report.py
if not new_journal.centralisation:
if (not new_journal.centralisation) or new_journal.entry_posted:
def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs
b42f8f310d896e52cd89b8ed0e2bd0b55d55be6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b42f8f310d896e52cd89b8ed0e2bd0b55d55be6f/account_fiscalyear_close.py
_('The journal must have centralised counterpart'))
_('The journal must have centralised counterpart without the Skipping draft state option checked!'))
def data_save(self, cr, uid, ids, context=None): """ This function close account fiscalyear and create entries in new fiscalyear @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Account fiscalyear close state’s IDs
b42f8f310d896e52cd89b8ed0e2bd0b55d55be6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b42f8f310d896e52cd89b8ed0e2bd0b55d55be6f/account_fiscalyear_close.py
result['name'] = res.name
result['name'] = res.partner_ref
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, context=None): if context is None: context = {} if not partner_id: raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partn...
4fc1c14b335ea4a267b3a7341cbb729a30a31188 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4fc1c14b335ea4a267b3a7341cbb729a30a31188/invoice.py
price_type.field)[prod_id], round=False)
price_type.field)[prod_id], round=False, context=context)
def price_get(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price=False item_id=0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.pool.get('...
ceab8bfaf3899b27124bf76efaecd819eca5ffb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ceab8bfaf3899b27124bf76efaecd819eca5ffb5/pricelist.py
'order_id': fields.many2one('sale.order', 'Order Ref', required=True, ondelete='cascade', select=True), 'name': fields.char('Description', size=256, required=True, select=True),
'order_id': fields.many2one('sale.order', 'Order Ref', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}), 'name': fields.char('Description', size=256, required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer"),
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, states={'draft':[('readonly',False)]}),
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'price_unit': fields.float('Unit Price', required=True, digits=(16, int(config['price_accuracy']))),
'price_unit': fields.float('Unit Price', required=True, digits=(16, int(config['price_accuracy'])), readonly=True, states={'draft':[('readonly',False)]}),
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes'), 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procure Method', required=True), 'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'prop...
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft':[('readonly',False)]}), 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procure Method', required=True, readonly=True, states={'draft':[('readonly',F...
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True), 'product_uos_qty': fields.float('Quantity (UoS)'),
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'product_uos_qty': fields.float('Quantity (UoS)', rea...
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'discount': fields.float('Discount (%)', digits=(16, 2)),
'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'th_weight': fields.float('Weight'),
'th_weight': fields.float('Weight', readonly=True, states={'draft':[('readonly',False)]}),
def _number_packages(self, cr, uid, ids, field_name, arg, context): res = {} for line in self.browse(cr, uid, ids): try: res[line.id] = int(line.product_uom_qty / line.product_packaging.qty) except: res[line.id] = 1 return res
0c14c9360c0731b67edd4ebe138d05ad99914958 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0c14c9360c0731b67edd4ebe138d05ad99914958/sale.py
'move_created_ids': [], 'state': 'draft'
'move_lines2' : [], 'move_created_ids' : [], 'move_created_ids2' : [], 'product_lines' : [], 'state': 'draft', 'picking_id': False
def copy(self, cr, uid, id, default=None,context=None): if not default: default = {} default.update({ 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'), 'move_lines' : [], 'move_created_ids': [], 'state': 'draft' }) return super(mrp_production, self).copy(cr, uid, id, default, context)
bb5d7cf5725bb6642838fc70717cbdc8b540588c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/bb5d7cf5725bb6642838fc70717cbdc8b540588c/mrp.py
res[int(prop.res_id.split(',')[1])] = prop.value or ''
res[int(prop.res_id.id)] = prop.value or ''
def _fnct_read(self, obj, cr, uid, ids, prop, val, context=None): if not context: context = {} property = obj.pool.get('ir.property') definition_id = self._field_get(cr, uid, obj._name, prop)
4686b2f5a7e0f3e03fa55a6a62e7917b607b4f8f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4686b2f5a7e0f3e03fa55a6a62e7917b607b4f8f/fields.py
where.append((self.namefield,'=',name))
where.append((self.namefield,'=like',name.replace('\\','\\\\')))
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object.
a726297a51ac679dd708541bcb8d2a57ac0db650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a726297a51ac679dd708541bcb8d2a57ac0db650/nodes.py
name = getattr(bo, self.namefield) if not name:
res_name = getattr(bo, self.namefield) if not res_name:
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object.
a726297a51ac679dd708541bcb8d2a57ac0db650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a726297a51ac679dd708541bcb8d2a57ac0db650/nodes.py
res.append(self.res_obj_class(name, self.dir_id, self, self.context, self.res_model, bo))
res_name = res_name.replace('/','_') if name and (res_name != name): continue res.append(self.res_obj_class(res_name, self.dir_id, self, self.context, self.res_model, bo))
def _child_get(self, cr, name = None, domain=None): """ return virtual children of resource, based on the foreign object.
a726297a51ac679dd708541bcb8d2a57ac0db650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a726297a51ac679dd708541bcb8d2a57ac0db650/nodes.py
where1 = where + [(obj._parent_name, '=', self.res_id)]
where1.append((obj._parent_name, '=', self.res_id))
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj
a726297a51ac679dd708541bcb8d2a57ac0db650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a726297a51ac679dd708541bcb8d2a57ac0db650/nodes.py
stock_picking_make('stock.picking.make')
def default_get(self, cursor, user, fields, context): """ To get default values for the object. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for which we want default values @param context: A standard dictionary @return: A dic...
def _make_packing(obj, cursor, user, data, context): wkf_service = netsvc.LocalService('workflow') pool = pooler.get_pool(cursor.dbname) picking_obj = pool.get('stock.picking') ids = data['form']['pickings'][0][2] print"-------ids--------",ids picking_obj.force_assign(cursor, user, ids) picking_obj.action_move(cursor, ...
a8d3545d7833825d67956cc7bf7e94dc7626a78e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a8d3545d7833825d67956cc7bf7e94dc7626a78e/stock_picking_make.py
def _make_packing(obj, cursor, user, data, context): wkf_service = netsvc.LocalService('workflow') pool = pooler.get_pool(cursor.dbname) picking_obj = pool.get('stock.picking') ids = data['form']['pickings'][0][2] print"-------ids--------",ids picking_obj.force_assign(cursor, user, ids) picking_obj.action_move(cursor, ...
a8d3545d7833825d67956cc7bf7e94dc7626a78e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a8d3545d7833825d67956cc7bf7e94dc7626a78e/stock_picking_make.py
vals_journal['type'] = 'cash'
vals_journal['type'] = 'bank'
def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_posi...
9fe138bd230f69377b4f13f9ddfbedca05537dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9fe138bd230f69377b4f13f9ddfbedca05537dd5/installer.py
def format_body(self, body): return body and tools.ustr(body.encode('ascii', 'replace')) or ''
def format_body(self, body): return body and tools.ustr(body) or ''
def format_body(self, body): return body and tools.ustr(body.encode('ascii', 'replace')) or ''
eeff1edbcb7c53f8f8f4d79bcd3d3694615f3e72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/eeff1edbcb7c53f8f8f4d79bcd3d3694615f3e72/crm.py
orig = value
def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod...
59fdce2fe29d36bdac17c07d51dc2861a3acf4f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/59fdce2fe29d36bdac17c07d51dc2861a3acf4f9/misc.py
raise UnicodeError('unable de to convert %r' % (orig,))
raise UnicodeError('unable de to convert %r' % (value,))
def ustr(value, hint_encoding='utf-8'): """This method is similar to the builtin `str` method, except it will return unicode() string. @param value: the value to convert @param hint_encoding: an optional encoding that was detected upstream and should be tried first to decode ``value``. @rtype: unicode @return: unicod...
59fdce2fe29d36bdac17c07d51dc2861a3acf4f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/59fdce2fe29d36bdac17c07d51dc2861a3acf4f9/misc.py
params = (lang or '', types, source)
params = (lang or '', types, tools.ustr(source))
def _get_source(self, cr, uid, name, types, lang, source=None): """ Returns the translation for the given combination of name, type, language and source. All values passed to this method should be unicode (not byte strings), especially ``source``.
cb93fbf97bc5eb562da02bc0aeb9dad4fb0b9929 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cb93fbf97bc5eb562da02bc0aeb9dad4fb0b9929/ir_translation.py