[MERGE] merged from trunk main addons branch

bzr revid: vra@tinyerp.com-20100513124928-grd4aqv5t2rd6pt3
This commit is contained in:
vra 2010-05-13 18:19:28 +05:30
parent 011f5100f3
commit d1169c36a0
6 changed files with 39 additions and 28 deletions

View File

@ -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"/>

View File

@ -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")

View File

@ -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>

View File

@ -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, [])

View File

@ -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>

View File

@ -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 = {