summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornch@tinyerp.com <>2010-05-13 17:20:52 +0530
committernch@tinyerp.com <>2010-05-13 17:20:52 +0530
commitd7c1fcbf7b7e33eb09c1bfd2bae0a8359d3b23df (patch)
treeb28062ce5fbca8097a01f1f478861a9333d8c376
parent3cebf4388d595b83245cfdd923d14fd151018440 (diff)
[IMP]:configuration wizards
bzr revid: nch@tinyerp.com-20100513115052-vwsyu8s8tutpxprx
-rw-r--r--addons/account/account_installer.xml20
-rw-r--r--addons/account/installer.py7
-rw-r--r--addons/base_setup/base_setup_todo.xml23
-rw-r--r--addons/base_setup/gtk_contact_form.py3
-rw-r--r--addons/base_setup/gtk_contact_form.xml6
-rw-r--r--addons/base_setup/todo.py8
6 files changed, 39 insertions, 28 deletions
diff --git a/addons/account/account_installer.xml b/addons/account/account_installer.xml
index d3a6ce979a6..4c6faae9e19 100644
--- a/addons/account/account_installer.xml
+++ b/addons/account/account_installer.xml
@@ -29,30 +29,30 @@
<group colspan="8">
<group colspan="4" height="450" width="600">
<field name="charts"/>
- <group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
- <field name="sale_tax" colspan="2"/>
- <field name="purchase_tax" colspan="2"/>
+ <group colspan="4">
+ <separator col="4" colspan="4" string="Configure Fiscal Year"/>
+ <field name="date_start" on_change="on_change_start_date(date_start)"/>
+ <field name="date_stop"/>
+ <field name="period" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
<separator col="4" colspan="4" string="Bank and Cost Account"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
- <form string="Bank Information">
+ <form string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
</form>
- <tree editable="bottom" string="Bank Information">
+ <tree editable="bottom" string="">
<field name="acc_name"/>
<field name="account_type"/>
<field name="currency_id" widget="selection"/>
</tree>
</field>
</group>
- <group colspan="4">
- <separator col="4" colspan="4" string="Configure Fiscal Year"/>
- <field name="date_start" on_change="on_change_start_date(date_start)"/>
- <field name="date_stop"/>
- <field name="period" colspan="4"/>
+ <group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
+ <field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
+ <field name="purchase_tax" colspan="2" />
</group>
<group colspan="4" groups="base.group_extended">
<separator col="4" colspan="4" string="Install Extra Account Module"/>
diff --git a/addons/account/installer.py b/addons/account/installer.py
index de557cd51a0..44eb081d7be 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -44,7 +44,7 @@ class account_installer(osv.osv_memory):
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids)),
key=itemgetter(1)))
- charts.insert(0,('configurable','Configurable Chart of Account'))
+ charts.insert(0,('configurable','Generic Chart Of Account'))
return charts
_columns = {
@@ -81,10 +81,13 @@ class account_installer(osv.osv_memory):
'period':lambda *a:'month',
'sale_tax':lambda *a:0.0,
'purchase_tax':lambda *a:0.0,
- 'charts':'configurable',
+ #'charts':'configurable',
'bank_accounts_id':_get_default_accounts
}
+ def on_change_tax(self, cr, uid, id, tax):
+ return{'value':{'purchase_tax':tax}}
+
def on_change_start_date(self, cr, uid, id, start_date):
if start_date:
start_date = datetime.datetime.strptime(start_date, "%Y-%m-%d")
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
index b348b0c8a60..97c9ea0d301 100644
--- a/addons/base_setup/base_setup_todo.xml
+++ b/addons/base_setup/base_setup_todo.xml
@@ -17,33 +17,34 @@
<attribute name='string'>Configure Your Company</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
- <attribute name='rowspan'>23</attribute>
+ <attribute name='rowspan'>25</attribute>
<attribute name='string'></attribute>
</xpath>
<group string="res_config_contents" position="replace">
<group colspan="5">
<group colspan="2">
<field name="company_id" invisible="1"/>
- <field name="name" colspan="4" required="True"/>
- <newline/>
- <field name="street"/>
- <field name="street2"/>
+ <field name="name" required="True"/><field name="account_no"/>
+ <field name="currency" widget="selection"/><field name="street"/>
<field name="zip"/>
+ <field name="street2"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
<field name="email"/>
<field name="phone"/>
- <field name="currency" widget="selection"/>
-
+ <field name="website"/>
+ </group>
+ <newline/>
+ <group colspan="2" groups="base.group_extended">
<separator string="Report Information" colspan="4"/>
- <field name="rml_header1" colspan="4"/>
- <field name="rml_footer1" colspan="4"/>
- <field name="rml_footer2" colspan="4"/>
+ <field name="rml_header1" colspan="5"/>
+ <field name="rml_footer1" colspan="5"/>
+ <field name="rml_footer2" colspan="5"/>
<separator colspan="4"
string="Your Logo - Use a size of about 450x150 pixels."/>
- <field colspan="4" name="logo" widget="image"
+ <field colspan="5" name="logo" widget="image"
nolabel="1"/>
</group>
</group>
diff --git a/addons/base_setup/gtk_contact_form.py b/addons/base_setup/gtk_contact_form.py
index 354080df451..c13ae39aee3 100644
--- a/addons/base_setup/gtk_contact_form.py
+++ b/addons/base_setup/gtk_contact_form.py
@@ -70,7 +70,8 @@ class base_gtkcontactform(osv.osv_memory):
'training':fields.boolean('OpenERP Training Program'),
'other':fields.boolean('Other'),
'ebook':fields.boolean('ebook'),
- 'updates':fields.boolean('updates'),
+ 'updates':fields.boolean('Updates'),
+ 'contact_me':fields.boolean('Contact Me'),
}
def execute(self, cr, uid, ids, context=None):
company_id = self.pool.get('base.setup.company').search(cr, uid, [])
diff --git a/addons/base_setup/gtk_contact_form.xml b/addons/base_setup/gtk_contact_form.xml
index f833f7051d6..c5578f9bc9a 100644
--- a/addons/base_setup/gtk_contact_form.xml
+++ b/addons/base_setup/gtk_contact_form.xml
@@ -14,7 +14,7 @@
<attribute name="string">Information about you and the company you are related too. The Basic information related to the company has already been collected and some more information required by you to fill.</attribute>
</xpath>
<xpath expr='//separator[@string="title"]' position='attributes'>
- <attribute name='string'>Do You Need Them ?</attribute>
+ <attribute name='string'>Would you like more information or documentation ?</attribute>
<attribute name='colspan'>4</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
@@ -24,6 +24,8 @@
<group string="res_config_contents" position="replace">
<group colspan="4" height="450" width="600">
<group colspan="4">
+ <field name="contact_me" nolabel="1"/>
+ <label align="0.0" string="I accept to be contacted by OpenERP." colspan="3"/>
<field name="ebook" nolabel="1"/>
<label align="0.0" string="I want to receive the Open ERP ebook (PDF) by email." colspan="3"/>
<field name="updates" nolabel="1"/>
@@ -71,7 +73,7 @@
<record id="base_setup_contact_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_contact"/>
<field name="sequence">1</field>
- <field name="restart">onskip</field>
+ <field name="restart">never</field>
</record>
</data>
</openerp>
diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py
index 6d161d581f8..c072891179a 100644
--- a/addons/base_setup/todo.py
+++ b/addons/base_setup/todo.py
@@ -86,8 +86,8 @@ class base_setup_company(osv.osv_memory):
'street2':fields.char('Street 2', size=128),
'zip':fields.char('Zip Code', size=24),
'city':fields.char('City', size=128),
- 'state_id':fields.selection(_get_all_states, 'States'),
- 'country_id':fields.selection(_get_all_countries, 'Countries'),
+ 'state_id':fields.selection(_get_all_states, 'State'),
+ 'country_id':fields.selection(_get_all_countries, 'Country'),
'email':fields.char('E-mail', size=64),
'phone':fields.char('Phone', size=64),
'currency':fields.many2one('res.currency', 'Currency', required=True),
@@ -104,6 +104,8 @@ Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07''')
We suggest you to put bank information here:
IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701'''),
'logo':fields.binary('Logo'),
+ 'account_no':fields.char('Account No', size=64),
+ 'website': fields.char('Web', size=64),
}
def execute(self, cr, uid, ids, context=None):
@@ -120,10 +122,12 @@ IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701'''),
'rml_footer2':payload.rml_footer2,
'logo':payload.logo,
'currency_id':payload.currency.id,
+ 'account_no':payload.account_no,
})
company.partner_id.write({
'name':payload.name,
+ 'website':payload.website,
})
address_data = {