[IMP]: improvement in account voucher menus, workflow, and payment module

remove wizard for Unreconcile by button

bzr revid: mga@tinyerp.com-20100623104823-inqsfqm6tfuix0h2
This commit is contained in:
Mantavya Gajjar
2010-06-23 16:18:23 +05:30
parent 3b1d296aef
commit e14ceceaf5
6 changed files with 43 additions and 20 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class account_voucher(osv.osv):
'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')]),
'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',True)]}),
'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=True),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
+3 -2
View File
@@ -52,11 +52,12 @@
<group col="2" colspan="2">
<field name="state"/>
</group>
<group col="6" colspan="4">
<group col="8" colspan="4">
<button name="open_voucher" string="Pro-forma" states="draft" icon="terp-check"/>
<button name="proforma_voucher" string="Create" states="proforma" icon="terp-document-new"/>
<button name="recheck_voucher" string="Validate" states="recheck" icon="terp-check"/>
<button name="cancel_voucher" string="Cancel" states="proforma,recheck,done" icon="gtk-cancel"/>
<button name="audit_complete" string="Audit Pass" states="posted" icon="terp-check"/>
<button name="cancel_voucher" string="Cancel" states="proforma,recheck,posted" icon="gtk-cancel"/>
<button name="cancel_to_draft" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
+14 -1
View File
@@ -28,7 +28,6 @@
<field name="name">done</field>
<field name="action">write({'state':'posted'})
proforma_voucher()</field>
<field name="flow_stop">True</field>
<field name="kind">function</field>
</record>
@@ -46,6 +45,14 @@
<field name="kind">function</field>
</record>
<record id="act_audit" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">audit</field>
<field name="action">write({'state':'audit'})</field>
<field name="flow_stop">True</field>
<field name="kind">function</field>
</record>
<record id="t1" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_proforma"/>
@@ -72,6 +79,12 @@
<field name="signal">recheck_voucher</field>
</record>
<record id="t10" model="workflow.transition">
<field name="act_from" ref="act_done"/>
<field name="act_to" ref="act_audit"/>
<field name="signal">audit_complete</field>
</record>
<record id="t5" model="workflow.transition">
<field name="act_from" ref="act_recheck"/>
<field name="act_to" ref="act_cancel"/>
@@ -38,8 +38,8 @@
"demo_xml" : [],
"update_xml" : [
"account_voucher_payment_view.xml",
"account_voucher_payment_wizard.xml"
"account_voucher_payment_wizard.xml",
"account_voucher_payment_view.xml"
],
"test" : [
# "test/account_voucher.yml",
@@ -3,20 +3,19 @@
<data>
<!--
Voucher line extension
-->
-->
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.line.form.inherit</field>
<field name="model">account.voucher.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open')]"/>
</field>
<field name="name" position="after">
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open')]"/>
</field>
</field>
</record>
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.form.inherit</field>
<field name="model">account.voucher</field>
@@ -40,16 +39,15 @@
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form.inherit</field>
<field name="model">account.move.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_move_line_form"/>
<field name="arch" type="xml">
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
</field>
</record>
@@ -59,11 +57,22 @@
<field name="type">tree</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_voucher_form">
<field name="name">account.voucher.form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<button name="cancel_to_draft" position="before">
<button name="%(wizard_unreconcile_voucher)d" string="Unreconcile" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
</button>
</field>
</record>
</data>
</openerp>
@@ -4,7 +4,7 @@
<wizard
id="wizard_unreconcile_voucher"
menu="True"
menu="False"
model="account.voucher"
name="account.voucher.unreconcile"
string="Unreconcile entries"/>