[FIX]: fix some problem in accounting
[IMP]: improvement in accounting, change invoice workflow, add some notes to credit note wizard bzr revid: mga@tinyerp.com-20100716134025-lfrne1e14pppspsk
This commit is contained in:
@@ -201,13 +201,13 @@
|
||||
<field name="amount_total"/>
|
||||
<field name="state"/>
|
||||
<field name="residual"/>
|
||||
<group col="4" colspan="4">
|
||||
<group col="6" colspan="4">
|
||||
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -295,14 +295,14 @@
|
||||
<field name="amount_total"/>
|
||||
<field name="state"/>
|
||||
<field name="residual"/>
|
||||
<group col="6" colspan="4" groups="base.group_user">
|
||||
<group col="7" colspan="4" groups="base.group_user">
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-check"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Create" icon="terp-document-new"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
|
||||
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -12,17 +12,19 @@
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">draft</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="workflow.activity" id="act_confirm">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">confirm</field>
|
||||
</record> -->
|
||||
<record id="act_proforma" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
<field name="name">proforma</field>
|
||||
<field name="action">action_move_create()
|
||||
write({'state':'proforma'})</field>
|
||||
<field name="kind">function</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="act_proforma" model="workflow.activity">-->
|
||||
<!-- <field name="wkf_id" ref="wkf"/>-->
|
||||
<!-- <field name="name">proforma</field>-->
|
||||
<!-- <field name="action">action_move_create()-->
|
||||
<!--write({'state':'proforma'})</field>-->
|
||||
<!-- <field name="kind">function</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="act_proforma2" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf"/>
|
||||
@@ -70,28 +72,28 @@ write({'state':'cancel'})</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record id="t3" model="workflow.transition">
|
||||
<field name="act_from" ref="act_draft"/>
|
||||
<field name="act_to" ref="act_proforma"/>
|
||||
<field name="signal">invoice_proforma</field>
|
||||
</record>
|
||||
<!-- <record id="t3" model="workflow.transition">-->
|
||||
<!-- <field name="act_from" ref="act_draft"/>-->
|
||||
<!-- <field name="act_to" ref="act_proforma"/>-->
|
||||
<!-- <field name="signal">invoice_proforma</field>-->
|
||||
<!-- </record>-->
|
||||
<record id="t4" model="workflow.transition">
|
||||
<field name="act_from" ref="act_draft"/>
|
||||
<field name="act_to" ref="act_open"/>
|
||||
<field name="signal">invoice_open</field>
|
||||
</record>
|
||||
<record id="t5" model="workflow.transition">
|
||||
<field name="act_from" ref="act_proforma"/>
|
||||
<field name="act_to" ref="act_open"/>
|
||||
<field name="signal">invoice_open</field>
|
||||
</record>
|
||||
<record id="t7" model="workflow.transition">
|
||||
<field name="act_from" ref="act_proforma"/>
|
||||
<field name="act_to" ref="act_paid"/>
|
||||
<field name="trigger_model">account.move.line</field>
|
||||
<field name="trigger_expr_id">move_line_id_payment_get()</field>
|
||||
<field name="condition">test_paid()</field>
|
||||
</record>
|
||||
<!-- <record id="t5" model="workflow.transition">-->
|
||||
<!-- <field name="act_from" ref="act_proforma"/>-->
|
||||
<!-- <field name="act_to" ref="act_open"/>-->
|
||||
<!-- <field name="signal">invoice_open</field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <record id="t7" model="workflow.transition">-->
|
||||
<!-- <field name="act_from" ref="act_proforma"/>-->
|
||||
<!-- <field name="act_to" ref="act_paid"/>-->
|
||||
<!-- <field name="trigger_model">account.move.line</field>-->
|
||||
<!-- <field name="trigger_expr_id">move_line_id_payment_get()</field>-->
|
||||
<!-- <field name="condition">test_paid()</field>-->
|
||||
<!-- </record>-->
|
||||
<record id="t8" model="workflow.transition">
|
||||
<field name="act_from" ref="act_open"/>
|
||||
<field name="act_to" ref="act_paid"/>
|
||||
@@ -104,11 +106,11 @@ write({'state':'cancel'})</field>
|
||||
<field name="act_to" ref="act_cancel"/>
|
||||
<field name="signal">invoice_cancel</field>
|
||||
</record>
|
||||
<record id="t11" model="workflow.transition">
|
||||
<field name="act_from" ref="act_proforma"/>
|
||||
<field name="act_to" ref="act_cancel"/>
|
||||
<field name="signal">invoice_cancel</field>
|
||||
</record>
|
||||
<!-- <record id="t11" model="workflow.transition">-->
|
||||
<!-- <field name="act_from" ref="act_proforma"/>-->
|
||||
<!-- <field name="act_to" ref="act_cancel"/>-->
|
||||
<!-- <field name="signal">invoice_cancel</field>-->
|
||||
<!-- </record>-->
|
||||
<record id="t12" model="workflow.transition">
|
||||
<field name="act_from" ref="act_open"/>
|
||||
<field name="act_to" ref="act_cancel"/>
|
||||
|
||||
@@ -300,7 +300,7 @@ class account_invoice(osv.osv):
|
||||
'account.move.reconcile': (_get_invoice_from_reconcile, None, 50),
|
||||
}, help="The Ledger Postings of the invoice have been reconciled with Ledger Postings of the payment(s)."),
|
||||
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',
|
||||
help='The bank account to pay to or to be paid from', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Parner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'move_lines':fields.function(_get_lines , method=True, type='many2many', relation='account.move.line', string='Entry Lines'),
|
||||
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual',
|
||||
store={
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
<field eval=""""Invoice"""" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="account.t5" model="workflow.transition">
|
||||
<field name="role_id" ref="res_roles_invoice0"/>
|
||||
</record>
|
||||
<!-- <record id="account.t5" model="workflow.transition">-->
|
||||
<!-- <field name="role_id" ref="res_roles_invoice0"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="process_transition_confirmstatementfromdraft0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
@@ -154,7 +154,7 @@
|
||||
<field eval=""""Draft invoices are checked, validated and printed."""" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
|
||||
<field eval="[(6,0,[ref('account.t5')])]" name="transition_ids"/>
|
||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_validentries0" model="process.transition">
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<field eval=""""Draft invoices are validated. """" name="note"/>
|
||||
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
|
||||
<field eval="[(6,0,[ref('account.t5')])]" name="transition_ids"/>
|
||||
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
|
||||
</record>
|
||||
|
||||
<record id="process_transition_suppliervalidentries0" model="process.transition">
|
||||
|
||||
@@ -2,31 +2,37 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_invoice_refund" model="ir.ui.view">
|
||||
<record id="view_account_invoice_refund" model="ir.ui.view">
|
||||
<field name="name">account.invoice.refund.form</field>
|
||||
<field name="model">account.invoice.refund</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Credit Note">
|
||||
<separator string="This wizard is used to refund the invoice" colspan="4"/>
|
||||
<group colspan="4" >
|
||||
<label string="Are you sure you want to refund this invoice ?" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="period"/>
|
||||
<field name="description"/>
|
||||
<separator string="This wizard is used to refund the invoice" colspan="4"/>
|
||||
<group colspan="4" >
|
||||
<label string="Are you sure you want to refund this invoice ?" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="period"/>
|
||||
<field name="description"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4" fill="1">
|
||||
<label align="0.0" width="300" string="Refund Invoice: creates a refund invoice"/>
|
||||
<label align="0.0" width="500" colspan="4" string="Cancel Invoice: creates a reverse accounting entries to cancel the invoice"/>
|
||||
<label align="0.0" width="550" colspan="4" string="Modify Invoice: creates a refund invoice, and new copy of the same invoice ready for editing"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-redo" string="Refund Invoice" name="invoice_refund" type="object"/>
|
||||
<button icon="gtk-ok" string="Cancel Invoice" name="invoice_cancel" type="object"/>
|
||||
<button icon="gtk-undo" string="Modify Invoice" name="invoice_modify" type="object"/>
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-redo" string="Refund Invoice" name="invoice_refund" type="object"/>
|
||||
<button icon="gtk-ok" string="Cancel Invoice" name="invoice_cancel" type="object"/>
|
||||
<button icon="gtk-undo" string="Modify Invoice" name="invoice_modify" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_invoice_refund" model="ir.actions.act_window">
|
||||
<field name="name">Credit Note</field>
|
||||
|
||||
@@ -695,7 +695,7 @@ class auction_lots(osv.osv):
|
||||
# wf_service = netsvc.LocalService('workflow')
|
||||
# wf_service.trg_validate(uid, 'account.invoice', inv_id, 'invoice_open', cr)
|
||||
inv_ref.button_compute(cr, uid, invoice.values())
|
||||
wf_service.trg_validate(uid, 'account.invoice', inv_id, 'invoice_proforma', cr)
|
||||
wf_service.trg_validate(uid, 'account.invoice', inv_id, 'invoice_proforma2', cr)
|
||||
return invoices.values()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user