[IMP] account: small improvements
*changed label of fiscalyear in draft state (from Draft to Open) *put readonly of related fields company_id on account_period and account_journal_period + removed the default for it *changed menuitem structure for templates bzr revid: qdp-launchpad@tinyerp.com-20100818145219-sf1jk9z5csrvmwwh
This commit is contained in:
parent
3d967d97d3
commit
7ddaee4694
|
@ -795,10 +795,8 @@ class account_fiscalyear(osv.osv):
|
||||||
'date_start': fields.date('Start Date', required=True),
|
'date_start': fields.date('Start Date', required=True),
|
||||||
'date_stop': fields.date('End Date', required=True),
|
'date_stop': fields.date('End Date', required=True),
|
||||||
'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'),
|
'period_ids': fields.one2many('account.period', 'fiscalyear_id', 'Periods'),
|
||||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
'state': fields.selection([('draft','Open'), ('done','Closed')], 'State', readonly=True),
|
||||||
help='When fiscal year is created. The state is \'Draft\'. At the end of the year it is in \'Done\' state.'),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'state': lambda *a: 'draft',
|
'state': lambda *a: 'draft',
|
||||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
||||||
|
@ -875,11 +873,10 @@ class account_period(osv.osv):
|
||||||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
|
||||||
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
'state': fields.selection([('draft','Draft'), ('done','Done')], 'State', readonly=True,
|
||||||
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
|
||||||
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'state': lambda *a: 'draft',
|
'state': lambda *a: 'draft',
|
||||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
|
||||||
}
|
}
|
||||||
_order = "date_start"
|
_order = "date_start"
|
||||||
|
|
||||||
|
@ -1010,7 +1007,6 @@ class account_journal_period(osv.osv):
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'state': lambda *a: 'draft',
|
'state': lambda *a: 'draft',
|
||||||
'active': lambda *a: True,
|
'active': lambda *a: True,
|
||||||
'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
|
|
||||||
}
|
}
|
||||||
_order = "period_id"
|
_order = "period_id"
|
||||||
|
|
||||||
|
|
|
@ -2142,7 +2142,7 @@
|
||||||
<field name="view_mode">tree,form,search</field>
|
<field name="view_mode">tree,form,search</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts"/>
|
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
|
||||||
|
|
||||||
<!-- Account Tax Templates -->
|
<!-- Account Tax Templates -->
|
||||||
|
|
||||||
|
@ -2326,8 +2326,7 @@
|
||||||
<attribute name='string'></attribute>
|
<attribute name='string'></attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<group string="res_config_contents" position="replace">
|
<group string="res_config_contents" position="replace">
|
||||||
<field name="company_id" widget="selection"
|
<field name="company_id" widget="selection"/>
|
||||||
/>
|
|
||||||
<field name ="code_digits" />
|
<field name ="code_digits" />
|
||||||
<field name="chart_template_id"/>
|
<field name="chart_template_id"/>
|
||||||
<field name ="seq_journal" />
|
<field name ="seq_journal" />
|
||||||
|
@ -2428,7 +2427,7 @@
|
||||||
<menuitem
|
<menuitem
|
||||||
action="action_account_fiscal_position_template_form"
|
action="action_account_fiscal_position_template_form"
|
||||||
id="menu_action_account_fiscal_position_form_template"
|
id="menu_action_account_fiscal_position_form_template"
|
||||||
parent="account_template_folder" sequence="20"/>
|
parent="account_template_taxes" sequence="20"/>
|
||||||
|
|
||||||
<!-- Cash Statement -->
|
<!-- Cash Statement -->
|
||||||
<record id="view_cash_statement_tree" model="ir.ui.view">
|
<record id="view_cash_statement_tree" model="ir.ui.view">
|
||||||
|
|
Loading…
Reference in New Issue