Merge lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth-cod into lp:openobject-addons
- trunk-improve-project-visibility-another-bth-cod
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth-cod |
Merge into: | lp:openobject-addons |
Diff against target: |
425 lines (+128/-41) 13 files modified
account_analytic_analysis/account_analytic_analysis_view.xml (+2/-1) analytic/analytic.py (+1/-1) hr_timesheet_invoice/hr_timesheet_invoice.py (+3/-0) hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml (+12/-16) product/product_view.xml (+1/-1) project/project.py (+9/-0) project/project_view.xml (+31/-12) project/static/src/css/project.css (+8/-1) project_issue/project_issue.py (+4/-1) project_issue/project_issue_view.xml (+14/-5) project_mrp/project_mrp_view.xml (+25/-0) project_timesheet/project_timesheet.py (+3/-0) project_timesheet/project_timesheet_view.xml (+15/-3) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth-cod |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mustufa Rangwala (Open ERP) (community) | Needs Fixing | ||
Review via email: mp+216980@code.launchpad.net |
Commit message
Description of the change
Hello,
I have improved some view:project form view,Task form view ,project kaban view, Contract form view and payment,and Chatter of project form view.
Thanks,
cod
- 9374. By Chirag Dodiya(OpenERP)
-
[REM]Revert code for <p> tag
- 9375. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code for <p> tag
- 9376. By Chirag Dodiya(OpenERP)
-
[IMP]moved <p> tag in project timesheet module
- 9377. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code for timesheet/
issue/phases to hide respected buttons and added css class for gantt view icon.
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote : | # |
> Do we want to add dependency of project in account_
> If no you can move the code line number 46 to 57 in diff to project module.
> Since pricelist_id field can be invisible there (no need to add extra
> dependency.)
Change: We can add pricelist_id field in project.project since project is depend on product, this will remove adding dependancy of project in account_
>
> changes line number 115 to 125 seems working in latest branch. please check.
>
> Regards,
- 9378. By Chirag Dodiya(OpenERP)
-
[IMP]Moved pricelist_id field in project module and removed depandancy
- 9379. By Chirag Dodiya(OpenERP)
-
[MRG]Merge with lp:openobejct-addons
- 9380. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9381. By Chirag Dodiya(OpenERP)
-
[IMP]Improved task form view,improved condition for issue and improved domain
- 9382. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9383. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobjet-addons
- 9384. By Chirag Dodiya(OpenERP)
-
[IMP]Removed create method and puted onchange on use timesheets field
- 9385. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9386. By Chirag Dodiya(OpenERP)
-
[IMP]Removed pricelist_id field,improved xpath,improved indentation,
improved code of on_change_project - 9387. By Chirag Dodiya(OpenERP)
-
[IMP]Improved context in service action and improved indentation
- 9388. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code to set default pricelist and removed some unused code for that
- 9389. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9390. By Chirag Dodiya(OpenERP)
-
[REM]Removed message_
get_suggested_ recipients method from analytic and puted in project
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote : | # |
Minor improvement.
product.search.bom => product.
- 9391. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9392. By Chirag Dodiya(OpenERP)
-
[REM]Removed unused file
- 9393. By Chirag Dodiya(OpenERP)
-
[IMP]Improved name with product.
product. service. search in project_view.xm - 9394. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
Unmerged revisions
- 9394. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9393. By Chirag Dodiya(OpenERP)
-
[IMP]Improved name with product.
product. service. search in project_view.xm - 9392. By Chirag Dodiya(OpenERP)
-
[REM]Removed unused file
- 9391. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9390. By Chirag Dodiya(OpenERP)
-
[REM]Removed message_
get_suggested_ recipients method from analytic and puted in project - 9389. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9388. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code to set default pricelist and removed some unused code for that
- 9387. By Chirag Dodiya(OpenERP)
-
[IMP]Improved context in service action and improved indentation
- 9386. By Chirag Dodiya(OpenERP)
-
[IMP]Removed pricelist_id field,improved xpath,improved indentation,
improved code of on_change_project - 9385. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
Preview Diff
1 | === modified file 'account_analytic_analysis/account_analytic_analysis_view.xml' |
2 | --- account_analytic_analysis/account_analytic_analysis_view.xml 2014-05-08 08:39:48 +0000 |
3 | +++ account_analytic_analysis/account_analytic_analysis_view.xml 2014-05-16 11:16:00 +0000 |
4 | @@ -139,7 +139,8 @@ |
5 | <group> |
6 | <field name="pricelist_id" |
7 | class="oe_inline" |
8 | - attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/> |
9 | + attrs="{'required': [('invoice_on_timesheets', '=', True)]}" |
10 | + groups="product.group_sale_pricelist"/> |
11 | <field name="to_invoice" |
12 | class="oe_inline" |
13 | widget="selection" |
14 | |
15 | === modified file 'analytic/analytic.py' |
16 | --- analytic/analytic.py 2014-04-01 12:36:57 +0000 |
17 | +++ analytic/analytic.py 2014-05-16 11:16:00 +0000 |
18 | @@ -38,7 +38,7 @@ |
19 | 'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj.state == 'open', |
20 | }, |
21 | } |
22 | - |
23 | + |
24 | def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None): |
25 | currency_obj = self.pool.get('res.currency') |
26 | recres = {} |
27 | |
28 | === modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py' |
29 | --- hr_timesheet_invoice/hr_timesheet_invoice.py 2014-01-15 21:44:54 +0000 |
30 | +++ hr_timesheet_invoice/hr_timesheet_invoice.py 2014-05-16 11:16:00 +0000 |
31 | @@ -74,6 +74,9 @@ |
32 | help="You usually invoice 100% of the timesheets. But if you mix fixed price and timesheet invoicing, you may use another ratio. For instance, if you do a 20% advance invoice (fixed price, based on a sales order), you should invoice the rest on timesheet with a 80% ratio."), |
33 | } |
34 | |
35 | + _defaults = { |
36 | + 'pricelist_id': lambda self, cr, uid, c: self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product', 'list0')[1] |
37 | + } |
38 | def on_change_partner_id(self, cr, uid, ids, partner_id, name, context=None): |
39 | res = super(account_analytic_account, self).on_change_partner_id(cr, uid, ids, partner_id, name, context=context) |
40 | if partner_id: |
41 | |
42 | === modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml' |
43 | --- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml 2013-10-27 12:31:04 +0000 |
44 | +++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml 2014-05-16 11:16:00 +0000 |
45 | @@ -7,22 +7,18 @@ |
46 | <field name="model">hr.timesheet.invoice.create</field> |
47 | <field name="arch" type="xml"> |
48 | <form string="Create Invoice" version="7.0"> |
49 | - <notebook> |
50 | - <page string="Billing Data"> |
51 | - <group cols="2"> |
52 | - <group string="Do you want to show details of work in invoice?" colspan="1" cols="2"> |
53 | - <field name="date"/> |
54 | - <field name="time"/> |
55 | - <field name="name"/> |
56 | - <field name="price"/> |
57 | - </group> |
58 | - <group string="Force to use a specific product" colspan="1" cols="2"> |
59 | - <p class="oe_grey" colspan="2">When reinvoicing costs, the amount on the invoice lines is given by the sale price of the corresponding product (if any, and if its sale price is not 0). You can use the following field to enforce the use of a single product for all the chosen lines in the future invoices.</p> |
60 | - <field name="product"/> |
61 | - </group> |
62 | - </group> |
63 | - </page> |
64 | - </notebook> |
65 | + <group cols="2"> |
66 | + <group string="Do you want to show details of work in invoice?" colspan="1" cols="2"> |
67 | + <field name="date"/> |
68 | + <field name="time"/> |
69 | + <field name="name"/> |
70 | + <field name="price"/> |
71 | + </group> |
72 | + <group string="Force to use a specific product" colspan="1" cols="2"> |
73 | + <p class="oe_grey" colspan="2">When reinvoicing costs, the amount on the invoice lines is given by the sale price of the corresponding product (if any, and if its sale price is not 0). You can use the following field to enforce the use of a single product for all the chosen lines in the future invoices.</p> |
74 | + <field name="product"/> |
75 | + </group> |
76 | + </group> |
77 | <footer> |
78 | <button name="do_create" string="Create Invoices" type="object" class="oe_highlight"/> |
79 | or |
80 | |
81 | === modified file 'product/product_view.xml' |
82 | --- product/product_view.xml 2014-04-25 09:04:14 +0000 |
83 | +++ product/product_view.xml 2014-05-16 11:16:00 +0000 |
84 | @@ -9,7 +9,7 @@ |
85 | <field name="arch" type="xml"> |
86 | <search string="Product"> |
87 | <field name="name" string="Product" filter_domain="['|','|',('name','ilike',self),('default_code','ilike',self),('variants','ilike',self)]"/> |
88 | - <filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/> |
89 | + <filter string="Services" name="services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/> |
90 | <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/> |
91 | <separator/> |
92 | <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/> |
93 | |
94 | === modified file 'project/project.py' |
95 | --- project/project.py 2014-05-13 11:18:37 +0000 |
96 | +++ project/project.py 2014-05-16 11:16:00 +0000 |
97 | @@ -296,6 +296,14 @@ |
98 | 'alias_model': 'project.task', |
99 | 'privacy_visibility': 'employees', |
100 | } |
101 | + |
102 | + def message_get_suggested_recipients(self, cr, uid, ids, context=None): |
103 | + recipients = super(project, self).message_get_suggested_recipients(cr, uid, ids, context=context) |
104 | + for data in self.browse(cr, uid, ids, context=context): |
105 | + if data.partner_id: |
106 | + vals = 'Customer Email' if data.partner_id.email else 'Customer' |
107 | + self._message_add_suggested_recipient(cr, uid, recipients, data, partner=data.partner_id, reason=_('%s')% vals) |
108 | + return recipients |
109 | |
110 | # TODO: Why not using a SQL contraints ? |
111 | def _check_dates(self, cr, uid, ids, context=None): |
112 | @@ -807,6 +815,7 @@ |
113 | 'user_id': lambda obj, cr, uid, ctx=None: uid, |
114 | 'company_id': lambda self, cr, uid, ctx=None: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=ctx), |
115 | 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx), |
116 | + 'date_start': fields.datetime.now, |
117 | } |
118 | _order = "priority, sequence, date_start, name, id" |
119 | |
120 | |
121 | === modified file 'project/project_view.xml' |
122 | --- project/project_view.xml 2014-05-08 15:34:32 +0000 |
123 | +++ project/project_view.xml 2014-05-16 11:16:00 +0000 |
124 | @@ -73,7 +73,7 @@ |
125 | <button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight" groups="base.group_user"/> |
126 | <button name="set_done" string="Close Project" type="object" states="open,pending" groups="base.group_user"/> |
127 | <button name="set_open" string="Re-open project" type="object" states="cancelled,close" groups="base.group_user"/> |
128 | - <button name="set_pending" string="Pending" type="object" states="open" groups="base.group_user"/> |
129 | + <button name="set_pending" string="Set as Pending" type="object" states="open" groups="base.group_user"/> |
130 | <button name="set_template" string="Set as Template" type="object" states="open" groups="base.group_user"/> |
131 | <button string="New Project Based on Template" name="duplicate_template" type="object" states="template" context="{'parent_id':parent_id}" class="oe_highlight" groups="base.group_user"/> |
132 | <button name="reset_project" string="Reset as Project" type="object" states="template" class="oe_highlight" groups="base.group_user"/> |
133 | @@ -87,9 +87,9 @@ |
134 | <h1> |
135 | <field name="name" string="Project Name"/> |
136 | </h1> |
137 | - <div name="options_active"> |
138 | + <div name="options_active" invisible="1"> |
139 | <field name="use_tasks" class="oe_inline"/> |
140 | - <label for="use_tasks"/> |
141 | + <label for="use_tasks" name="use_task"/> |
142 | </div> |
143 | </div> |
144 | <div class="oe_right oe_button_box" name="buttons" groups="base.group_user"> |
145 | @@ -109,10 +109,6 @@ |
146 | <newline/> |
147 | <field name="partner_id" on_change="onchange_partner_id(partner_id)"/> |
148 | </group> |
149 | - <p attrs="{'invisible': [('analytic_account_id','=',False)]}"> |
150 | - To invoice or setup invoicing and renewal options, go to the related contract: |
151 | - <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>. |
152 | - </p> |
153 | <group name="group_alias" |
154 | attrs="{'invisible': [('alias_domain', '=', False)]}"> |
155 | <label for="alias_name" string="Email Alias"/> |
156 | @@ -160,7 +156,7 @@ |
157 | <field name="resource_calendar_id" |
158 | groups="project.group_time_work_estimation_tasks"/> |
159 | </group> |
160 | - <group string="Miscellaneous" name="misc"> |
161 | + <group name="misc"> |
162 | <field name="date_start"/> |
163 | <field name="date" string="End Date"/> |
164 | <field name="sequence" groups="base.group_no_one"/> |
165 | @@ -170,7 +166,12 @@ |
166 | </group> |
167 | </page> |
168 | <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages"> |
169 | - <field name="type_ids"/> |
170 | + <p class="oe_grey"> |
171 | + Stages are defined globally and shared between projects. |
172 | + You can "configure all available stages".Stages are used to organize work in steps inside a project. |
173 | + In each step, you are able to change the status (validated, stopped) of the activity, no need to create specific stages for validation or blocked activities. |
174 | + </p> |
175 | + <field name="type_ids"/> |
176 | </page> |
177 | </notebook> |
178 | </sheet> |
179 | @@ -267,6 +268,10 @@ |
180 | <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> |
181 | <t t-raw="record.task_ids.raw_value.length"/> Tasks |
182 | </a> |
183 | + <div t-if="record.use_tasks.raw_value and record.task_count.raw_value lt 1" style="margin-top: 6px;margin-left:20px;"> |
184 | + <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" /> |
185 | + <span>No activity yet, click to enter in the project.</span> |
186 | + </div> |
187 | </div> |
188 | <div class="oe_kanban_project_list"> |
189 | <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a> |
190 | @@ -447,15 +452,16 @@ |
191 | <field name="sequence"/> |
192 | <field name="partner_id"/> |
193 | <field name="company_id" groups="base.group_multi_company" widget="selection"/> |
194 | + <field name="date_last_stage_update" groups="base.group_no_one"/> |
195 | </group> |
196 | <group> |
197 | <group string="Gantt View"> |
198 | + <p class="oe_grey" colspan='2'> |
199 | + Assign dates to make this task appear in the gantt chart (<span class="oe_form_gantt_avatars"></span> icon on the top right) |
200 | + </p> |
201 | <field name="date_start"/> |
202 | <field name="date_end"/> |
203 | </group> |
204 | - <group> |
205 | - <field name="date_last_stage_update" groups="base.group_no_one"/> |
206 | - </group> |
207 | </group> |
208 | </page> |
209 | </notebook> |
210 | @@ -732,6 +738,19 @@ |
211 | <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
212 | <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/> |
213 | |
214 | + <record id="product_search_form_view_procurment_consume" model="ir.ui.view"> |
215 | + <field name="name">product.product.service.search</field> |
216 | + <field name="model">product.product</field> |
217 | + <field name="inherit_id" ref="product.product_search_form_view"/> |
218 | + <field name="arch" type="xml"> |
219 | + <xpath expr="//filter[@name='services']" position="replace"> |
220 | + <filter string="Services" name="services" icon="terp-accessories-archiver" domain="[('type','=','service')]" invisible="context.get('consumable_services', False)"/> |
221 | + </xpath> |
222 | + <xpath expr="//filter[@name='consumable']" position="replace"> |
223 | + <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products" invisible="context.get('consumable_services', False)"/> |
224 | + </xpath> |
225 | + </field> |
226 | + </record> |
227 | |
228 | <record id="task_company" model="ir.ui.view"> |
229 | <field name="name">res.company.task.config</field> |
230 | |
231 | === modified file 'project/static/src/css/project.css' |
232 | --- project/static/src/css/project.css 2013-10-27 12:31:04 +0000 |
233 | +++ project/static/src/css/project.css 2014-05-16 11:16:00 +0000 |
234 | @@ -61,5 +61,12 @@ |
235 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
236 | -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
237 | } |
238 | - |
239 | +.oe_form_gantt_avatars:after { |
240 | + font-family: "mnmliconsRegular" !important; |
241 | + font-size: 21px; |
242 | + font-weight: 300 !important; |
243 | + content: "y"; |
244 | + top: 3px; |
245 | + position: relative; |
246 | +} |
247 | |
248 | |
249 | === added file 'project/static/src/img/top_left_arrow.png' |
250 | Binary files project/static/src/img/top_left_arrow.png 1970-01-01 00:00:00 +0000 and project/static/src/img/top_left_arrow.png 2014-05-16 11:16:00 +0000 differ |
251 | === modified file 'project_issue/project_issue.py' |
252 | --- project_issue/project_issue.py 2014-05-08 15:25:36 +0000 |
253 | +++ project_issue/project_issue.py 2014-05-16 11:16:00 +0000 |
254 | @@ -213,7 +213,8 @@ |
255 | if project_id: |
256 | project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) |
257 | if project and project.partner_id: |
258 | - return {'value': {'partner_id': project.partner_id.id}} |
259 | + val = True if project.parent_id.type == 'contract' else False |
260 | + return {'value': {'partner_id': project.partner_id.id, 'is_escalate': val}} |
261 | return {} |
262 | |
263 | def _get_issue_task(self, cr, uid, ids, context=None): |
264 | @@ -284,6 +285,7 @@ |
265 | 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), |
266 | 'date_action_last': fields.datetime('Last Action', readonly=1), |
267 | 'date_action_next': fields.datetime('Next Action', readonly=1), |
268 | + 'is_escalate': fields.boolean('Project Type'), |
269 | 'progress': fields.function(_hours_get, string='Progress (%)', multi='hours', group_operator="avg", help="Computed as: Time Spent / Total Time.", |
270 | store = { |
271 | 'project.issue': (lambda self, cr, uid, ids, c={}: ids, ['task_id'], 10), |
272 | @@ -300,6 +302,7 @@ |
273 | 'kanban_state': 'normal', |
274 | 'date_last_stage_update': fields.datetime.now, |
275 | 'user_id': lambda obj, cr, uid, context: uid, |
276 | + 'is_escalate': False, |
277 | } |
278 | |
279 | _group_by_full = { |
280 | |
281 | === modified file 'project_issue/project_issue_view.xml' |
282 | --- project_issue/project_issue_view.xml 2014-05-08 15:34:32 +0000 |
283 | +++ project_issue/project_issue_view.xml 2014-05-16 11:16:00 +0000 |
284 | @@ -70,8 +70,8 @@ |
285 | <label for="project_id"/> |
286 | <div> |
287 | <field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/> |
288 | - <button name="case_escalate" string="⇒ Escalate" type="object" class="oe_link" |
289 | - groups="base.group_user"/> |
290 | + <field name="is_escalate" invisible="1"/> |
291 | + <button name="case_escalate" string="⇒ Escalate" type="object" class="oe_link" attrs="{'invisible':[('is_escalate','=',False)]}" groups="base.group_user"/> |
292 | </div> |
293 | </group> |
294 | <group> |
295 | @@ -280,13 +280,16 @@ |
296 | <field name="model">project.project</field> |
297 | <field name="inherit_id" ref="project.edit_project"/> |
298 | <field name="arch" type="xml"> |
299 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
300 | + <attribute name="invisible">0</attribute> |
301 | + </xpath> |
302 | <xpath expr='//div[@name="options_active"]' position='inside'> |
303 | <field name="use_issues" class="oe_inline" |
304 | on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/> |
305 | <label for="use_issues"/> |
306 | </xpath> |
307 | <xpath expr='//div[@name="buttons"]' position='inside'> |
308 | - <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', 0)]}" |
309 | + <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', False)]}" |
310 | name="%(act_project_project_2_project_issue_all)d" icon="fa-bug"> |
311 | <field string="Issues" name="issue_count" widget="statinfo"/> |
312 | </button> |
313 | @@ -312,14 +315,20 @@ |
314 | <field name="use_issues"/> |
315 | <field name="issue_ids" invisible="1"/> |
316 | </field> |
317 | - <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
318 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after"> |
319 | <a t-if="record.use_issues.raw_value" style="margin-right: 10px" |
320 | name="%(act_project_project_2_project_issue_all)d" type="action"> |
321 | <t t-raw="record.issue_ids.raw_value.length"/> |
322 | - <span t-if="record.issue_ids.raw_value.length == 1">Issue</span> |
323 | + <span t-if="record.issue_ids.raw_value.length <= 1">Issue</span> |
324 | <span t-if="record.issue_ids.raw_value.length > 1">Issues</span> |
325 | </a> |
326 | </xpath> |
327 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/div" position="replace"> |
328 | + <div t-if="!(record.use_tasks.raw_value and record.task_count.raw_value gt 0) and !(record.use_issues.raw_value and record.issue_ids.raw_value.length gt 0)" style="margin-top: 6px;margin-left:20px;"> |
329 | + <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" /> |
330 | + <span>No activity yet, click to enter in the project.</span> |
331 | + </div> |
332 | + </xpath> |
333 | </field> |
334 | </record> |
335 | |
336 | |
337 | === modified file 'project_mrp/project_mrp_view.xml' |
338 | --- project_mrp/project_mrp_view.xml 2013-12-20 10:33:33 +0000 |
339 | +++ project_mrp/project_mrp_view.xml 2014-05-16 11:16:00 +0000 |
340 | @@ -44,6 +44,31 @@ |
341 | </field> |
342 | </field> |
343 | </record> |
344 | + <record id="open_service_type_products" model="ir.actions.act_window"> |
345 | + <field name="name">Services</field> |
346 | + <field name="res_model">product.product</field> |
347 | + <field name="view_mode">kanban,tree,form</field> |
348 | + <field name="view_type">form</field> |
349 | + <field name="search_view_id" ref="product.product_search_form_view"/> |
350 | + <field name="view_id" ref="product.product_kanban_view"/> |
351 | + <field name="context">{'default_type':'service','default_procure_method':'make_to_order','default_supply_method':'produce','default_sale_ok':True,'default_purchase_ok':False,'consumable_services':True}</field> |
352 | + <field name="domain">[('type','=','service'),('procure_method','=','make_to_order'),('supply_method','=','produce'),('sale_ok','=',True)]</field> |
353 | + <field name="help" type="html"> |
354 | + <p class="oe_view_nocontent_create"> |
355 | + Click to define a new service. |
356 | + </p><p> |
357 | + Services can be sold on quotations or sales order. |
358 | + All services defined from this menu will create tasks when the |
359 | + quotation is confirmed. |
360 | + </p><p> |
361 | + Another way to create tasks from sales is to use template of contracts |
362 | + linked to a project having pre-defined tasks that will be duplicated |
363 | + per contract reusing this project. |
364 | + </p> |
365 | + </field> |
366 | + </record> |
367 | + <menuitem id="menu_products_projects" name="Products" parent="base.menu_main_pm" sequence="3" /> |
368 | + <menuitem action="open_service_type_products" id="menu_products_services" name="Services" parent="menu_products_projects" sequence="1" /> |
369 | </data> |
370 | </openerp> |
371 | |
372 | |
373 | === modified file 'project_timesheet/project_timesheet.py' |
374 | --- project_timesheet/project_timesheet.py 2013-10-27 12:31:04 +0000 |
375 | +++ project_timesheet/project_timesheet.py 2014-05-16 11:16:00 +0000 |
376 | @@ -38,6 +38,9 @@ |
377 | factor_id = data_obj.browse(cr, uid, data_id).res_id |
378 | res['value'].update({'to_invoice': factor_id}) |
379 | return res |
380 | + |
381 | + def onchange_use_timesheets(self, cr, uid, ids, use_timesheets, context=None): |
382 | + return {'value':{'invoice_on_timesheets': use_timesheets}} |
383 | |
384 | _defaults = { |
385 | 'use_timesheets': True, |
386 | |
387 | === modified file 'project_timesheet/project_timesheet_view.xml' |
388 | --- project_timesheet/project_timesheet_view.xml 2014-04-15 12:57:15 +0000 |
389 | +++ project_timesheet/project_timesheet_view.xml 2014-05-16 11:16:00 +0000 |
390 | @@ -13,7 +13,7 @@ |
391 | <field name="currency_id"/> |
392 | <field name="partner_id"/> |
393 | </field> |
394 | - <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
395 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after"> |
396 | <a t-if="record.use_timesheets.raw_value" style="margin-right: 10px" |
397 | name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a> |
398 | </xpath> |
399 | @@ -25,12 +25,24 @@ |
400 | <field name="model">project.project</field> |
401 | <field name="inherit_id" ref="project.edit_project"/> |
402 | <field name="arch" type="xml"> |
403 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
404 | + <attribute name="invisible">0</attribute> |
405 | + </xpath> |
406 | <xpath expr='//div[@name="options_active"]' position='inside'> |
407 | - <field name="use_timesheets" class="oe_inline"/> |
408 | + <field name="invoice_on_timesheets" invisible="1"/> |
409 | + <field name="use_timesheets" class="oe_inline" on_change="onchange_use_timesheets(use_timesheets)"/> |
410 | <label for="use_timesheets"/> |
411 | </xpath> |
412 | + <xpath expr='//field[@name="partner_id"]' position='after'> |
413 | + <group colspan="2"> |
414 | + <p attrs="{'invisible': [('analytic_account_id','=',False)]}"> |
415 | + To invoice or setup invoicing and renewal options, go to the related contract: |
416 | + <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>. |
417 | + </p> |
418 | + </group> |
419 | + </xpath> |
420 | <xpath expr='//div[@name="buttons"]' position="inside"> |
421 | - <button class="oe_inline oe_stat_button" name="open_timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}" |
422 | + <button class="oe_inline oe_stat_button" name="open_timesheets" type="object" attrs="{'invisible':[('use_timesheets','=',False)]}" |
423 | icon="fa-calendar" string="Timesheets"/> |
424 | </xpath> |
425 | </field> |
Do we want to add dependency of project in account_ analytic_ analysis module. If no you can move the code line number 46 to 57 in diff to project module. Since pricelist_id field can be invisible there (no need to add extra dependency.)
changes line number 115 to 125 seems working in latest branch. please check.
Regards,