[IMP]: improve account voucher by migrating account_vouche_workflow

bzr revid: mga@tinyerp.com-20100526180017-qg4aoukc7nljab9f
This commit is contained in:
Mantavya Gajjar 2010-05-26 23:30:17 +05:30
parent 3fbb8a0a42
commit 4e866232b2
4 changed files with 43 additions and 31 deletions

View File

@ -36,7 +36,10 @@
""",
"category" : "Generic Modules/Accounting",
"website" : "http://tinyerp.com",
"depends" : ["base", "account"],
"depends" : [
"base",
"account"
],
"init_xml" : [
],
@ -50,6 +53,7 @@
"voucher_view.xml",
"voucher_wizard.xml",
"wizard/account_voucher_open_view.xml",
"account_voucher_workflow.xml"
],
'certificate': '0037580727101',
"active": False,

View File

@ -36,6 +36,13 @@ class ir_sequence_type(osv.osv):
}
ir_sequence_type()
class account_journal(osv.osv):
_inherit = "account.journal"
_columns = {
'max_amount': fields.float('Verify Transection Above', digits=(16, int(config['price_accuracy']))),
}
account_journal()
class account_voucher(osv.osv):
def _get_period(self, cr, uid, context):
periods = self.pool.get('account.period').find(cr, uid)
@ -110,16 +117,17 @@ class account_voucher(osv.osv):
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state':fields.selection(
[('draft','Draft'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancel')
], 'State',
readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
[('draft','Draft'),
('proforma','Pro-forma'),
('posted','Posted'),
('recheck','Waiting for Re-checking'),
('cancel','Cancel'),
('audit','Audit Complete')
], 'State', readonly=True, size=32,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'),
\n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount':fields.float('Amount', readonly=True),
'number':fields.char('Number', size=32, readonly=True),
'reference': fields.char('Voucher Reference', size=64),

View File

@ -37,7 +37,7 @@
</group>
<notebook colspan="4">
<page string="Entry Lines">
<field name="payment_ids" colspan="4" nolabel="1" height="275">
<field name="payment_ids" colspan="4" nolabel="1" height="150">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
@ -49,13 +49,14 @@
</tree>
</field>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="6" colspan="6">
<field name="state"/>
<button name="open_voucher" string="Pro-forma" states="draft" type="object" icon="gtk-open"/>
<button name="proforma_voucher" string="Create" states="proforma" type="object" icon="gtk-go-forward"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,posted" type="object" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" type="object" string="Set to Draft" icon="gtk-convert"/>
<button name="open_voucher" string="Pro-forma" states="draft"/>
<button name="proforma_voucher" string="Create" states="proforma"/>
<button name="recheck_voucher" string="Validate" states="recheck"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" type="object"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
</group>
</page>
<page string="Other Info">

View File

@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<data>
<!-- <wizard
id="wizard_account_voucher_open"
model="account.voucher"
name="account.voucher.open"
menu="False"
string="Open a Voucher Entry"/>
<menuitem
action="wizard_account_voucher_open"
id="menu_wizard_account_voucher_open"
name="Open Vouchers"
sequence="0"
type="wizard"
parent="menu_action_voucher_list"/> -->
</data>
<!-- <wizard
id="wizard_account_voucher_open"
model="account.voucher"
name="account.voucher.open"
menu="False"
string="Open a Voucher Entry"/>
<menuitem
action="wizard_account_voucher_open"
id="menu_wizard_account_voucher_open"
name="Open Vouchers"
sequence="0"
type="wizard"
parent="menu_action_voucher_list"/> -->
</data>
</openerp>