[MERGE] merged from trunk-dev-addons1
bzr revid: hmo@tinyerp.com-20100927141401-ov7seha9wbavzy7j
This commit is contained in:
commit
0b3dab94db
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import pooler
|
||||
import time
|
||||
from report import report_sxw
|
||||
|
||||
|
@ -43,7 +42,6 @@ class account_analytic_balance(report_sxw.rml_parse):
|
|||
self.acc_sum_list = []# maintains a list of all ids
|
||||
|
||||
def get_children(self, ids):
|
||||
ids2 = []
|
||||
read_data = self.pool.get('account.analytic.account').read(self.cr, self.uid, ids,['child_ids','code','complete_name','balance'])
|
||||
for data in read_data:
|
||||
if (data['id'] not in self.acc_ids):
|
||||
|
@ -54,7 +52,7 @@ class account_analytic_balance(report_sxw.rml_parse):
|
|||
self.acc_ids.append(data['id'])
|
||||
self.read_data.append(data)
|
||||
if data['child_ids']:
|
||||
res = self.get_children(data['child_ids'])
|
||||
self.get_children(data['child_ids'])
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
@ -646,7 +646,6 @@ class auction_lots(osv.osv):
|
|||
if not context:
|
||||
context={}
|
||||
inv_ref=self.pool.get('account.invoice')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
inv_line_obj = self.pool.get('account.invoice.line')
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
for lot in self.browse(cr, uid, ids, context):
|
||||
|
@ -655,7 +654,6 @@ class auction_lots(osv.osv):
|
|||
if lot.bord_vnd_id.id in invoices:
|
||||
inv_id = invoices[lot.bord_vnd_id.id]
|
||||
else:
|
||||
res = partner_obj.address_get(cr, uid, [lot.bord_vnd_id.partner_id.id], ['contact', 'invoice'])
|
||||
inv = {
|
||||
'name': 'Auction:' +lot.name,
|
||||
'journal_id': lot.auction_id.journal_seller_id.id,
|
||||
|
|
|
@ -24,7 +24,7 @@ from report import report_sxw
|
|||
|
||||
|
||||
class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
|
||||
|
||||
#TOFIX: sql injection problem: SQL Request must be pass from sql injection...
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(all_closed_cashbox_of_the_day, self).__init__(cr, uid, name, context)
|
||||
self.localcontext.update({
|
||||
|
@ -91,13 +91,13 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
|
|||
return False
|
||||
def _get_partner(self,statement):
|
||||
res = {}
|
||||
sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp
|
||||
where absl.partner_id = rp.id
|
||||
and absl.pos_statement_id = %d"""%(statement['pos_statement_id'])
|
||||
self.cr.execute(sql)
|
||||
res = self.cr.dictfetchall()
|
||||
if res :
|
||||
return res[0]['name']
|
||||
if statement['pos_statement_id']:
|
||||
sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp
|
||||
where absl.partner_id = rp.id
|
||||
and absl.pos_statement_id = %d"""%(statement['pos_statement_id'])
|
||||
self.cr.execute(sql)
|
||||
res = self.cr.dictfetchall() or {}
|
||||
return res and res[0]['name']
|
||||
else :
|
||||
return 0.00
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@
|
|||
-
|
||||
I run the scheduler.
|
||||
-
|
||||
!workflow {model: procurement.order, action: button_check, ref: procurement_order_testcase0}
|
||||
!function {model: procurement.order, name: run_scheduler}:
|
||||
- model: procurement.order
|
||||
search: "[]"
|
||||
-
|
||||
I check that purchase order is generated.
|
||||
-
|
||||
|
@ -81,14 +83,14 @@
|
|||
!python {model: stock.picking }: |
|
||||
import time
|
||||
procurement_obj = self.pool.get('procurement.order')
|
||||
proc_ids = procurement_obj.browse(cr, uid, [ref('procurement_order_testcase0')])[0]
|
||||
picking_id = self.search(cr, uid, [('origin', '=', proc_ids.purchase_id.name)])
|
||||
if picking_id:
|
||||
pick=self.browse(cr,uid,picking_id[0])
|
||||
move =pick.move_lines[0]
|
||||
proc_ids = procurement_obj.browse(cr, uid, [ref('procurement_order_testcase0')])[0]
|
||||
picking_ids = self.search(cr, uid, [('purchase_id', '=', proc_ids.purchase_id.id),('type','=','in')])
|
||||
pickings = self.browse(cr, uid, picking_ids)
|
||||
for picking in pickings:
|
||||
move = picking.move_lines[0]
|
||||
partial_datas = {
|
||||
'partner_id':pick.address_id.partner_id.id,
|
||||
'address_id': pick.address_id.id,
|
||||
'partner_id': picking.address_id.partner_id.id,
|
||||
'address_id': picking.address_id.id,
|
||||
'delivery_date' : time.strftime('%Y-%m-%d')
|
||||
}
|
||||
partial_datas['move%s'%(move.id)]= {
|
||||
|
@ -96,7 +98,7 @@
|
|||
'product_qty': move.product_qty,
|
||||
'product_uom': move.product_uom.id,
|
||||
}
|
||||
self.do_partial(cr, uid, picking_id,partial_datas)
|
||||
self.do_partial(cr, uid, [picking.id], partial_datas)
|
||||
-
|
||||
I confirm the Reservation.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue