[IMP]: mprovement in account and accounting vouchers
bzr revid: mga@tinyerp.com-20100527195540-2u8uc6prl0gex4z1
This commit is contained in:
parent
3106a1bd5b
commit
6c94919a9d
|
@ -559,7 +559,7 @@ class account_journal(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Journal Name', size=64, required=True, translate=True),
|
||||
'code': fields.char('Code', size=16),
|
||||
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('cash', 'Cash'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expanse', 'Expanse'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
|
||||
help="Select 'Sale' for Sale journal to be used at the time of making invoice."\
|
||||
" Select 'Purchase' for Purchase Journal to be used at the time of approving purchase order."\
|
||||
" Select 'Cash' to be used at the time of making payment."\
|
||||
|
@ -927,7 +927,7 @@ class account_move(osv.osv):
|
|||
('journal_sale_vou','Journal Sale'),
|
||||
('journal_pur_voucher','Journal Purchase'),
|
||||
('journal_voucher','Journal Voucher'),
|
||||
],'Type', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'narration':fields.text('Narration', readonly=True, select=True, states={'draft':[('readonly',False)]}),
|
||||
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company',store=True),
|
||||
}
|
||||
|
|
|
@ -135,8 +135,10 @@
|
|||
<field name="check_history"/>
|
||||
<field name="type" select="1"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="tax_ids" domain="[('parent_id','=',False)]"/>
|
||||
<field name="child_consol_ids" colspan="4" attrs="{'readonly':[('type','!=','consolidation')]}"/>
|
||||
<separator string="Default Taxes" colspan="4"/>
|
||||
<field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
|
||||
<separator string="Consolidated Children" colspan="4"/>
|
||||
<field name="child_consol_ids" colspan="4" nolabel="1" attrs="{'readonly':[('type','!=','consolidation')]}"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
|
@ -146,7 +148,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_search" model="ir.ui.view">
|
||||
<record id="view_account_search" model="ir.ui.view">
|
||||
<field name="name">account.account.search</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="type">search</field>
|
||||
|
@ -1116,8 +1118,8 @@
|
|||
|
||||
<!-- bank reconsilation -->
|
||||
<menuitem action="action_account_bank_reconcile_tree"
|
||||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="account.next_id_30" />
|
||||
id="menu_action_account_bank_reconcile_check_tree"
|
||||
parent="account.next_id_30" />
|
||||
|
||||
|
||||
<act_window
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
|
||||
import time
|
||||
import netsvc
|
||||
from osv import fields, osv
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
import ir
|
||||
import pooler
|
||||
import mx.DateTime
|
||||
|
@ -30,13 +31,13 @@ from tools import config
|
|||
|
||||
type2journal = {
|
||||
'rec_voucher': 'cash',
|
||||
'bank_rec_voucher': 'cash',
|
||||
'bank_rec_voucher': 'bank',
|
||||
'pay_voucher': 'cash',
|
||||
'bank_pay_voucher': 'cash',
|
||||
'bank_pay_voucher': 'bank',
|
||||
'cont_voucher': 'cash',
|
||||
'journal_sale_vou': 'sale',
|
||||
'journal_pur_voucher': 'purchase',
|
||||
'journal_voucher':'expanse'
|
||||
'journal_voucher':'general'
|
||||
}
|
||||
|
||||
class ir_sequence_type(osv.osv):
|
||||
|
@ -56,7 +57,10 @@ account_journal()
|
|||
|
||||
class account_voucher(osv.osv):
|
||||
|
||||
def _get_period(self, cr, uid, context):
|
||||
def _get_period(self, cr, uid, context={}):
|
||||
if context.get('period_id', False):
|
||||
return context.get('period_id')
|
||||
|
||||
periods = self.pool.get('account.period').find(cr, uid)
|
||||
if periods:
|
||||
return periods[0]
|
||||
|
@ -107,7 +111,7 @@ class account_voucher(osv.osv):
|
|||
('journal_sale_vou','Journal Sale'),
|
||||
('journal_pur_voucher','Journal Purchase'),
|
||||
('journal_voucher','Journal Voucher'),
|
||||
],'Type', readonly=True, select=True , size=128),
|
||||
],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]),
|
||||
|
@ -139,43 +143,60 @@ class account_voucher(osv.osv):
|
|||
}
|
||||
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'date' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'period_id': _get_period,
|
||||
'type': _get_type,
|
||||
'reference_type': lambda *a: 'none',
|
||||
'journal_id':_get_journal,
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher', context=c),
|
||||
'currency_id': _get_currency,
|
||||
|
||||
'state': lambda *a: 'draft',
|
||||
'date' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'reference_type': lambda *a: "none",
|
||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
|
||||
}
|
||||
|
||||
def _get_analityc_lines(self, cr, uid, id):
|
||||
inv = self.browse(cr, uid, [id])[0]
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
# def _get_analityc_lines(self, cr, uid, id):
|
||||
# inv = self.browse(cr, uid, [id])[0]
|
||||
# cur_obj = self.pool.get('res.currency')
|
||||
|
||||
def onchange_account(self, cr, uid, ids, account_id):
|
||||
|
||||
if not account_id:
|
||||
return {'value':{'amount':False}}
|
||||
account = self.pool.get('account.account').browse(cr,uid,account_id)
|
||||
return {
|
||||
'value':{'amount':False}
|
||||
}
|
||||
|
||||
account = self.pool.get('account.account').browse(cr, uid, account_id)
|
||||
balance=account.balance
|
||||
return {'value':{'amount':balance}}
|
||||
return {
|
||||
'value':{'amount':balance}
|
||||
}
|
||||
|
||||
def onchange_journal(self, cr, uid, ids, journal_id, type):
|
||||
if not journal_id:
|
||||
return {'value':{'account_id':False}}
|
||||
return {
|
||||
'value':{'account_id':False}
|
||||
}
|
||||
|
||||
journal = self.pool.get('account.journal')
|
||||
|
||||
if journal_id and (type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher')):
|
||||
account_id = journal.browse(cr, uid, journal_id).default_debit_account_id
|
||||
return {'value':{'account_id':account_id.id}}
|
||||
return {
|
||||
'value':{'account_id':account_id.id}
|
||||
}
|
||||
elif journal_id and (type in ('pay_voucher','bank_pay_voucher','journal_sale_vou')) :
|
||||
account_id = journal.browse(cr, uid, journal_id).default_credit_account_id
|
||||
return {'value':{'account_id':account_id.id}}
|
||||
return {
|
||||
'value':{'account_id':account_id.id}
|
||||
}
|
||||
else:
|
||||
account_id = journal.browse(cr, uid, journal_id).default_credit_account_id
|
||||
return {'value':{'account_id':account_id.id}}
|
||||
return {
|
||||
'value':{'account_id':account_id.id}
|
||||
}
|
||||
|
||||
def open_voucher(self, cr, uid, ids, context={}):
|
||||
obj = self.pool.get('account.voucher').browse(cr,uid,ids)
|
||||
obj = self.pool.get('account.voucher').browse(cr, uid, ids)
|
||||
total = 0
|
||||
for i in obj[0].payment_ids:
|
||||
total += i.amount
|
||||
|
@ -208,8 +229,7 @@ class account_voucher(osv.osv):
|
|||
unlink_ids.append(t['id'])
|
||||
else:
|
||||
raise osv.except_osv('Invalid action !', 'Cannot delete Voucher(s) which are already opened or paid !')
|
||||
osv.osv.unlink(self, cr, uid, unlink_ids)
|
||||
return True
|
||||
return super(account_voucher, self).unlink(self, cr, uid, unlink_ids)
|
||||
|
||||
def _get_analytic_lines(self, cr, uid, id):
|
||||
inv = self.browse(cr, uid, [id])[0]
|
||||
|
@ -242,9 +262,12 @@ class account_voucher(osv.osv):
|
|||
return iml
|
||||
|
||||
def action_move_line_create(self, cr, uid, ids, *args):
|
||||
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
||||
company_currency = inv.company_id.currency_id.id
|
||||
|
||||
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
|
||||
|
@ -312,7 +335,8 @@ class account_voucher(osv.osv):
|
|||
'name' : name,
|
||||
'journal_id': journal_id,
|
||||
'type' : inv.type,
|
||||
'narration' : inv.narration
|
||||
'narration' : inv.narration,
|
||||
'date':inv.date
|
||||
}
|
||||
if inv.period_id:
|
||||
move['period_id'] = inv.period_id.id
|
||||
|
@ -362,13 +386,14 @@ class account_voucher(osv.osv):
|
|||
elif line.type == 'cr':
|
||||
move_line['credit'] = line.amount or False
|
||||
amount=line.amount * (-1)
|
||||
|
||||
|
||||
move_line['analytic_account_id'] = line.account_analytic_id.id or False
|
||||
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
|
||||
|
||||
if inv.narration:
|
||||
line.name=inv.narration
|
||||
line.name = inv.narration
|
||||
else:
|
||||
line.name=line.name
|
||||
line.name = line.name
|
||||
|
||||
if line.account_analytic_id:
|
||||
an_line = {
|
||||
|
@ -393,7 +418,6 @@ class account_voucher(osv.osv):
|
|||
|
||||
|
||||
def line_get_convert(self, cr, uid, x, date, context={}):
|
||||
|
||||
return {
|
||||
'date':date,
|
||||
'date_maturity': x.get('date_maturity', False),
|
||||
|
@ -409,6 +433,7 @@ class account_voucher(osv.osv):
|
|||
'tax_amount': x.get('tax_amount', False),
|
||||
'ref':x.get('ref',False)
|
||||
}
|
||||
|
||||
def _convert_ref(self, cr, uid, ref):
|
||||
return (ref or '').replace('/','')
|
||||
|
||||
|
@ -547,7 +572,6 @@ class account_voucher_line(osv.osv):
|
|||
if not amount:
|
||||
return {'value' : {}}
|
||||
if partner_id:
|
||||
|
||||
obj = self.pool.get('res.partner')
|
||||
if type1 in ('rec_voucher', 'bank_rec_voucher', 'journal_voucher'):
|
||||
if amount < 0 :
|
||||
|
@ -583,34 +607,23 @@ class account_voucher_line(osv.osv):
|
|||
else:
|
||||
if type1 in ('rec_voucher', 'bank_rec_voucher', 'journal_voucher'):
|
||||
if amount < 0 :
|
||||
|
||||
type = 'dr'
|
||||
else:
|
||||
|
||||
type = 'cr'
|
||||
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
if amount < 0 :
|
||||
|
||||
type = 'cr'
|
||||
else:
|
||||
|
||||
type = 'dr'
|
||||
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
if amount < 0 :
|
||||
|
||||
type = 'cr'
|
||||
else:
|
||||
|
||||
type = 'dr'
|
||||
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
if amount< 0 :
|
||||
|
||||
type = 'dr'
|
||||
else:
|
||||
|
||||
type = 'cr'
|
||||
|
||||
return {
|
||||
|
@ -619,9 +632,7 @@ class account_voucher_line(osv.osv):
|
|||
|
||||
def onchange_type(self, cr, uid, ids,partner_id,amount,type,type1):
|
||||
if partner_id:
|
||||
|
||||
obj = self.pool.get('res.partner')
|
||||
|
||||
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
|
||||
if type == 'dr' :
|
||||
account_id = obj.browse(cr, uid, partner_id).property_account_payable
|
||||
|
@ -645,7 +656,6 @@ class account_voucher_line(osv.osv):
|
|||
else:
|
||||
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
|
||||
total=amount*(-1)
|
||||
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
if type == 'dr' :
|
||||
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
|
||||
|
@ -656,34 +666,25 @@ class account_voucher_line(osv.osv):
|
|||
else:
|
||||
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
|
||||
if type == 'dr' :
|
||||
|
||||
total=amount*(-1)
|
||||
else:
|
||||
|
||||
total=amount*(-1)
|
||||
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
if type == 'cr' :
|
||||
|
||||
total=amount*(-1)
|
||||
else:
|
||||
|
||||
total=amount*(-1)
|
||||
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
if type == 'cr' :
|
||||
|
||||
total=amount*(-1)
|
||||
else:
|
||||
|
||||
total=amount*(-1)
|
||||
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
if type == 'dr' :
|
||||
|
||||
total=amount*(-1)
|
||||
else:
|
||||
|
||||
total=amount*(-1)
|
||||
|
||||
return {
|
||||
|
@ -702,9 +703,3 @@ class account_voucher_line(osv.osv):
|
|||
}
|
||||
|
||||
account_voucher_line()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,110 +1,90 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="res.request.link" id="req_link_voucher">
|
||||
<field name="name">Voucher</field>
|
||||
<field name="object">account.voucher</field>
|
||||
</record>
|
||||
<!--
|
||||
Sequences types for vouchers
|
||||
-->
|
||||
<record model="ir.sequence.type" id="seq_type_cash_rec_voucher">
|
||||
<field name="name">Cash Receipt</field>
|
||||
<field name="code">rec_voucher</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_cash_pay_voucher">
|
||||
<field name="name">Cash Payment</field>
|
||||
<field name="code">pay_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bank_rec_voucher">
|
||||
<field name="name">Bank Receipt</field>
|
||||
<field name="code">bank_rec_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bank_pay_voucher">
|
||||
<field name="name">Bank Payment</field>
|
||||
<field name="code">bank_pay_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_contra_voucher">
|
||||
<field name="name">Contra Entry</field>
|
||||
<field name="code">cont_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_jou_sale_voucher">
|
||||
<field name="name">Sales Entry</field>
|
||||
<field name="code">journal_sale_vou</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_jou_pur_voucher">
|
||||
<field name="name">Purchase Entry</field>
|
||||
<field name="code">journal_pur_vou</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences for vouchers
|
||||
-->
|
||||
<record model="ir.sequence" id="seq_cash_rec_voucher">
|
||||
<field name="name">Cash Receipt</field>
|
||||
<field name="code">rec_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence" id="seq_cash_pay_voucher">
|
||||
<field name="name">Cash Payment</field>
|
||||
<field name="code">pay_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_bank_rec_voucher">
|
||||
<field name="name">Bank Receipt</field>
|
||||
<field name="code">bank_rec_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_bank_pay_voucher">
|
||||
<field name="name">Bank Payment</field>
|
||||
<field name="code">bank_pay_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_contra_voucher">
|
||||
<field name="name">Contra Entry</field>
|
||||
<field name="code">cont_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_jou_sale_voucher">
|
||||
<field name="name">Sales Entry</field>
|
||||
<field name="code">journal_sale_vou</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_jou_pur_voucher">
|
||||
<field name="name">Purchase Entry</field>
|
||||
<field name="code">journal_pur_vou</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
|
||||
<data noupdate="1">
|
||||
<record model="res.request.link" id="req_link_voucher">
|
||||
<field name="name">Voucher</field>
|
||||
<field name="object">account.voucher</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences types for vouchers
|
||||
-->
|
||||
<record model="ir.sequence.type" id="seq_type_cash_rec_voucher">
|
||||
<field name="name">Account Cash Received Voucher</field>
|
||||
<field name="code">rec_voucher</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_cash_pay_voucher">
|
||||
<field name="name">Account Cash Payble Voucher</field>
|
||||
<field name="code">pay_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bank_rec_voucher">
|
||||
<field name="name">Account Bank Received Voucher</field>
|
||||
<field name="code">bank_rec_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bank_pay_voucher">
|
||||
<field name="name">Account Bank Payble Voucher</field>
|
||||
<field name="code">bank_pay_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_contra_voucher">
|
||||
<field name="name">Account Contra Voucher</field>
|
||||
<field name="code">cont_voucher</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_jou_sale_voucher">
|
||||
<field name="name">Account Journal Voucher</field>
|
||||
<field name="code">journal_sale_vou</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_jou_pur_voucher">
|
||||
<field name="name">Account Journal Voucher</field>
|
||||
<field name="code">journal_pur_vou</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences for vouchers
|
||||
-->
|
||||
<record model="ir.sequence" id="seq_cash_rec_voucher">
|
||||
<field name="name">Account Cash Received Voucher</field>
|
||||
<field name="code">rec_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.sequence" id="seq_cash_pay_voucher">
|
||||
<field name="name">Account Cash Payble Voucher</field>
|
||||
<field name="code">pay_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_bank_rec_voucher">
|
||||
<field name="name">Account Bank Received Voucher</field>
|
||||
<field name="code">bank_rec_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_bank_pay_voucher">
|
||||
<field name="name">Account Bank Payble Voucher</field>
|
||||
<field name="code">bank_pay_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_contra_voucher">
|
||||
<field name="name">Account Contra Voucher</field>
|
||||
<field name="code">cont_voucher</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_jou_sale_voucher">
|
||||
<field name="name">Account Journal Voucher</field>
|
||||
<field name="code">journal_sale_vou</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_jou_pur_voucher">
|
||||
<field name="name">Account Journal Voucher</field>
|
||||
<field name="code">journal_pur_vou</field>
|
||||
<field name="padding" eval="3"/>
|
||||
<field name="prefix">%(year)s/</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Sequences types for analytic account
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_analytic_account">
|
||||
<field name="name">Analytic account</field>
|
||||
<field name="code">account.analytic.account</field>
|
||||
</record>
|
||||
|
||||
|
||||
Sequence for analytic account
|
||||
|
||||
<record model="ir.sequence" id="seq_analytic_account">
|
||||
<field name="name">Analytic account sequence</field>
|
||||
<field name="code">account.analytic.account</field>
|
||||
<field name="padding" eval="3" />
|
||||
<field name="number_next" eval="2708" />
|
||||
</record>
|
||||
-->
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -28,12 +28,10 @@
|
|||
<form string="Accounting Voucher">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="number"/>
|
||||
<field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
|
||||
<field name="account_id" on_change="onchange_account(account_id)"/>
|
||||
<field name="type" on_change="onchange_journal(journal_id,type)"/>
|
||||
<field name="number"/>
|
||||
<!--field name="amount" select="1" invisible="1"/-->
|
||||
<!--field name="partner_id"/-->
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Journal Entries">
|
||||
|
@ -100,147 +98,153 @@
|
|||
<filter string="Type" icon="terp-account" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
|
||||
<filter string="States" icon="terp-account" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Extended options...">
|
||||
<field name="journal_id" widget="selection" context="{'journal_id': self}" />
|
||||
<field name="period_id" widget="selection" context="{'period_id': self}" groups="base.group_extended"/>
|
||||
<field name="type" context="{'type': self}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Receipt Vouchers -->
|
||||
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
|
||||
<field name="name">Receivable Entries</field>
|
||||
<field name="name">Voucher Entries</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','like','rec_voucher')]</field>
|
||||
<field name="context">{'type':'rec_voucher'}</field>
|
||||
<!-- <field name="domain">[('type','like','rec_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'rec_voucher'}</field>-->
|
||||
</record>
|
||||
<menuitem id="menu_action_receipt_vou_voucher_list"
|
||||
action="action_receipt_vou_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">
|
||||
<field name="name">Cash Receipt</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','rec_voucher')]</field>
|
||||
<field name="context">{'type':'rec_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_receipt_cashreceipt_voucher_list"
|
||||
action="action_receipt_cashreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">-->
|
||||
<!-- <field name="name">Cash Receipt</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','rec_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'rec_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_receipt_cashreceipt_voucher_list"-->
|
||||
<!-- action="action_receipt_cashreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_receipt_bakreceipt_voucher_list">
|
||||
<field name="name">Bank Receipt</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','bank_rec_voucher')]</field>
|
||||
<field name="context">{'type':'bank_rec_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_receipt_bakreceipt_voucher_list"
|
||||
action="action_receipt_bakreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_receipt_bakreceipt_voucher_list">-->
|
||||
<!-- <field name="name">Bank Receipt</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','bank_rec_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'bank_rec_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_receipt_bakreceipt_voucher_list"-->
|
||||
<!-- action="action_receipt_bakreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>-->
|
||||
|
||||
<!-- End Receipt Vouchers -->
|
||||
|
||||
|
||||
<!-- Payment Vouchers -->
|
||||
<record model="ir.actions.act_window" id="action_payments_voucher_list">
|
||||
<field name="name">Payable Entries</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','like','pay_voucher')]</field>
|
||||
<field name="context">{'type':'pay_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_payments_voucher_list"
|
||||
action="action_payments_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_payments_voucher_list">-->
|
||||
<!-- <field name="name">Payable Entries</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','like','pay_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'pay_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_payments_voucher_list"-->
|
||||
<!-- action="action_payments_voucher_list" parent="account.menu_finance_entries" sequence="8"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_payments_cashpay_voucher_list">
|
||||
<field name="name">Cash Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','pay_voucher')]</field>
|
||||
<field name="context">{'type':'pay_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_payments_cashpay_voucher_list"
|
||||
action="action_payments_cashpay_voucher_list" parent="menu_action_payments_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_payments_cashpay_voucher_list">-->
|
||||
<!-- <field name="name">Cash Payment</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','pay_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'pay_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_payments_cashpay_voucher_list"-->
|
||||
<!-- action="action_payments_cashpay_voucher_list" parent="menu_action_payments_voucher_list"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_payments_bankpay_voucher_list">
|
||||
<field name="name">Bank Payment</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','bank_pay_voucher')]</field>
|
||||
<field name="context">{'type':'bank_pay_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_payments_bankpay_voucher_list"
|
||||
action="action_payments_bankpay_voucher_list" parent="menu_action_payments_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_payments_bankpay_voucher_list">-->
|
||||
<!-- <field name="name">Bank Payment</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','bank_pay_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'bank_pay_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_payments_bankpay_voucher_list"-->
|
||||
<!-- action="action_payments_bankpay_voucher_list" parent="menu_action_payments_voucher_list"/>-->
|
||||
|
||||
<!-- End Payment Vouchers -->
|
||||
<!-- End Payment Vouchers -->
|
||||
|
||||
<!-- Other Voucher Enries -->
|
||||
<record model="ir.actions.act_window" id="action_other_voucher_list">
|
||||
<field name="name">Other Entries</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
</record>
|
||||
<menuitem id="menu_action_other_voucher_list"
|
||||
action="action_other_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_other_voucher_list">-->
|
||||
<!-- <field name="name">Other Entries</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_other_voucher_list"-->
|
||||
<!-- action="action_other_voucher_list" parent="account.menu_finance_entries" sequence="8"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_cont_voucher_form">
|
||||
<field name="name">Contra Entries</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','cont_voucher')]</field>
|
||||
<field name="context">{'type':'cont_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_view_cont_voucher_form"
|
||||
action="action_view_cont_voucher_form" parent="menu_action_other_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_view_cont_voucher_form">-->
|
||||
<!-- <field name="name">Contra Entries</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','cont_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'cont_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_view_cont_voucher_form"-->
|
||||
<!-- action="action_view_cont_voucher_form" parent="menu_action_other_voucher_list"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_jour_sale_voucher_form">
|
||||
<field name="name">Journal Sale</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','journal_sale_vou')]</field>
|
||||
<field name="context">{'type':'journal_sale_vou'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_view_jour_sale_voucher_form"
|
||||
action="action_view_jour_sale_voucher_form" parent="menu_action_other_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_view_jour_sale_voucher_form">-->
|
||||
<!-- <field name="name">Journal Sale</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','journal_sale_vou')]</field>-->
|
||||
<!-- <field name="context">{'type':'journal_sale_vou'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_view_jour_sale_voucher_form"-->
|
||||
<!-- action="action_view_jour_sale_voucher_form" parent="menu_action_other_voucher_list"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">
|
||||
<field name="name">Journal Purchase</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','journal_pur_voucher')]</field>
|
||||
<field name="context">{'type':'journal_pur_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_view_jour_pur_voucher_form"
|
||||
action="action_view_jour_pur_voucher_form" parent="menu_action_other_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">-->
|
||||
<!-- <field name="name">Journal Purchase</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','journal_pur_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'journal_pur_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_view_jour_pur_voucher_form"-->
|
||||
<!-- action="action_view_jour_pur_voucher_form" parent="menu_action_other_voucher_list"/>-->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_view_jour_voucher_form">
|
||||
<field name="name">Journal Voucher</field>
|
||||
<field name="res_model">account.voucher</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" eval="view_voucher_tree"/>
|
||||
<field name="domain">[('type','=','journal_voucher')]</field>
|
||||
<field name="context">{'type':'journal_voucher'}</field>
|
||||
</record>
|
||||
<menuitem id="menu_action_view_jour_voucher_form"
|
||||
action="action_view_jour_voucher_form" parent="menu_action_other_voucher_list"/>
|
||||
<!-- <record model="ir.actions.act_window" id="action_view_jour_voucher_form">-->
|
||||
<!-- <field name="name">Journal Voucher</field>-->
|
||||
<!-- <field name="res_model">account.voucher</field>-->
|
||||
<!-- <field name="view_type">form</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
|
||||
<!-- <field name="domain">[('type','=','journal_voucher')]</field>-->
|
||||
<!-- <field name="context">{'type':'journal_voucher'}</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <menuitem id="menu_action_view_jour_voucher_form"-->
|
||||
<!-- action="action_view_jour_voucher_form" parent="menu_action_other_voucher_list"/>-->
|
||||
|
||||
<record model="ir.ui.view" id="view_account_journal_form_inherit">
|
||||
<field name="name">account.journal.form.inherit</field>
|
||||
|
|
Loading…
Reference in New Issue