[IMP]: improve account voucher by migrating account_vouche_workflow
bzr revid: mga@tinyerp.com-20100526180017-qg4aoukc7nljab9f
This commit is contained in:
parent
3fbb8a0a42
commit
4e866232b2
|
@ -36,7 +36,10 @@
|
||||||
""",
|
""",
|
||||||
"category" : "Generic Modules/Accounting",
|
"category" : "Generic Modules/Accounting",
|
||||||
"website" : "http://tinyerp.com",
|
"website" : "http://tinyerp.com",
|
||||||
"depends" : ["base", "account"],
|
"depends" : [
|
||||||
|
"base",
|
||||||
|
"account"
|
||||||
|
],
|
||||||
"init_xml" : [
|
"init_xml" : [
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -50,6 +53,7 @@
|
||||||
"voucher_view.xml",
|
"voucher_view.xml",
|
||||||
"voucher_wizard.xml",
|
"voucher_wizard.xml",
|
||||||
"wizard/account_voucher_open_view.xml",
|
"wizard/account_voucher_open_view.xml",
|
||||||
|
"account_voucher_workflow.xml"
|
||||||
],
|
],
|
||||||
'certificate': '0037580727101',
|
'certificate': '0037580727101',
|
||||||
"active": False,
|
"active": False,
|
||||||
|
|
|
@ -36,6 +36,13 @@ class ir_sequence_type(osv.osv):
|
||||||
}
|
}
|
||||||
ir_sequence_type()
|
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):
|
class account_voucher(osv.osv):
|
||||||
def _get_period(self, cr, uid, context):
|
def _get_period(self, cr, uid, context):
|
||||||
periods = self.pool.get('account.period').find(cr, uid)
|
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)]}),
|
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||||
'state':fields.selection(
|
'state':fields.selection(
|
||||||
[('draft','Draft'),
|
[('draft','Draft'),
|
||||||
('proforma','Pro-forma'),
|
('proforma','Pro-forma'),
|
||||||
('posted','Posted'),
|
('posted','Posted'),
|
||||||
('cancel','Cancel')
|
('recheck','Waiting for Re-checking'),
|
||||||
], 'State',
|
('cancel','Cancel'),
|
||||||
readonly=True,
|
('audit','Audit Complete')
|
||||||
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
|
], '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 \'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 \'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),
|
'amount':fields.float('Amount', readonly=True),
|
||||||
'number':fields.char('Number', size=32, readonly=True),
|
'number':fields.char('Number', size=32, readonly=True),
|
||||||
'reference': fields.char('Voucher Reference', size=64),
|
'reference': fields.char('Voucher Reference', size=64),
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
</group>
|
</group>
|
||||||
<notebook colspan="4">
|
<notebook colspan="4">
|
||||||
<page string="Entry Lines">
|
<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">
|
<tree string="Voucher Lines" editable="top">
|
||||||
<field name="account_analytic_id"/>
|
<field name="account_analytic_id"/>
|
||||||
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
|
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
|
||||||
|
@ -49,13 +49,14 @@
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
<separator string="Narration" colspan="4"/>
|
<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">
|
<group col="6" colspan="6">
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<button name="open_voucher" string="Pro-forma" states="draft" type="object" icon="gtk-open"/>
|
<button name="open_voucher" string="Pro-forma" states="draft"/>
|
||||||
<button name="proforma_voucher" string="Create" states="proforma" type="object" icon="gtk-go-forward"/>
|
<button name="proforma_voucher" string="Create" states="proforma"/>
|
||||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma,posted" type="object" icon="gtk-cancel"/>
|
<button name="recheck_voucher" string="Validate" states="recheck"/>
|
||||||
<button name="action_cancel_draft" states="cancel" type="object" string="Set to Draft" icon="gtk-convert"/>
|
<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>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
<page string="Other Info">
|
<page string="Other Info">
|
||||||
|
|
|
@ -1,20 +1,19 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<!-- <wizard
|
<!-- <wizard
|
||||||
id="wizard_account_voucher_open"
|
id="wizard_account_voucher_open"
|
||||||
model="account.voucher"
|
model="account.voucher"
|
||||||
name="account.voucher.open"
|
name="account.voucher.open"
|
||||||
menu="False"
|
menu="False"
|
||||||
string="Open a Voucher Entry"/>
|
string="Open a Voucher Entry"/>
|
||||||
<menuitem
|
<menuitem
|
||||||
action="wizard_account_voucher_open"
|
action="wizard_account_voucher_open"
|
||||||
id="menu_wizard_account_voucher_open"
|
id="menu_wizard_account_voucher_open"
|
||||||
name="Open Vouchers"
|
name="Open Vouchers"
|
||||||
sequence="0"
|
sequence="0"
|
||||||
type="wizard"
|
type="wizard"
|
||||||
parent="menu_action_voucher_list"/> -->
|
parent="menu_action_voucher_list"/> -->
|
||||||
|
</data>
|
||||||
</data>
|
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
Loading…
Reference in New Issue