*corrected proforma stuff: a proforma invoice do NOT have to create entries

*corrected label for tax code and base code (the ones for invoices and refunds had the same label so it was confusing. Specially when the user tried to export these 
fields 
*added a menuitem for legal statements

bzr revid: qdp@tinyerp.com-20081007100221-4azxnr4ac0ac8wxz
This commit is contained in:
qdp 2008-10-07 12:02:21 +02:00
parent 50f33959de
commit 5c41e2e88f
5 changed files with 46 additions and 10 deletions

View File

@ -1121,8 +1121,8 @@ class account_tax(osv.osv):
# 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"),
@ -1781,8 +1781,8 @@ class account_tax_template(osv.osv):
# 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."),

View File

@ -184,8 +184,8 @@
<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>
@ -266,9 +266,9 @@
<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>
@ -452,7 +452,7 @@
<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">

View File

@ -23,6 +23,14 @@
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>
@ -114,5 +122,31 @@ write({'state':'cancel'})</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>

View File

@ -9,6 +9,7 @@
<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"/>

View File

@ -165,6 +165,7 @@ class account_invoice(osv.osv):
'state': fields.selection([
('draft','Draft'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
('open','Open'),
('paid','Done'),
('cancel','Canceled')