[FIX] account: Add an ondelete=cascade on the payment term line
[FIX] crm_claim: Fix a bug with the precedence of a menuitem [FIX] hr_timesheet_sheet: Fix the ids of name_get bzr revid: stw@openerp.com-20120906125407-8lbgehsf0yvy35vw
This commit is contained in:
commit
28b6979371
|
@ -111,7 +111,7 @@ class account_payment_term_line(osv.osv):
|
|||
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
|
||||
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
|
||||
'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
|
||||
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True),
|
||||
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'),
|
||||
}
|
||||
_defaults = {
|
||||
'value': 'balance',
|
||||
|
|
|
@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory):
|
|||
_description = "Account Common Report"
|
||||
|
||||
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
|
||||
res = {}
|
||||
if chart_account_id:
|
||||
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
|
||||
return {'value': {'company_id': company_id}}
|
||||
res['value'] = {'company_id': company_id}
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
|
||||
|
|
|
@ -50,9 +50,9 @@
|
|||
parent="base.menu_aftersale" action="crm_case_categ_claim0" sequence="1"/>
|
||||
|
||||
<!-- Claim Stages -->
|
||||
<menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
|
||||
<menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1"/>
|
||||
<menuitem id="menu_claim_stage_view" name="Claim Stages" action="crm_claim_stage_act" parent="base.menu_project_config_project" sequence="20"/>
|
||||
<menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -37,8 +37,8 @@ class event_type(osv.osv):
|
|||
}
|
||||
_defaults = {
|
||||
'default_registration_min': 0,
|
||||
'default_registration_max':0,
|
||||
}
|
||||
'default_registration_max': 0,
|
||||
}
|
||||
|
||||
event_type()
|
||||
|
||||
|
@ -52,8 +52,12 @@ class event_event(osv.osv):
|
|||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not ids:
|
||||
return []
|
||||
|
||||
if isinstance(ids, (long, int)):
|
||||
ids = [ids]
|
||||
|
||||
res = []
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
for record in self.browse(cr, uid, ids, context=context)
|
||||
date = record.date_begin.split(" ")[0]
|
||||
date_end = record.date_end.split(" ")[0]
|
||||
if date != date_end:
|
||||
|
|
|
@ -442,8 +442,10 @@ class hr_timesheet_sheet(osv.osv):
|
|||
return True
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
if not ids:
|
||||
return []
|
||||
if isinstance(ids, (long, int)):
|
||||
ids = [ids]
|
||||
return [(r['id'], r['date_from'] + ' - ' + r['date_to']) \
|
||||
for r in self.read(cr, uid, ids, ['date_from', 'date_to'],
|
||||
context=context, load='_classic_write')]
|
||||
|
|
|
@ -22,6 +22,7 @@ from pychart import *
|
|||
import pychart.legend
|
||||
import time
|
||||
from report.misc import choice_colors
|
||||
import tools
|
||||
|
||||
#
|
||||
# Draw a graph for stocks
|
||||
|
@ -41,7 +42,7 @@ class stock_graph(object):
|
|||
product_name=product_name.replace('/', '//')
|
||||
if product_id not in self._datas:
|
||||
self._datas[product_id] = {}
|
||||
self._names[product_id] = product_name
|
||||
self._names[product_id] = tools.ustr(product_name)
|
||||
for (dt,stock) in datas:
|
||||
if not dt in self._datas[product_id]:
|
||||
self._datas[product_id][dt]=0
|
||||
|
|
Loading…
Reference in New Issue