# Same fields for refund invoices
- 'ref_base_code_id': fields.many2one('account.tax.code', 'Base Code', help="Use this code for the VAT declaration."),
- 'ref_tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="Use this code for the VAT declaration."),
+ 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the VAT declaration."),
+ 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the VAT declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usualy 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usualy 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes"),
# Same fields for refund invoices
- 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the VAT declaration."),
- 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the VAT declaration."),
+ 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the VAT declaration."),
+ 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the VAT declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."),
<field name="state" select="2"/>
<field name="residual"/>
<group col="3" colspan="4">
- <button name="invoice_open" states="draft,proforma" string="Validate"/>
- <button name="invoice_cancel" states="draft,proforma,sale,open" string="Cancel"/>
+ <button name="invoice_open" states="draft,proforma2" string="Validate"/>
+ <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid'/>
</group>
<field name="state" select="2"/>
<field name="residual"/>
<group col="3" colspan="4">
- <button name="invoice_proforma" states="draft" string="PRO-FORMA"/>
- <button name="invoice_open" states="draft,proforma" string="Create"/>
- <button name="invoice_cancel" states="draft,proforma,sale,open" string="Cancel"/>
+ <button name="invoice_proforma2" states="draft" string="PRO-FORMA"/>
+ <button name="invoice_open" states="draft,proforma2" string="Create"/>
+ <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name='%(wizard_paid_open)d' type='action' string='Re-Open' states='paid'/>
</group>
<field name="res_model">account.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar,graph</field>
- <field name="domain">[('state','=','proforma'),('type','=','out_invoice')]</field>
+ <field name="domain">[('state','=','proforma2'),('type','=','out_invoice')]</field>
<field name="context">{'type':'out_invoice'}</field>
</record>
<record id="action_invoice_tree6_view1" model="ir.actions.act_window.view">
write({'state':'proforma'})</field>
<field name="kind">function</field>
</record>
+
+ <record id="act_proforma2" model="workflow.activity">
+ <field name="wkf_id" ref="account.wkf"/>
+ <field name="name">proforma2</field>
+ <field name="action">write({'state':'proforma2'})</field>
+ <field name="kind">function</field>
+ </record>
+
<record id="act_open" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">open</field>
<field name="act_to" ref="act_cancel"/>
<field name="signal">invoice_cancel</field>
</record>
+
+ <record id="draft_to_pro2" model="workflow.transition">
+ <field name="act_from" ref="account.act_draft"/>
+ <field name="act_to" ref="act_proforma2"/>
+ <field name="signal">invoice_proforma2</field>
+ </record>
+
+ <record id="pro2_to_open" model="workflow.transition">
+ <field name="act_from" ref="act_proforma2"/>
+ <field name="act_to" ref="account.act_open"/>
+ <field name="signal">invoice_open</field>
+ </record>
+
+ <record id="pro2_to_paid" model="workflow.transition">
+ <field name="act_from" ref="act_proforma2"/>
+ <field name="act_to" ref="account.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="pro2_to_cancel" model="workflow.transition">
+ <field name="act_from" ref="act_proforma2"/>
+ <field name="act_to" ref="account.act_cancel"/>
+ <field name="signal">invoice_cancel</field>
+ </record>
</data>
</openerp>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="8"/>
+ <menuitem id="menu_finance_legal_statement" name="Legal Statements" parent="account.menu_finance" sequence="8"/>
<menuitem id="menu_finance_entries" name="Entries Encoding" parent="account.menu_finance" sequence="2"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="account.menu_finance_entries" sequence="15"/>
'state': fields.selection([
('draft','Draft'),
('proforma','Pro-forma'),
+ ('proforma2','Pro-forma'),
('open','Open'),
('paid','Done'),
('cancel','Canceled')