diff options
| author | Jay Vora <jvo@tinyerp.com> | 2008-09-08 13:05:42 +0530 |
|---|---|---|
| committer | Jay Vora <jvo@tinyerp.com> | 2008-09-08 13:05:42 +0530 |
| commit | ad045518b08bbef3b65ec9b19f304d288d3c052d (patch) | |
| tree | 4dd2e97af34a07a7ddb1f6894b500b42054c5452 /addons | |
| parent | 18949ad0e4c114044fd672fddc57ea2575d9aee1 (diff) | |
Modified view for Account tax and account tax code templates.
bzr revid: jvo@tinyerp.com-20080908073542-4x2l2rcusrklt2z8
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/account.py | 6 | ||||
| -rw-r--r-- | addons/account/account_view.xml | 86 |
2 files changed, 79 insertions, 13 deletions
diff --git a/addons/account/account.py b/addons/account/account.py index 64658550ae5..a771bed6144 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1708,6 +1708,7 @@ class account_tax_code_template(osv.osv): 'code': fields.char('Case Code', size=16), 'info': fields.text('Description'), 'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True), + 'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Childs Codes'), 'company_id': fields.many2one('res.company', 'Company', required=True), 'sign': fields.float('Sign for parent', required=True), } @@ -1780,8 +1781,7 @@ class account_tax_template(osv.osv): 'name': fields.char('Tax Name', size=64, required=True), 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from the lowest sequences to the higher ones. The order is important if you have a tax that have several tax children. In this case, the evaluation order is important."), 'amount': fields.float('Amount', required=True, digits=(14,4)), -# 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code')], 'Tax Type', required=True), - 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None')],'Tax Type', required=True), + 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code')], 'Tax Type', required=True), 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True), 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."), 'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'), @@ -1854,6 +1854,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'company_id':fields.many2one('res.company','Company',required=True), 'chart_template_id': fields.many2one('account.chart.template','Chart Template',required=True), 'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True), + 'code_digits':fields.integer('No. of Digits for Account Code',required=True), } #global seq @@ -2100,7 +2101,6 @@ class wizard_account_chart_duplicate(osv.osv_memory): 'name':fields.char('Name',size=64), 'account_id':fields.many2one('account.account','Account Chart',required=True,domain=[('parent_id','=',False)]), 'company_id':fields.many2one('res.company','Company',required=True), - } def action_create(self, cr, uid,ids, context=None): diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index a81e55824ec..2fb7c30d4a5 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1572,15 +1572,50 @@ <field name="type">form</field> <field name="arch" type="xml"> <form string="Account Tax Template"> - <field name="name" select="1"/> - <!--<field name="company_id"/>--> - <newline/> - <field name="description" select="1" colspan="4"/> - <field name="tax_group" /> - <newline/> - <field name="type"/> - <field name="amount"/> - <field name="domain" groups="base.group_extended"/> + <group colspan="4"> + <field name="name" select="1"/> + <field name="description" select="1"/> + <newline/> + <field name="chart_template_id" select="1"/> + <field name="tax_group" select="1"/> + <field name="type" select="2"/> + </group> + <notebook colspan="4"> + <page string="Tax Definition"> + <field name="applicable_type"/> + <field name="amount" select="2" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/> + <field groups="base.group_extended" name="include_base_amount"/> + <field groups="base.group_extended" name="domain"/> + <newline/> + <field name="account_collected_id"/> + <label colspan="2" nolabel="1" string="Keep empty to use the income account"/> + <field name="account_paid_id"/> + <label colspan="2" nolabel="1" string="Keep empty to use the expense account"/> + <field groups="base.group_extended" name="child_depend"/> + <field groups="base.group_extended" name="sequence"/> + </page> + <page string="Tax Declaration"> + <separator colspan="4" string="Invoices"/> + <field name="base_code_id"/> + <field name="base_sign"/> + <field name="tax_code_id"/> + <field name="tax_sign"/> + + <separator colspan="4" string="Refund Invoices"/> + <field name="ref_base_code_id"/> + <field name="ref_base_sign"/> + <field name="ref_tax_code_id"/> + <field name="ref_tax_sign"/> + </page> + <page groups="base.group_extended" string="Special Computation"> + <separator colspan="4" string="Compute Code (if type=code)"/> + <field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/> + <separator colspan="4" string="Compute Code for Taxes included prices"/> + <field colspan="4" name="python_compute_inv" nolabel="1"/> + <separator colspan="4" string="Applicable Code (if type=code)"/> + <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/> + </page> + </notebook> </form> </field> </record> @@ -1604,6 +1639,37 @@ <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="next_id_27"/> + <!-- Account Tax Code Templates --> + <record id="view_tax_code_template_tree" model="ir.ui.view"> + <field name="name">account.tax.code.template.tree</field> + <field name="model">account.tax.code.template</field> + <field name="type">tree</field> + <field name="field_parent">child_ids</field> + <field name="arch" type="xml"> + <tree string="Account Tax Code Template" toolbar="1"> + <field name="name"/> + <field name="code"/> + </tree> + </field> + </record> + + <record id="view_tax_code_template_form" model="ir.ui.view"> + <field name="name">account.tax.code.template.form</field> + <field name="model">account.tax.code.template</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Account Tax Code Template"> + <field name="name" select="1"/> + <field name="company_id"/> + <field name="code" select="1"/> + <field name="parent_id" select="1"/> + <field name="sign"/> + <newline/> + <field colspan="4" name="info"/> + </form> + </field> + </record> + <record id="action_account_tax_code_template_form" model="ir.actions.act_window"> <field name="name">Account Tax Code Templates</field> <field name="res_model">account.tax.code.template</field> @@ -1613,7 +1679,6 @@ <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="next_id_27"/> - <!-- Wizard for Multi Charts of Accounts --> <record id="view_wizard_multi_chart" model="ir.ui.view"> @@ -1624,6 +1689,7 @@ <form string="Create Multiple Charts of Accounts"> <field name="company_id" /> <field name="chart_template_id" /> + <field name ="code_digits" /> <field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list"> <form string="Bank Information"> <field name="acc_no"/> |
