[MERGE] misc improvements account, hr, crm, project

bzr revid: fp@openerp.com-20121110140519-z8x4ruqed7voa8rd
This commit is contained in:
Fabien Pinckaers 2012-11-10 15:05:19 +01:00
commit b5013ea195
8 changed files with 20 additions and 16 deletions

View File

@ -306,7 +306,7 @@
<field name="name">Unrealized Gain or Loss</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<tree string="Unrealized Gains and losses">
<tree string="Unrealized Gains and losses" create="false">
<field name="code"/>
<field name="name"/>
<field name="parent_id" invisible="1"/>
@ -2159,7 +2159,8 @@
<field name="visible" />
<field name="complete_tax_set" />
</group>
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
<separator string="Default Taxes" colspan="4"/>
<field name="tax_template_ids" colspan="4" nolabel="1"/>
<separator string="Properties" colspan="4"/>
<group col="4">
<field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>

View File

@ -6,7 +6,7 @@
<field name="name">account.fiscal.position.form</field>
<field name="model">account.fiscal.position</field>
<field name="arch" type="xml">
<form string="Fiscal Position">
<form string="Fiscal Position" version="7.0">
<group col="4">
<field name="name"/>
<field name="active"/>

View File

@ -54,6 +54,8 @@
<form string="Bill Payment" version="7.0">
<group col="6">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/>
<field name="state" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="amount" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"

View File

@ -91,7 +91,7 @@
<field name="res_model">crm.phonecall.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_year":1,"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{"search_default_year":1,"search_default_Salesperson":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_id" ref="view_report_crm_phonecall_tree"/>
<field name="search_view_id" ref="view_report_crm_phonecall_filter"/>
<field name="help">From this report, you can analyse the performance of your sales team, based on their phone calls. You can group or filter the information according to several criteria and drill down the information, by adding more groups in the report.</field>

View File

@ -236,16 +236,6 @@ class product_product(osv.osv):
'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."),
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
if not hr_expense_ok:
return {}
data_obj = self.pool.get('ir.model.data')
cat_id = data_obj._get_id(cr, uid, 'hr_expense', 'cat_expense')
categ_id = data_obj.browse(cr, uid, cat_id).res_id
res = {'value' : {'type':'service','sale_ok' :False,'categ_id':categ_id }}
return res
product_product()
class hr_expense_line(osv.osv):

View File

@ -195,7 +195,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<div name="options" position="inside">
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/>
<field name="hr_expense_ok"/>
<label for="hr_expense_ok"/>
</div>
</field>

View File

@ -90,6 +90,17 @@ class hr_holidays_status(osv.osv):
'color_name': 'red',
'active': True,
}
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
for record in self.browse(cr, uid, ids, context=context):
name = record.name
if not record.limit:
name = name + (' (%d/%d)' % (record.leaves_taken or 0.0, record.max_leaves or 0.0))
res.append((record.id, name))
return res
hr_holidays_status()
class hr_holidays(osv.osv):

View File

@ -164,7 +164,7 @@
<field name="model">project.project</field>
<field name="arch" type="xml">
<search string="Search Project">
<field name="complete_name" string="Project Name"/>
<field name="name" string="Project Name"/>
<filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-check" string="Open" name="Current" domain="[('state', '=','open')]" help="Open Projects"/>