Rohan Nayani(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev-add-settaxcomplete-field-on-acc-chart-template-ron
 into lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-l10n-control-dev-add-settaxcomplete-field-on-acc-chart-template-ron/+merge/69952

Hello,

1)Added set_tax_complete field in account.chart.template,
2)Added default sale and purchase rates float field in 
wizard.multi.charts.accounts,
3)If set_tax_complete boolean is False, then instead of the 2 many2one for 
default sale and purchase taxes, we display the default sale and purchase rates 
in in the wizard that generate Chart of Accounts from templates
4)Added tracking field only for tracking purpose

Thanks
ron
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-l10n-control-dev-add-settaxcomplete-field-on-acc-chart-template-ron/+merge/69952
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-l10n-control-dev.
=== modified file 'account/account.py'
--- account/account.py	2011-07-29 10:25:48 +0000
+++ account/account.py	2011-08-01 05:46:09 +0000
@@ -2477,6 +2477,7 @@
         'name': fields.char('Name', size=64, required=True),
         'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
         'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."),
+        'set_tax_complete': fields.boolean('Complete Set Of Tax', help="Set this False, then instead of the 2 many2one for default sale and purchase taxes, we display the default sale and purchase rates float field in the wizard that generate Chart of Accounts from templates"),
         'account_root_id': fields.many2one('account.account.template', 'Root Account', domain=[('parent_id','=',False)]),
         'tax_code_root_id': fields.many2one('account.tax.code.template', 'Root Tax Code', domain=[('parent_id','=',False)]),
         'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),
@@ -2635,12 +2636,19 @@
         'seq_journal':fields.boolean('Separated Journal Sequences', help="Check this box if you want to use a different sequence for each created journal. Otherwise, all will use the same sequence."),
         "sale_tax": fields.many2one("account.tax.template", "Default Sale Tax"),
         "purchase_tax": fields.many2one("account.tax.template", "Default Purchase Tax"),
+        'sale_tax_rate': fields.float('Sale Tax(%)'),
+        'purchase_tax_rate': fields.float('Purchase Tax(%)'),
+        'tracking': fields.boolean('Tracking'),
     }
     def onchange_chart_template_id(self, cr, uid, ids, chart_template_id=False, context=None):
         res = {}
         res['value'] = {}
+        res['value']["tracking"] = False
         res['value']["sale_tax"] = False
         res['value']["purchase_tax"] = False
+        for template in self.pool.get('account.chart.template').browse(cr, uid, [chart_template_id], context=context):
+            if template.set_tax_complete:
+                res['value']["tracking"] = True
         if chart_template_id:
             # default tax is given by the lowesst sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
             sale_tax_ids = self.pool.get('account.tax.template').search(cr, uid, [("chart_template_id"

=== modified file 'account/account_view.xml'
--- account/account_view.xml	2011-07-29 06:18:53 +0000
+++ account/account_view.xml	2011-08-01 05:46:09 +0000
@@ -2146,6 +2146,7 @@
                     <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
                     <field name="parent_id" />
                     <field name="visible" />
+                    <field name="set_tax_complete" />
                     </group>
                     <field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
                     <separator string="Properties" colspan="4"/>
@@ -2399,8 +2400,11 @@
                     <field name ="code_digits" groups="base.group_extended"/>
                     <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
                     <field name ="seq_journal" groups="base.group_extended"/>
-                    <field name="sale_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
-                    <field name="purchase_tax" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
+                    <field name="sale_tax" attrs="{'invisible': [('tracking', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
+                    <field name="purchase_tax" attrs="{'invisible': [('tracking', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
+                    <field name ="sale_tax_rate" attrs="{'invisible': [('tracking', '=', True)]}"/>
+                    <field name ="purchase_tax_rate" attrs="{'invisible': [('tracking', '=', True)]}"/>
+                    <field name ="tracking" invisible="1"/>
                     <newline/> <!-- extended view because the web UI is not good for one2many -->
                     <field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list" groups="base.group_extended">
                         <form string="Bank Information">

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to