[IMP] account: usability changes

bzr revid: qdp-launchpad@tinyerp.com-20100906140701-9x5pbk51p21w0zqv
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-09-06 16:07:01 +02:00
parent 138f791964
commit 515dfb8065
2 changed files with 29 additions and 22 deletions

View File

@ -38,8 +38,8 @@ class account_analytic_line(osv.osv):
'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True),
'code' : fields.char('Code', size=8),
'ref': fields.char('Ref.', size=64),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one."),
'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount currency', store=True, help="The amount expressed in the related account currency if not equal to the company one."),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
}
_defaults = {
@ -129,8 +129,7 @@ class timesheet_invoice(osv.osv):
'quantity': fields.float('Quantities', readonly=True),
'cost': fields.float('Credit', readonly=True),
'revenue': fields.float('Debit', readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
}
_order = 'name desc, account_id'
def init(self, cr):

View File

@ -136,23 +136,31 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Analytic Entry">
<separator string="General Information" colspan="4"/>
<field colspan="4" name="name" select="1"/>
<field name="amount" select="2"/>
<field name="date" select="1"/>
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="journal_id" select="2"/>
<field name="general_account_id" select="2"/>
<field name="move_id" select="2"/>
<separator string="Optional Information" colspan="4"/>
<field name="unit_amount" select="2"/>
<field name="ref" select="2"/>
<field name="currency_id" select="2"/>
<field name="amount_currency" select="2"/>
<field name="company_id" select="2" groups="base.group_multi_company"/>
<newline/>
<field name="product_id" select="2"/>
<field name="product_uom_id" select="2"/>
<group colspan="4" col="6">
<field name="name"/>
<field name="ref"/>
<field name="account_id"/>
<field name="journal_id"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group colspan="2" col="4">
<separator string="Amount" colspan="4"/>
<field name="amount" colspan="4"/>
<field name="amount_currency" colspan="2"/>
<field name="currency_id" colspan="2" nolabel="1"/>
</group>
<group colspan="2" col="4">
<separator string="Product Information" colspan="4"/>
<field name="product_id" colspan="4"/>
<field name="unit_amount" colspan="2"/>
<field name="product_uom_id" colspan="2" nolabel="1"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<separator string="General Accounting" colspan="2"/>
<field name="general_account_id"/>
<field name="move_id" readonly="1"/>
</group>
</form>
</field>
</record>
@ -189,8 +197,8 @@
<filter string="Purchase" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase"/>
<separator orientation="vertical"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="name" select="1"/>
<field name="account_id" select="1" groups="base.group_extended"/>
<field name="user_id" widget="selection"/>
</group>