[MERGE] Merge from same branch
bzr revid: psi@tinyerp.co.in-20101006112406-8u6c0kmr1qt4znle
This commit is contained in:
commit
5853f1d155
|
@ -55,6 +55,7 @@ class account_bank_statement(osv.osv):
|
|||
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'statement_id': ids[0]})
|
||||
|
||||
return {
|
||||
'name': _('Import Invoice'),
|
||||
'context': context,
|
||||
|
@ -242,6 +243,7 @@ class account_bank_statement(osv.osv):
|
|||
account_id = st.journal_id.default_credit_account_id.id
|
||||
else:
|
||||
account_id = st.journal_id.default_debit_account_id.id
|
||||
|
||||
acc_cur = ((st_line.amount<=0) and st.journal_id.default_debit_account_id) or st_line.account_id
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, st_line.amount, context=context,
|
||||
|
|
|
@ -143,6 +143,7 @@ class account_cash_statement(osv.osv):
|
|||
res[statement.id] -= res_currency_obj.compute(cursor,
|
||||
user, company_currency_id, currency_id,
|
||||
line.credit, context=context)
|
||||
|
||||
if statement.state in ('draft', 'open'):
|
||||
for line in statement.line_ids:
|
||||
res[statement.id] += line.amount
|
||||
|
@ -383,7 +384,7 @@ class account_cash_statement(osv.osv):
|
|||
for end in st.ending_details_ids:
|
||||
cash_box_line_pool.write(cr, uid, [end.id], {'number':0})
|
||||
return True
|
||||
|
||||
|
||||
account_cash_statement()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -463,6 +463,7 @@ class account_voucher(osv.osv):
|
|||
default['value']['pre_line'] = 1
|
||||
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
|
||||
return default
|
||||
|
||||
def onchange_date(self, cr, user, ids, date, context={}):
|
||||
|
@ -683,6 +684,7 @@ class account_voucher(osv.osv):
|
|||
move_line.update({
|
||||
'account_tax_id':inv.tax_id.id,
|
||||
})
|
||||
|
||||
master_line = move_line_pool.create(cr, uid, move_line)
|
||||
if line.move_line_id.id:
|
||||
rec_ids = [master_line, line.move_line_id.id]
|
||||
|
@ -706,6 +708,7 @@ class account_voucher(osv.osv):
|
|||
else:
|
||||
account_id = inv.partner_id.property_account_payable.id
|
||||
move_line['account_id'] = account_id
|
||||
|
||||
move_line_id = move_line_pool.create(cr, uid, move_line)
|
||||
|
||||
self.write(cr, uid, [inv.id], {
|
||||
|
@ -871,6 +874,7 @@ class account_bank_statement(osv.osv):
|
|||
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:
|
||||
voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
|
||||
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
|
||||
|
|
|
@ -171,6 +171,7 @@ class account_statement_from_invoice(osv.osv_memory):
|
|||
|
||||
line_ids = line_obj.search(cr, uid, args,
|
||||
context=context)
|
||||
|
||||
model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice_lines')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<form string="Import Entries">
|
||||
<group colspan="4" expand="1">
|
||||
<separator string="Payable and Receivables" colspan="4"/>
|
||||
<field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']), ('reconcile_id','=',False), ('reconcile_partial_id','=',False)]"/>
|
||||
<field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False)]"/>
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_account_statement_from_invoice_lines" model="ir.actions.act_window">
|
||||
<field name="name">Import Entries</field>
|
||||
<field name="res_model">account.statement.from.invoice.lines</field>
|
||||
|
|
Loading…
Reference in New Issue