[MERGE] forward port of branch 7.0 up to f8b56e4
This commit is contained in:
commit
a6b11a151e
|
@ -299,3 +299,9 @@ class res_users(osv.Model):
|
||||||
except MailDeliveryException:
|
except MailDeliveryException:
|
||||||
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
|
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
|
||||||
return user_id
|
return user_id
|
||||||
|
|
||||||
|
def copy(self, cr, uid, id, default=None, context=None):
|
||||||
|
if not default or not default.get('email'):
|
||||||
|
# avoid sending email to the user we are duplicating
|
||||||
|
context = dict(context or {}, reset_password=False)
|
||||||
|
return super(res_users, self).copy(cr, uid, id, default=default, context=context)
|
||||||
|
|
|
@ -962,7 +962,7 @@ class hr_employee(osv.osv):
|
||||||
current_date = datetime.now().strftime('%Y-%m-%d')
|
current_date = datetime.now().strftime('%Y-%m-%d')
|
||||||
for employee in self.browse(cr, uid, ids, context=context):
|
for employee in self.browse(cr, uid, ids, context=context):
|
||||||
if not employee.contract_ids:
|
if not employee.contract_ids:
|
||||||
res[employee.id] = {'basic': 0.0}
|
res[employee.id] = 0.0
|
||||||
continue
|
continue
|
||||||
cr.execute( 'SELECT SUM(wage) '\
|
cr.execute( 'SELECT SUM(wage) '\
|
||||||
'FROM hr_contract '\
|
'FROM hr_contract '\
|
||||||
|
@ -971,7 +971,7 @@ class hr_employee(osv.osv):
|
||||||
'AND (date_end > %s OR date_end is NULL)',
|
'AND (date_end > %s OR date_end is NULL)',
|
||||||
(employee.id, current_date, current_date))
|
(employee.id, current_date, current_date))
|
||||||
result = dict(cr.dictfetchone())
|
result = dict(cr.dictfetchone())
|
||||||
res[employee.id] = {'basic': result['sum']}
|
res[employee.id] = result['sum']
|
||||||
return res
|
return res
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|
|
@ -545,7 +545,7 @@ openerp.mail = function (session) {
|
||||||
};
|
};
|
||||||
|
|
||||||
self.do_action(action, {
|
self.do_action(action, {
|
||||||
'on_close': function(){ self.is_log && self.parent_thread.message_fetch() }
|
'on_close': function(){ !self.parent_thread.options.view_inbox && self.parent_thread.message_fetch() }
|
||||||
});
|
});
|
||||||
self.on_cancel();
|
self.on_cancel();
|
||||||
});
|
});
|
||||||
|
|
|
@ -308,7 +308,7 @@ class mrp_production(osv.osv):
|
||||||
if l.state in ('done','cancel','draft'):
|
if l.state in ('done','cancel','draft'):
|
||||||
continue
|
continue
|
||||||
todo += l.move_dest_id_lines
|
todo += l.move_dest_id_lines
|
||||||
if l.production_id and (l.production_id.date_finished > dt):
|
if l.production_id and (l.production_id.date_finished > dt.strftime('%Y-%m-%d %H:%M:%S')):
|
||||||
if l.production_id.state not in ('done','cancel'):
|
if l.production_id.state not in ('done','cancel'):
|
||||||
for wc in l.production_id.workcenter_lines:
|
for wc in l.production_id.workcenter_lines:
|
||||||
i = self.pool.get('resource.calendar').interval_min_get(
|
i = self.pool.get('resource.calendar').interval_min_get(
|
||||||
|
|
|
@ -39,7 +39,10 @@
|
||||||
<action name="%(my_open_tasks_action)d" string="My Tasks"/>
|
<action name="%(my_open_tasks_action)d" string="My Tasks"/>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<action name="%(action_view_task_history_cumulative)d" string="Open Tasks"/>
|
<action
|
||||||
|
groups="project.group_project_user"
|
||||||
|
name="%(action_view_task_history_cumulative)d"
|
||||||
|
string="Open Tasks"/>
|
||||||
</column>
|
</column>
|
||||||
</board>
|
</board>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2313,7 +2313,7 @@ class stock_move(osv.osv):
|
||||||
if move.location_dest_id.usage != 'internal' and move.product_id.cost_method == 'average':
|
if move.location_dest_id.usage != 'internal' and move.product_id.cost_method == 'average':
|
||||||
reference_amount = qty * move.product_id.standard_price
|
reference_amount = qty * move.product_id.standard_price
|
||||||
elif move.product_id.cost_method == 'average' and move.price_unit:
|
elif move.product_id.cost_method == 'average' and move.price_unit:
|
||||||
reference_amount = qty * move.price_unit
|
reference_amount = move.product_qty * move.price_unit
|
||||||
reference_currency_id = move.price_currency_id.id or reference_currency_id
|
reference_currency_id = move.price_currency_id.id or reference_currency_id
|
||||||
|
|
||||||
# Otherwise we default to the company's valuation price type, considering that the values of the
|
# Otherwise we default to the company's valuation price type, considering that the values of the
|
||||||
|
|
|
@ -939,10 +939,13 @@ def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True,
|
||||||
# Normally the path looks like /path/to/xxx/i18n/lang.po
|
# Normally the path looks like /path/to/xxx/i18n/lang.po
|
||||||
# and we try to find the corresponding
|
# and we try to find the corresponding
|
||||||
# /path/to/xxx/i18n/xxx.pot file.
|
# /path/to/xxx/i18n/xxx.pot file.
|
||||||
|
# (Sometimes we have 'i18n_extra' instead of just 'i18n')
|
||||||
head, _ = os.path.split(fileobj.name)
|
head, _ = os.path.split(fileobj.name)
|
||||||
head2, _ = os.path.split(head)
|
head2, i18n_dir = os.path.split(head)
|
||||||
head3, tail3 = os.path.split(head2)
|
head3, module_dir = os.path.split(head2)
|
||||||
pot_handle = misc.file_open(os.path.join(head3, tail3, 'i18n', tail3 + '.pot'))
|
pot_path = os.path.join(
|
||||||
|
head3, module_dir, i18n_dir, module_dir + '.pot')
|
||||||
|
pot_handle = misc.file_open(pot_path)
|
||||||
pot_reader = TinyPoFile(pot_handle)
|
pot_reader = TinyPoFile(pot_handle)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue