Merge lp:~openerp-dev/openobject-addons/trunk-project-onboarding-imp-msa into lp:~openerp-dev/openobject-addons/trunk-project-onboarding

Proposed by Mitesh Savani (OpenERP)
Status: Merged
Merged at revision: 9409
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-project-onboarding-imp-msa
Merge into: lp:~openerp-dev/openobject-addons/trunk-project-onboarding
Diff against target: 179 lines (+43/-14)
9 files modified
calendar/controllers/main.py (+9/-2)
edi/controllers/main.py (+12/-2)
point_of_sale/controllers/main.py (+1/-1)
project/project.py (+8/-0)
project/project_view.xml (+7/-1)
project/static/src/css/project.css (+3/-1)
project_timesheet/project_timesheet_view.xml (+1/-1)
website/views/website_templates.xml (+1/-3)
website_sale/views/website_sale.xml (+1/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-project-onboarding-imp-msa
Reviewer Review Type Date Requested Status
OpenERP R&D Team Pending
Review via email: mp+218557@code.launchpad.net

Description of the change

[ADD]: Add image in kanban view of project.task which is attached in task comments.

project_timesheet: if there is zero hour than it will not display in project kanban view.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'calendar/controllers/main.py'
--- calendar/controllers/main.py 2014-05-06 16:33:34 +0000
+++ calendar/controllers/main.py 2014-05-07 07:01:55 +0000
@@ -48,8 +48,15 @@
48 if attendee:48 if attendee:
49 attendee_data['current_attendee'] = attendee[0]49 attendee_data['current_attendee'] = attendee[0]
5050
51 values = dict(init="s.calendar.event('%s', '%s', '%s', '%s' , '%s');" % (db, action, id, 'form', json.dumps(attendee_data)))51 css = '<link rel="stylesheet" href="/web/css/web.assets_backend"/>'
52 return request.render('web.webclient_bootstrap', values)52 js = '<script type="text/javascript" src="/web/js/web.assets_backend"></script>'
53
54 return webmain.html_template % {
55 'js': js,
56 'css': css,
57 'modules': simplejson.dumps(webmain.module_boot(db)),
58 'init': "s.calendar.event('%s', '%s', '%s', '%s' , '%s');" % (db, action, id, 'form', json.dumps(attendee_data)),
59 }
5360
54 # Function used, in RPC to check every 5 minutes, if notification to do for an event or not61 # Function used, in RPC to check every 5 minutes, if notification to do for an event or not
55 @http.route('/calendar/notify', type='json', auth="none")62 @http.route('/calendar/notify', type='json', auth="none")
5663
=== modified file 'edi/controllers/main.py'
--- edi/controllers/main.py 2014-05-06 16:33:34 +0000
+++ edi/controllers/main.py 2014-05-07 07:01:55 +0000
@@ -1,3 +1,4 @@
1import simplejson
1import werkzeug.urls2import werkzeug.urls
23
3import openerp4import openerp
@@ -9,12 +10,21 @@
9 def import_url(self, url):10 def import_url(self, url):
10 # http://hostname:8069/edi/import_url?url=URIEncodedURL11 # http://hostname:8069/edi/import_url?url=URIEncodedURL
11 req = openerp.http.request12 req = openerp.http.request
13 modules = webmain.module_boot(req) + ['edi']
14 modules_str = ','.join(modules)
15 modules_json = simplejson.dumps(modules)
16 css = '<link rel="stylesheet" href="/web/css/web.assets_backend"/>'
17 js = '<script type="text/javascript" src="/web/js/web.assets_backend"></script>'
1218
13 # `url` may contain a full URL with a valid query string, we basically want to watch out for XML brackets and double-quotes 19 # `url` may contain a full URL with a valid query string, we basically want to watch out for XML brackets and double-quotes
14 safe_url = werkzeug.url_quote_plus(url,':/?&;=')20 safe_url = werkzeug.url_quote_plus(url,':/?&;=')
1521
16 values = dict(init='s.edi.edi_import("%s");' % safe_url)22 return webmain.html_template % {
17 return req.render('web.webclient_bootstrap', values)23 'js': js,
24 'css': css,
25 'modules': modules_json,
26 'init': 's.edi.edi_import("%s");' % safe_url,
27 }
1828
19 @openerp.http.route('/edi/import_edi_url', type='json', auth='none')29 @openerp.http.route('/edi/import_edi_url', type='json', auth='none')
20 def import_edi_url(self, url):30 def import_edi_url(self, url):
2131
=== modified file 'point_of_sale/controllers/main.py'
--- point_of_sale/controllers/main.py 2014-05-06 16:33:34 +0000
+++ point_of_sale/controllers/main.py 2014-05-07 07:01:55 +0000
@@ -8,7 +8,7 @@
88
9from openerp import http9from openerp import http
10from openerp.http import request10from openerp.http import request
11from openerp.addons.web.controllers.main import module_boot, login_redirect11from openerp.addons.web.controllers.main import manifest_list, module_boot, html_template, login_redirect
1212
13_logger = logging.getLogger(__name__)13_logger = logging.getLogger(__name__)
1414
1515
=== modified file 'project/project.py'
--- project/project.py 2014-05-06 07:04:47 +0000
+++ project/project.py 2014-05-07 07:01:55 +0000
@@ -795,6 +795,13 @@
795 for work in self.pool.get('project.task.work').browse(cr, uid, ids, context=context):795 for work in self.pool.get('project.task.work').browse(cr, uid, ids, context=context):
796 if work.task_id: result[work.task_id.id] = True796 if work.task_id: result[work.task_id.id] = True
797 return result.keys()797 return result.keys()
798 def _get_attachment(self, cr, uid, ids, field_name, arg, context):
799 res={}
800 attachment_obj=self.pool.get('ir.attachment')
801 for result in self.browse(cr, uid, ids, context=None):
802 attachment_id=attachment_obj.search(cr, uid, [('res_id','=',result.id)])
803 res[result.id]= attachment_id
804 return res
798805
799 _columns = {806 _columns = {
800 'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),807 'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
@@ -853,6 +860,7 @@
853 'id': fields.integer('ID', readonly=True),860 'id': fields.integer('ID', readonly=True),
854 'color': fields.integer('Color Index'),861 'color': fields.integer('Color Index'),
855 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),862 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
863 'attachment_res':fields.function(_get_attachment,type='many2many',relation="ir.attachment",string="attachments",readonly=True),
856 }864 }
857 _defaults = {865 _defaults = {
858 'stage_id': _get_default_stage_id,866 'stage_id': _get_default_stage_id,
859867
=== modified file 'project/project_view.xml'
--- project/project_view.xml 2014-05-06 08:39:37 +0000
+++ project/project_view.xml 2014-05-07 07:01:55 +0000
@@ -531,9 +531,10 @@
531 <field name="date_deadline"/>531 <field name="date_deadline"/>
532 <field name="message_summary"/>532 <field name="message_summary"/>
533 <field name="categ_ids"/>533 <field name="categ_ids"/>
534 <field name="attachment_res"/>
534 <templates>535 <templates>
535 <t t-name="kanban-box">536 <t t-name="kanban-box">
536 <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">537 <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_task">
537 <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">538 <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
538 <span class="oe_e">í</span>539 <span class="oe_e">í</span>
539 <ul class="oe_dropdown_menu">540 <ul class="oe_dropdown_menu">
@@ -579,6 +580,11 @@
579 <t t-raw="record.message_summary.raw_value"/>580 <t t-raw="record.message_summary.raw_value"/>
580 <field name="categ_ids"/>581 <field name="categ_ids"/>
581 </div>582 </div>
583 <div>
584 <t t-foreach="record.attachment_res.raw_value.slice(0,3)" t-as="attachment_img">
585 <img t-att-src="kanban_image('ir.attachment', 'datas', attachment_img)" class="oe_kanban_image" t-att-data-member_id="attachment_img"/>
586 </t>
587 </div>
582 </div>588 </div>
583 <div class="oe_clear"></div>589 <div class="oe_clear"></div>
584 </div>590 </div>
585591
=== modified file 'project/static/src/css/project.css'
--- project/static/src/css/project.css 2014-05-06 06:04:33 +0000
+++ project/static/src/css/project.css 2014-05-07 07:01:55 +0000
@@ -6,7 +6,9 @@
6.oe_kanban_project_list > a > span:hover{6.oe_kanban_project_list > a > span:hover{
7 text-decoration: underline;7 text-decoration: underline;
8}8}
99.oe_kanban_task{
10 width: 275px;
11}
10.openerp .project_kanban_content{12.openerp .project_kanban_content{
11 margin-right: 15px;13 margin-right: 15px;
12 margin-left: 15px;14 margin-left: 15px;
1315
=== modified file 'project_timesheet/project_timesheet_view.xml'
--- project_timesheet/project_timesheet_view.xml 2014-05-05 06:37:08 +0000
+++ project_timesheet/project_timesheet_view.xml 2014-05-07 07:01:55 +0000
@@ -14,7 +14,7 @@
14 <field name="partner_id"/>14 <field name="partner_id"/>
15 </field>15 </field>
16 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">16 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
17 <a t-if="record.use_timesheets.raw_value" style="margin-right: 10px"17 <a t-if="record.use_timesheets.raw_value and record.hours_quantity > 0" style="margin-right: 10px"
18 name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a>18 name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a>
19 </xpath>19 </xpath>
20 </field>20 </field>
2121
=== modified file 'website/views/website_templates.xml'
--- website/views/website_templates.xml 2014-05-06 15:33:35 +0000
+++ website/views/website_templates.xml 2014-05-07 07:01:55 +0000
@@ -276,9 +276,7 @@
276 <script type="text/javascript" src="/website/static/lib/ace/theme-monokai.js"></script>276 <script type="text/javascript" src="/website/static/lib/ace/theme-monokai.js"></script>
277 <script type="text/javascript" src="/website/static/lib/ace/mode-xml.js"></script>277 <script type="text/javascript" src="/website/static/lib/ace/mode-xml.js"></script>
278 <script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>278 <script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>
279 <t t-call="web.jqueryui_conflict">279 <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
280 <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
281 </t>
282 <!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->280 <!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->
283 <script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>281 <script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>
284 <script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>282 <script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>
285283
=== modified file 'website_sale/views/website_sale.xml'
--- website_sale/views/website_sale.xml 2014-05-06 15:33:35 +0000
+++ website_sale/views/website_sale.xml 2014-05-07 07:01:55 +0000
@@ -95,9 +95,7 @@
95<template id="products" name="Products">95<template id="products" name="Products">
96 <t t-call="website.layout">96 <t t-call="website.layout">
97 <t t-set="head">97 <t t-set="head">
98 <t t-call="web.jqueryui_conflict">98 <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
99 <script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
100 </t>
101 <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>99 <link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
102 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>100 <script type="text/javascript" src="/website_sale/static/src/js/website_sale.js"></script>
103 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>101 <link rel='stylesheet' href='/website_sale/static/src/css/website_sale.css'/>

Subscribers

People subscribed via source and target branches

to all changes: