diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index 6fe56bc7f12..59d86351cd6 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -139,20 +139,12 @@ for a particular financial year and for preparation of vouchers there is a modul
'project/views/report_analyticcostledgerquantity.xml',
'project/views/report_analyticcostledger.xml',
'project/views/report_invertedanalyticbalance.xml',
- ],
- 'js': [
- 'static/src/js/account_move_reconciliation.js',
- 'static/src/js/account_move_line_quickadd.js',
+ 'views/account.xml',
],
'qweb' : [
"static/src/xml/account_move_reconciliation.xml",
"static/src/xml/account_move_line_quickadd.xml",
],
- 'css':[
- 'static/src/css/account_move_reconciliation.css',
- 'static/src/css/account_move_line_quickadd.css',
- 'static/src/css/account_bank_and_cash.css',
- ],
'demo': [
'demo/account_demo.xml',
'project/project_demo.xml',
diff --git a/addons/account/account.py b/addons/account/account.py
index b87caf547ab..aa5d507b3d2 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1944,15 +1944,17 @@ class account_tax(osv.osv):
return super(account_tax, self).write(cr, uid, ids, vals, context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
+ if context is None:
+ context = {}
journal_pool = self.pool.get('account.journal')
- if context and context.has_key('type'):
+ if context.get('type'):
if context.get('type') in ('out_invoice','out_refund'):
args += [('type_tax_use','in',['sale','all'])]
elif context.get('type') in ('in_invoice','in_refund'):
args += [('type_tax_use','in',['purchase','all'])]
- if context and context.has_key('journal_id'):
+ if context.get('journal_id'):
journal = journal_pool.browse(cr, uid, context.get('journal_id'))
if journal.type in ('sale', 'purchase'):
args += [('type_tax_use','in',[journal.type,'all'])]
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index f7e561c8e24..c23f0c37115 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -409,9 +409,7 @@ class account_invoice(osv.osv):
'''
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
self.write(cr, uid, ids, {'sent': True}, context=context)
- context2 = context.copy()
- context2['active_ids'] = ids
- return self.pool['report'].get_action(cr, uid, [], 'account.report_invoice', context=context2)
+ return self.pool['report'].get_action(cr, uid, [], 'account.report_invoice', context=context)
def action_invoice_sent(self, cr, uid, ids, context=None):
'''
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index b521f3ff48c..61c397364b9 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -457,7 +457,7 @@
-
+
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 446ebc83703..729c9d16b7a 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -1034,10 +1034,14 @@ class account_move_line(osv.osv):
part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs]
unlink_ids += rec_ids
unlink_ids += part_rec_ids
+ all_moves = obj_move_line.search(cr, uid, ['|',('reconcile_id', 'in', unlink_ids),('reconcile_partial_id', 'in', unlink_ids)])
+ all_moves = list(set(all_moves) - set(move_ids))
if unlink_ids:
if opening_reconciliation:
obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False})
obj_move_rec.unlink(cr, uid, unlink_ids)
+ if all_moves:
+ obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)
return True
def unlink(self, cr, uid, ids, context=None, check=True):
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml
index a11b1089dec..829ce8dc0f0 100644
--- a/addons/account/partner_view.xml
+++ b/addons/account/partner_view.xml
@@ -65,7 +65,8 @@
@@ -333,9 +333,9 @@
-
-
-
+
+
+
@@ -367,7 +367,7 @@
+ icon="terp-mail-message-new" context= '{"default_email_to":email}' type="action"/>
@@ -434,6 +434,8 @@
+
+
diff --git a/addons/event/views/event.xml b/addons/event/views/event.xml
new file mode 100644
index 00000000000..31623659eba
--- /dev/null
+++ b/addons/event/views/event.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index 8b9352cb91b..b4f42673aba 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -19,6 +19,7 @@
#
##############################################################################
+from openerp.addons.event.event import event_event as Event
from openerp.osv import fields, osv
from openerp.tools.translate import _
@@ -137,6 +138,17 @@ class event_event(osv.osv):
pass
return []
+ def _get_ticket_events(self, cr, uid, ids, context=None):
+ # `self` is the event.event.ticket model when called by ORM!
+ return list(set(ticket.event_id.id
+ for ticket in self.browse(cr, uid, ids, context)))
+
+ # proxy method, can't import parent method directly as unbound_method: it would receive
+ # an invalid `self` when called by ORM
+ def _events_from_registrations(self, cr, uid, ids, context=None):
+ # `self` is the event.registration model when called by ORM
+ return self.pool['event.event']._get_events_from_registrations(cr, uid, ids, context=context)
+
_columns = {
'event_ticket_ids': fields.one2many('event.event.ticket', "event_id", "Event Ticket"),
'seats_max': fields.function(_get_seats_max,
@@ -144,7 +156,15 @@ class event_event(osv.osv):
help="The maximum registration level is equal to the sum of the maximum registration of event ticket." +
"If you have too much registrations you are not able to confirm your event. (0 to ignore this rule )",
type='integer',
- readonly=True)
+ readonly=True),
+ 'seats_available': fields.function(Event._get_seats, oldname='register_avail', string='Available Seats',
+ type='integer', multi='seats_reserved',
+ store={
+ 'event.registration': (_events_from_registrations, ['state'], 10),
+ 'event.event': (lambda self, cr, uid, ids, c = {}: ids,
+ ['seats_max', 'registration_ids'], 20),
+ 'event.event.ticket': (_get_ticket_events, ['seats_max'], 10),
+ }),
}
_defaults = {
'event_ticket_ids': _get_tickets
@@ -167,12 +187,23 @@ class event_ticket(osv.osv):
if ticket.seats_max > 0 else None
return res
+ def _is_expired(self, cr, uid, ids, field_name, args, context=None):
+ # FIXME: A ticket is considered expired when the deadline is passed. The deadline should
+ # be considered in the timezone of the event, not the timezone of the user!
+ # Until we add a TZ on the event we'll use the context's current date, more accurate
+ # than using UTC all the time.
+ current_date = fields.date.context_today(self, cr, uid, context=context)
+ return {ticket.id: ticket.deadline and ticket.deadline < current_date
+ for ticket in self.browse(cr, uid, ids, context=context)}
+
+
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'event_id': fields.many2one('event.event', "Event", required=True, ondelete='cascade'),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[("event_type_id", "!=", False)]),
'registration_ids': fields.one2many('event.registration', 'event_ticket_id', 'Registrations'),
'deadline': fields.date("Sales End"),
+ 'is_expired': fields.function(_is_expired, type='boolean', string='Is Expired'),
'price': fields.float('Price'),
'seats_max': fields.integer('Maximum Avalaible Seats', oldname='register_max', help="You can for each event define a maximum registration level. If you have too much registrations you are not able to confirm your event. (put 0 to ignore this rule )"),
'seats_reserved': fields.function(_get_seats, string='Reserved Seats', type='integer', multi='seats_reserved'),
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 1f42108c993..93f9bd8ffb4 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -39,6 +39,17 @@
+
+ event.registration.ticket.form
+ event.registration
+
+
+
+
+
+
+
+
product.template
diff --git a/addons/gamification/__openerp__.py b/addons/gamification/__openerp__.py
index c522e287725..0dd634099ae 100644
--- a/addons/gamification/__openerp__.py
+++ b/addons/gamification/__openerp__.py
@@ -48,12 +48,11 @@ Both goals and badges are flexibles and can be adapted to a large range of modul
'security/ir.model.access.csv',
'data/goal_base.xml',
'data/badge.xml',
+ 'views/gamification.xml',
],
'installable': True,
'application': True,
'auto_install': False,
- 'css': ['static/src/css/gamification.css'],
- 'js': ['static/src/js/gamification.js',],
'qweb': ['static/src/xml/gamification.xml'],
}
diff --git a/addons/gamification/data/badge.xml b/addons/gamification/data/badge.xml
index 33d02bf016e..cc9df921309 100644
--- a/addons/gamification/data/badge.xml
+++ b/addons/gamification/data/badge.xml
@@ -41,10 +41,6 @@
Badge Granted
-
-
-
-
Received Badge
diff --git a/addons/gamification/data/cron.xml b/addons/gamification/data/cron.xml
index 8585771c97d..105f7d25681 100644
--- a/addons/gamification/data/cron.xml
+++ b/addons/gamification/data/cron.xml
@@ -1,6 +1,6 @@
-
+
Run Goal Challenge Checker
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index c12763025f6..f249e566b9f 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -90,10 +90,6 @@
]]>
-
-
-
-
Set your Timezone
diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py
index a0c4b638ae3..ecb4c495d94 100644
--- a/addons/gamification/models/challenge.py
+++ b/addons/gamification/models/challenge.py
@@ -200,7 +200,6 @@ class gamification_challenge(osv.Model):
'visibility_mode': 'personal',
'report_message_frequency': 'never',
'last_report_date': fields.date.today,
- 'start_date': fields.date.today,
'manager_id': lambda s, cr, uid, c: uid,
'category': 'hr',
'reward_failure': False,
@@ -269,13 +268,15 @@ class gamification_challenge(osv.Model):
planned_challenge_ids = self.search(cr, uid, [
('state', '=', 'draft'),
('start_date', '<=', fields.date.today())])
- self.write(cr, uid, planned_challenge_ids, {'state': 'inprogress'}, context=context)
+ if planned_challenge_ids:
+ self.write(cr, uid, planned_challenge_ids, {'state': 'inprogress'}, context=context)
# close scheduled challenges
planned_challenge_ids = self.search(cr, uid, [
('state', '=', 'inprogress'),
('end_date', '>=', fields.date.today())])
- self.write(cr, uid, planned_challenge_ids, {'state': 'done'}, context=context)
+ if planned_challenge_ids:
+ self.write(cr, uid, planned_challenge_ids, {'state': 'done'}, context=context)
if not ids:
ids = self.search(cr, uid, [('state', '=', 'inprogress')], context=context)
diff --git a/addons/gamification/security/gamification_security.xml b/addons/gamification/security/gamification_security.xml
index 904ba50721e..5339b400061 100644
--- a/addons/gamification/security/gamification_security.xml
+++ b/addons/gamification/security/gamification_security.xml
@@ -39,5 +39,12 @@
[(1, '=', 1)]
+
+ User can only see his/her goals or goal from the same challenge in board visibility
+
+ [('user_id.company_id', 'child_of', [user.company_id.id])]
+
+
+
diff --git a/addons/gamification/static/src/js/gamification.js b/addons/gamification/static/src/js/gamification.js
index 242f67d8759..6e2e5201968 100644
--- a/addons/gamification/static/src/js/gamification.js
+++ b/addons/gamification/static/src/js/gamification.js
@@ -118,7 +118,7 @@ openerp.gamification = function(instance) {
}
});
- instance.mail.Widget.include({
+ instance.mail.Wall.include({
start: function() {
this._super();
var sidebar = new instance.gamification.Sidebar(this);
diff --git a/addons/gamification/views/gamification.xml b/addons/gamification/views/gamification.xml
new file mode 100644
index 00000000000..df5f119d6c1
--- /dev/null
+++ b/addons/gamification/views/gamification.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/gamification_sale_crm/sale_crm_goals.xml b/addons/gamification_sale_crm/sale_crm_goals.xml
index ffb3a24318a..f42585fe59a 100644
--- a/addons/gamification_sale_crm/sale_crm_goals.xml
+++ b/addons/gamification_sale_crm/sale_crm_goals.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/addons/gamification_sale_crm/sale_crm_goals_demo.xml b/addons/gamification_sale_crm/sale_crm_goals_demo.xml
index d8e26551c32..b149af31f48 100644
--- a/addons/gamification_sale_crm/sale_crm_goals_demo.xml
+++ b/addons/gamification_sale_crm/sale_crm_goals_demo.xml
@@ -4,18 +4,6 @@
-
- inprogress
-
-
-
-
-
-
-
-
-
- 2000inprogress
diff --git a/addons/google_calendar/__openerp__.py b/addons/google_calendar/__openerp__.py
index 9f2bd1256e7..18f2806976b 100644
--- a/addons/google_calendar/__openerp__.py
+++ b/addons/google_calendar/__openerp__.py
@@ -31,13 +31,12 @@ The module adds the possibility to synchronize Google Calendar with OpenERP
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['google_account','calendar'],
- 'css': ['static/src/css/*.css'],
- 'js': ['static/src/js/*.js'],
'qweb': ['static/src/xml/*.xml'],
'data': [
- 'res_config_view.xml',
- 'security/ir.model.access.csv',
- ],
+ 'res_config_view.xml',
+ 'security/ir.model.access.csv',
+ 'views/google_calendar.xml',
+ ],
'demo': [],
'installable': True,
'auto_install': False,
diff --git a/addons/google_calendar/views/google_calendar.xml b/addons/google_calendar/views/google_calendar.xml
new file mode 100644
index 00000000000..d25a2fa2406
--- /dev/null
+++ b/addons/google_calendar/views/google_calendar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/google_drive/__openerp__.py b/addons/google_drive/__openerp__.py
index e486c2c2d34..017f01b5f07 100644
--- a/addons/google_drive/__openerp__.py
+++ b/addons/google_drive/__openerp__.py
@@ -27,13 +27,11 @@
'category': 'Tools',
'installable': True,
'auto_install': False,
- 'js': [
- 'static/src/js/gdrive.js',
- ],
'data': [
'security/ir.model.access.csv',
'res_config_user_view.xml',
- 'google_drive_data.xml'
+ 'google_drive_data.xml',
+ 'views/google_drive.xml',
],
'demo': [
'google_drive_demo.xml'
diff --git a/addons/google_drive/views/google_drive.xml b/addons/google_drive/views/google_drive.xml
new file mode 100644
index 00000000000..5017f53f1a8
--- /dev/null
+++ b/addons/google_drive/views/google_drive.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/google_spreadsheet/__openerp__.py b/addons/google_spreadsheet/__openerp__.py
index 1ae2d48d349..08b08475212 100644
--- a/addons/google_spreadsheet/__openerp__.py
+++ b/addons/google_spreadsheet/__openerp__.py
@@ -31,11 +31,12 @@ The module adds the possibility to display data from OpenERP in Google Spreadshe
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['board', 'google_drive'],
- 'js': [
- 'static/src/js/search.js',
+ 'data' : [
+ 'google_spreadsheet_view.xml',
+ 'google_spreadsheet_data.xml',
+ 'views/google_spreadsheet.xml',
],
'qweb': ['static/src/xml/*.xml'],
- 'data': ['google_spreadsheet_view.xml', 'google_spreadsheet_data.xml'],
'demo': [],
'installable': True,
'auto_install': False,
diff --git a/addons/google_spreadsheet/views/google_spreadsheet.xml b/addons/google_spreadsheet/views/google_spreadsheet.xml
new file mode 100644
index 00000000000..8fe8ddfcb8c
--- /dev/null
+++ b/addons/google_spreadsheet/views/google_spreadsheet.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr/__openerp__.py b/addons/hr/__openerp__.py
index 18d57c6f299..c52eca89c8d 100644
--- a/addons/hr/__openerp__.py
+++ b/addons/hr/__openerp__.py
@@ -58,6 +58,7 @@ You can manage:
'res_config_view.xml',
'mail_hr_view.xml',
'res_users_view.xml',
+ 'views/hr.xml',
],
'demo': ['hr_demo.xml'],
'test': [
@@ -68,8 +69,6 @@ You can manage:
'installable': True,
'application': True,
'auto_install': False,
- 'css': [ 'static/src/css/hr.css' ],
- 'js': [ 'static/src/js/suggestions.js' ],
'qweb': [ 'static/src/xml/suggestions.xml' ],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr/static/description/index.html b/addons/hr/static/description/index.html
index f97cb462fe3..55e54aa92fb 100644
--- a/addons/hr/static/description/index.html
+++ b/addons/hr/static/description/index.html
@@ -28,7 +28,7 @@ Get all your HR operations managed easily: knowledge sharing, recruitments, appr
Manage Your Employees
-Oversee all important information in your company address book. Some information are restricted to HR managers, others are public to easily find colleagues.
+Oversee all important information in your company address book. Some information are restricted to HR managers, others are public to easily look colleagues.
Record employee contracts and get alerts when they have to be renewed.
@@ -154,7 +154,7 @@ Inspire achievement with challenges, goals and rewards. Define clear objectives