parent
9e83fed250
commit
39ae5e399b
|
@ -167,8 +167,8 @@ class account_bank_statement(osv.osv):
|
|||
|
||||
if not (abs(st.balance_end - st.balance_end_real) < 0.0001):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\n'
|
||||
'Check that the ending balance equals the computed one.'))
|
||||
_('The statement balance is incorrect !\n') +
|
||||
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configration Error !'),
|
||||
|
@ -177,7 +177,7 @@ class account_bank_statement(osv.osv):
|
|||
for line in st.move_line_ids:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The account entries lines are not valid.'))
|
||||
_('The account entries lines are not in valid state.'))
|
||||
|
||||
for move in st.line_ids:
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="action2" model="ir.actions.act_window">
|
||||
<field name="name">Hierarchical view of this employee</field>
|
||||
<field name="name">Employee Hierarchy</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.employee</field>
|
||||
<field name="domain">[('id','in',active_ids)]</field>
|
||||
|
|
|
@ -588,6 +588,7 @@ class product_supplierinfo(osv.osv):
|
|||
}
|
||||
_defaults = {
|
||||
'qty': lambda *a: 0.0,
|
||||
'sequence': lambda *a: 1,
|
||||
'delay': lambda *a: 1,
|
||||
}
|
||||
_order = 'sequence'
|
||||
|
|
|
@ -260,7 +260,7 @@ class task(osv.osv):
|
|||
'sequence': fields.integer('Sequence'),
|
||||
'type': fields.many2one('project.task.type', 'Type'),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'Status', readonly=True, required=True),
|
||||
'date_start': fields.datetime('Date'),
|
||||
'date_start': fields.datetime('Date Opened'),
|
||||
'date_deadline': fields.datetime('Deadline'),
|
||||
'date_close': fields.datetime('Date Closed', readonly=True),
|
||||
'project_id': fields.many2one('project.project', 'Project', ondelete='cascade'),
|
||||
|
@ -289,7 +289,7 @@ class task(osv.osv):
|
|||
'active': lambda *a: True,
|
||||
'date_start': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
}
|
||||
_order = "state, sequence, priority, date_deadline, id"
|
||||
_order = "sequence, priority, date_deadline, id"
|
||||
|
||||
#
|
||||
# Override view according to the company definition
|
||||
|
|
|
@ -14,10 +14,9 @@ class project_work(osv.osv):
|
|||
vals_line={}
|
||||
obj_task = self.pool.get('project.task').browse(cr, uid, vals['task_id'])
|
||||
|
||||
vals_line['name']=vals['name']
|
||||
vals_line['name']=obj_task.name + ': ' + vals['name']
|
||||
vals_line['user_id']=vals['user_id']
|
||||
c_date=datetime.date(int(vals['date'][:4]),int(vals['date'][5:7]),int(vals['date'][8:10]))
|
||||
vals_line['date']=c_date
|
||||
vals_line['date']=vals['date'][:10]
|
||||
vals_line['unit_amount']=vals['hours']
|
||||
vals_line['account_id']=obj_task.project_id.category_id.id
|
||||
vals_line['amount']=00.0
|
||||
|
@ -32,15 +31,19 @@ class project_work(osv.osv):
|
|||
def write(self, cr, uid, ids,vals,context={}):
|
||||
vals_line={}
|
||||
|
||||
line_id=self.pool.get('project.task.work').browse(cr,uid,ids)[0].hr_analytic_timesheet_id
|
||||
task=self.pool.get('project.task.work').browse(cr,uid,ids)[0]
|
||||
line_id=task.hr_analytic_timesheet_id
|
||||
# in case,if a record is deleted from timesheet,but we change it from tasks!
|
||||
list_avail_ids=self.pool.get('hr.analytic.timesheet').search(cr,uid,[])
|
||||
if line_id in list_avail_ids:
|
||||
obj = self.pool.get('hr.analytic.timesheet')
|
||||
vals_line['name']=vals['name']
|
||||
if 'name' in vals:
|
||||
vals_line['name']=task.name+': '+vals['name']
|
||||
if 'user_id' in vals:
|
||||
vals_line['user_id']=vals['user_id']
|
||||
c_date=datetime.date(int(vals['date'][:4]),int(vals['date'][5:7]),int(vals['date'][8:10]))
|
||||
vals_line['date']=c_date
|
||||
if 'date' in vals:
|
||||
vals_line['date']=vals['date'][:10]
|
||||
if 'hours' in vals:
|
||||
vals_line['unit_amount']=vals['hours']
|
||||
vals_line['amount']=(-1) * vals['hours'] * obj.browse(cr,uid,line_id).product_id.standard_price
|
||||
obj.write(cr, uid,[line_id],vals_line,{})
|
||||
|
|
|
@ -32,11 +32,11 @@ from osv import fields, osv
|
|||
|
||||
class product_product(osv.osv):
|
||||
_inherit = "product.product"
|
||||
def __old_view_header_get(self, cr, user, view_id, view_type, context):
|
||||
def view_header_get(self, cr, user, view_id, view_type, context):
|
||||
res = super(product_product, self).view_header_get(cr, user, view_id, view_type, context)
|
||||
if res: return res
|
||||
if (context.get('location', False)):
|
||||
return _('Products: ')+self.pool.get('stock.location').browse(cr, uid, context['location'], context).name
|
||||
return _('Products: ')+self.pool.get('stock.location').browse(cr, user, context['location'], context).name
|
||||
return res
|
||||
|
||||
def get_product_available(self,cr,uid,ids,context={}):
|
||||
|
@ -156,7 +156,7 @@ class product_product(osv.osv):
|
|||
'track_incoming' : fields.boolean('Track Incomming Lots', help="Force to use a Production Lot during receptions"),
|
||||
'track_outgoing' : fields.boolean('Track Outging Lots', help="Force to use a Production Lot during deliveries"),
|
||||
}
|
||||
def __old_fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False):
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False):
|
||||
res = super(product_product,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar)
|
||||
if ('location' in context) and context['location']:
|
||||
location_info = self.pool.get('stock.location').browse(cr, uid, context['location'])
|
||||
|
|
Loading…
Reference in New Issue