Merge lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth into lp:openobject-addons
- trunk-improve-project-visibility-another-bth
- Merge into trunk
Proposed by
Antony Lesuisse (OpenERP)
Status: | Work in progress |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth |
Merge into: | lp:openobject-addons |
Diff against target: |
488 lines (+153/-37) 16 files modified
account_analytic_analysis/__openerp__.py (+1/-1) account_analytic_analysis/account_analytic_analysis.py (+4/-0) account_analytic_analysis/account_analytic_analysis_view.xml (+14/-1) analytic/analytic.py (+10/-1) hr_timesheet_invoice/hr_timesheet_invoice.py (+7/-0) hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml (+12/-16) procurement/procurement_view.xml (+1/-1) project/project.py (+8/-0) project/project_demo.xml (+1/-0) project/project_view.xml (+32/-10) project_issue/project_issue.py (+7/-2) project_issue/project_issue_view.xml (+12/-3) project_long_term/project_long_term_view.xml (+3/-0) project_mrp/project_mrp_view.xml (+28/-0) project_mrp/project_procurement.py (+1/-1) project_timesheet/project_timesheet_view.xml (+12/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-another-bth |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+206507@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 9087. By Niko (OpenERP)
-
[IMP] Add some video to manisfest ( website, website_blog, website_event, website_ecommerce)
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_analytic_analysis/__openerp__.py' |
2 | --- account_analytic_analysis/__openerp__.py 2013-10-27 12:31:04 +0000 |
3 | +++ account_analytic_analysis/__openerp__.py 2014-02-14 15:15:55 +0000 |
4 | @@ -33,7 +33,7 @@ |
5 | 'author': 'Camptocamp', |
6 | 'website': 'http://www.camptocamp.com/', |
7 | 'images': ['images/bill_tasks_works.jpeg','images/overpassed_accounts.jpeg'], |
8 | - 'depends': ['hr_timesheet_invoice', 'sale'], #although sale is technically not required to install this module, all menuitems are located under 'Sales' application |
9 | + 'depends': ['hr_timesheet_invoice', 'sale', 'project'], #although sale is technically not required to install this module, all menuitems are located under 'Sales' application |
10 | 'data': [ |
11 | 'security/ir.model.access.csv', |
12 | 'security/account_analytic_analysis_security.xml', |
13 | |
14 | === modified file 'account_analytic_analysis/account_analytic_analysis.py' |
15 | --- account_analytic_analysis/account_analytic_analysis.py 2014-02-05 16:03:47 +0000 |
16 | +++ account_analytic_analysis/account_analytic_analysis.py 2014-02-14 15:15:55 +0000 |
17 | @@ -526,6 +526,10 @@ |
18 | 'recurring_rule_type':'monthly' |
19 | } |
20 | |
21 | + def create(self, cr, uid, vals, context=None): |
22 | + vals.update({'invoice_on_timesheets': vals.get('use_timesheets', False)}) |
23 | + return super(account_analytic_account, self).create(cr, uid, vals, context=context) |
24 | + |
25 | def open_sale_order_lines(self,cr,uid,ids,context=None): |
26 | if context is None: |
27 | context = {} |
28 | |
29 | === modified file 'account_analytic_analysis/account_analytic_analysis_view.xml' |
30 | --- account_analytic_analysis/account_analytic_analysis_view.xml 2014-02-05 16:03:47 +0000 |
31 | +++ account_analytic_analysis/account_analytic_analysis_view.xml 2014-02-14 15:15:55 +0000 |
32 | @@ -139,7 +139,8 @@ |
33 | <group> |
34 | <field name="pricelist_id" |
35 | class="oe_inline" |
36 | - attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/> |
37 | + attrs="{'required': [('invoice_on_timesheets', '=', True)]}" |
38 | + groups="product.group_sale_pricelist"/> |
39 | <field name="to_invoice" |
40 | class="oe_inline" |
41 | widget="selection" |
42 | @@ -336,5 +337,17 @@ |
43 | </record> |
44 | <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/> |
45 | |
46 | + <!-- Add analytic_account_id field in project form view --> |
47 | + <record id="timesheet_inherit_project_analytic_account_field" model="ir.ui.view"> |
48 | + <field name="name">account.analytic.account.project.inherit</field> |
49 | + <field name="model">project.project</field> |
50 | + <field name="inherit_id" ref="project.edit_project"/> |
51 | + <field name="arch" type="xml"> |
52 | + <xpath expr="//field[@name='partner_id']" position='after'> |
53 | + <field name="pricelist_id" invisible="1"/> |
54 | + </xpath> |
55 | + </field> |
56 | + </record> |
57 | + |
58 | </data> |
59 | </openerp> |
60 | |
61 | === modified file 'analytic/analytic.py' |
62 | --- analytic/analytic.py 2014-02-10 05:26:55 +0000 |
63 | +++ analytic/analytic.py 2014-02-14 15:15:55 +0000 |
64 | @@ -38,7 +38,16 @@ |
65 | 'analytic.mt_account_opened': lambda self, cr, uid, obj, ctx=None: obj.state == 'open', |
66 | }, |
67 | } |
68 | - |
69 | + |
70 | + def message_get_suggested_recipients(self, cr, uid, ids, context=None): |
71 | + recipients = super(account_analytic_account, self).message_get_suggested_recipients(cr, uid, ids, context=context) |
72 | + for data in self.browse(cr, uid, ids, context=context): |
73 | + if data.partner_id: |
74 | + self._message_add_suggested_recipient(cr, uid, recipients, data, partner=data.partner_id, reason=_('Customer')) |
75 | + elif data.partner_id.email: |
76 | + self._message_add_suggested_recipient(cr, uid, recipients, data, email=data.partner_id.email, reason=_('Customer Email')) |
77 | + return recipients |
78 | + |
79 | def _compute_level_tree(self, cr, uid, ids, child_ids, res, field_names, context=None): |
80 | currency_obj = self.pool.get('res.currency') |
81 | recres = {} |
82 | |
83 | === modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py' |
84 | --- hr_timesheet_invoice/hr_timesheet_invoice.py 2014-01-15 21:44:54 +0000 |
85 | +++ hr_timesheet_invoice/hr_timesheet_invoice.py 2014-02-14 15:15:55 +0000 |
86 | @@ -62,6 +62,10 @@ |
87 | |
88 | return res |
89 | |
90 | + def _get_default_pricelist(self, cr, uid, context=None): |
91 | + model, pricelist = self.pool.get("ir.model.data").get_object_reference(cr, uid, 'product', 'list0') |
92 | + return pricelist |
93 | + |
94 | _inherit = "account.analytic.account" |
95 | _columns = { |
96 | 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', |
97 | @@ -74,6 +78,9 @@ |
98 | 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."), |
99 | } |
100 | |
101 | + _defaults = { |
102 | + 'pricelist_id': _get_default_pricelist |
103 | + } |
104 | def on_change_partner_id(self, cr, uid, ids, partner_id, name, context=None): |
105 | res = super(account_analytic_account, self).on_change_partner_id(cr, uid, ids, partner_id, name, context=context) |
106 | if partner_id: |
107 | |
108 | === modified file 'hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml' |
109 | --- hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml 2013-10-27 12:31:04 +0000 |
110 | +++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml 2014-02-14 15:15:55 +0000 |
111 | @@ -7,22 +7,18 @@ |
112 | <field name="model">hr.timesheet.invoice.create</field> |
113 | <field name="arch" type="xml"> |
114 | <form string="Create Invoice" version="7.0"> |
115 | - <notebook> |
116 | - <page string="Billing Data"> |
117 | - <group cols="2"> |
118 | - <group string="Do you want to show details of work in invoice?" colspan="1" cols="2"> |
119 | - <field name="date"/> |
120 | - <field name="time"/> |
121 | - <field name="name"/> |
122 | - <field name="price"/> |
123 | - </group> |
124 | - <group string="Force to use a specific product" colspan="1" cols="2"> |
125 | - <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> |
126 | - <field name="product"/> |
127 | - </group> |
128 | - </group> |
129 | - </page> |
130 | - </notebook> |
131 | + <group cols="2"> |
132 | + <group string="Do you want to show details of work in invoice?" colspan="1" cols="2"> |
133 | + <field name="date"/> |
134 | + <field name="time"/> |
135 | + <field name="name"/> |
136 | + <field name="price"/> |
137 | + </group> |
138 | + <group string="Force to use a specific product" colspan="1" cols="2"> |
139 | + <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> |
140 | + <field name="product"/> |
141 | + </group> |
142 | + </group> |
143 | <footer> |
144 | <button name="do_create" string="Create Invoices" type="object" class="oe_highlight"/> |
145 | or |
146 | |
147 | === modified file 'procurement/procurement_view.xml' |
148 | --- procurement/procurement_view.xml 2014-01-22 09:58:26 +0000 |
149 | +++ procurement/procurement_view.xml 2014-02-14 15:15:55 +0000 |
150 | @@ -343,7 +343,7 @@ |
151 | <field name="inherit_id" ref="product.product_search_form_view"/> |
152 | <field name="arch" type="xml"> |
153 | <filter name="consumable" position="before"> |
154 | - <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/> |
155 | + <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products" invisible="context.get('consumable_services', False)"/> |
156 | </filter> |
157 | </field> |
158 | </record> |
159 | |
160 | === modified file 'project/project.py' |
161 | --- project/project.py 2014-01-15 21:44:54 +0000 |
162 | +++ project/project.py 2014-02-14 15:15:55 +0000 |
163 | @@ -304,6 +304,12 @@ |
164 | 'alias_model': 'project.task', |
165 | 'privacy_visibility': 'employees', |
166 | } |
167 | + |
168 | + def message_get_suggested_recipients(self, cr, uid, ids, context=None): |
169 | + res = {} |
170 | + for project in self.browse(cr, uid, ids, context=context): |
171 | + res[project.id] = project.analytic_account_id.message_get_suggested_recipients(context=context)[project.analytic_account_id.id] |
172 | + return res |
173 | |
174 | # TODO: Why not using a SQL contraints ? |
175 | def _check_dates(self, cr, uid, ids, context=None): |
176 | @@ -818,6 +824,7 @@ |
177 | 'user_id': lambda obj, cr, uid, ctx=None: uid, |
178 | 'company_id': lambda self, cr, uid, ctx=None: self.pool.get('res.company')._company_default_get(cr, uid, 'project.task', context=ctx), |
179 | 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx), |
180 | + 'date_start': fields.datetime.now, |
181 | } |
182 | _order = "priority, sequence, date_start, name, id" |
183 | |
184 | @@ -1282,6 +1289,7 @@ |
185 | 'use_tasks': True |
186 | } |
187 | |
188 | + |
189 | class project_task_history(osv.osv): |
190 | """ |
191 | Tasks History, used for cumulative flow charts (Lean/Agile) |
192 | |
193 | === modified file 'project/project_demo.xml' |
194 | --- project/project_demo.xml 2013-11-27 15:32:57 +0000 |
195 | +++ project/project_demo.xml 2014-02-14 15:15:55 +0000 |
196 | @@ -256,6 +256,7 @@ |
197 | <field name="name">Dataflow Design</field> |
198 | <field name="stage_id" ref="project_tt_analysis"/> |
199 | </record> |
200 | + |
201 | <record id="project_task_15" model="project.task"> |
202 | <field name="planned_hours" eval="55.0"/> |
203 | <field name="remaining_hours" eval="55.0"/> |
204 | |
205 | === modified file 'project/project_view.xml' |
206 | --- project/project_view.xml 2013-12-24 10:29:22 +0000 |
207 | +++ project/project_view.xml 2014-02-14 15:15:55 +0000 |
208 | @@ -73,7 +73,7 @@ |
209 | <button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight" groups="base.group_user"/> |
210 | <button name="set_done" string="Close Project" type="object" states="open,pending" groups="base.group_user"/> |
211 | <button name="set_open" string="Re-open project" type="object" states="cancelled,close" groups="base.group_user"/> |
212 | - <button name="set_pending" string="Pending" type="object" states="open" groups="base.group_user"/> |
213 | + <button name="set_pending" string="Set as Pending" type="object" states="open" groups="base.group_user"/> |
214 | <button name="set_template" string="Set as Template" type="object" states="open" groups="base.group_user"/> |
215 | <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"/> |
216 | <button name="reset_project" string="Reset as Project" type="object" states="template" class="oe_highlight" groups="base.group_user"/> |
217 | @@ -87,9 +87,9 @@ |
218 | <h1> |
219 | <field name="name" string="Project Name"/> |
220 | </h1> |
221 | - <div name="options_active"> |
222 | + <div name="options_active" invisible="1"> |
223 | <field name="use_tasks" class="oe_inline"/> |
224 | - <label for="use_tasks"/> |
225 | + <label for="use_tasks" name="use_task"/> |
226 | </div> |
227 | </div> |
228 | <div class="oe_right oe_button_box" name="buttons" groups="base.group_user"> |
229 | @@ -102,11 +102,8 @@ |
230 | attrs="{'readonly':[('state','in',['close', 'cancelled'])]}" |
231 | context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_manager']}"/> |
232 | <field name="partner_id" on_change="onchange_partner_id(partner_id)"/> |
233 | - <span></span> |
234 | - <p attrs="{'invisible': [('analytic_account_id','=',False)]}"> |
235 | - To invoice or setup invoicing and renewal options, go to the related contract: |
236 | - <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>. |
237 | - </p> |
238 | + </group> |
239 | + <group attrs="{'invisible': [('alias_domain', '!=', False)]}"> |
240 | </group> |
241 | <group name="group_alias" |
242 | attrs="{'invisible': [('alias_domain', '=', False)]}"> |
243 | @@ -165,7 +162,12 @@ |
244 | </group> |
245 | </page> |
246 | <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages"> |
247 | - <field name="type_ids"/> |
248 | + <p class="oe_grey"> |
249 | + Stages are defined globally and shared between projects. |
250 | + You can "configure all available stages".Stages are used to organize work in steps inside a project. |
251 | + 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. |
252 | + </p> |
253 | + <field name="type_ids"/> |
254 | </page> |
255 | </notebook> |
256 | </sheet> |
257 | @@ -262,6 +264,10 @@ |
258 | <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> |
259 | <t t-raw="record.task_ids.raw_value.length"/> Tasks |
260 | </a> |
261 | + <div t-if="record.use_tasks.raw_value and record.task_count.raw_value lt 1" style="margin-top: 6px;margin-left:20px;"> |
262 | + <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" /> |
263 | + <span>No activity yet, click to enter in the project.</span> |
264 | + </div> |
265 | </div> |
266 | <div class="oe_kanban_project_list"> |
267 | <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a> |
268 | @@ -440,12 +446,15 @@ |
269 | <page string="Extra Info"> |
270 | <group col="4"> |
271 | <field name="priority" groups="base.group_user"/> |
272 | - <field name="sequence"/> |
273 | + <field name="sequence" groups="base.group_no_one"/> |
274 | <field name="partner_id"/> |
275 | <field name="company_id" groups="base.group_multi_company" widget="selection"/> |
276 | </group> |
277 | <group> |
278 | <group string="Gantt View"> |
279 | + <p class="oe_grey" colspan='2'> |
280 | + Assign dates to make this task appear in the gantt chart (<span class="oe_form_gantt_avatars">y</span> icon on the top right) |
281 | + </p> |
282 | <field name="date_start"/> |
283 | <field name="date_end"/> |
284 | </group> |
285 | @@ -731,6 +740,19 @@ |
286 | <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
287 | <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/> |
288 | |
289 | + <record id="product_search_form_view_procurment_consume" model="ir.ui.view"> |
290 | + <field name="name">product.search.bom</field> |
291 | + <field name="model">product.product</field> |
292 | + <field name="inherit_id" ref="product.product_search_form_view"/> |
293 | + <field name="arch" type="xml"> |
294 | + <xpath expr="//filter[@string='Services']" position="replace"> |
295 | + <filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]" invisible="context.get('consumable_services', False)"/> |
296 | + </xpath> |
297 | + <xpath expr="//filter[@name='consumable']" position="replace"> |
298 | + <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products" invisible="context.get('consumable_services', False)"/> |
299 | + </xpath> |
300 | + </field> |
301 | + </record> |
302 | |
303 | <record id="task_company" model="ir.ui.view"> |
304 | <field name="name">res.company.task.config</field> |
305 | |
306 | === added file 'project/static/src/img/top_left_arrow.png' |
307 | 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-02-14 15:15:55 +0000 differ |
308 | === modified file 'project_issue/project_issue.py' |
309 | --- project_issue/project_issue.py 2013-12-02 15:09:25 +0000 |
310 | +++ project_issue/project_issue.py 2014-02-14 15:15:55 +0000 |
311 | @@ -210,8 +210,11 @@ |
312 | def on_change_project(self, cr, uid, ids, project_id, context=None): |
313 | if project_id: |
314 | project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) |
315 | - if project and project.partner_id: |
316 | - return {'value': {'partner_id': project.partner_id.id}} |
317 | + if project.parent_id.type == "contract": |
318 | + val = True |
319 | + else : |
320 | + val = False |
321 | + return {'value': {'partner_id': project.partner_id.id, 'is_escalate': val}} |
322 | return {} |
323 | |
324 | def _get_issue_task(self, cr, uid, ids, context=None): |
325 | @@ -283,6 +286,7 @@ |
326 | 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), |
327 | 'date_action_last': fields.datetime('Last Action', readonly=1), |
328 | 'date_action_next': fields.datetime('Next Action', readonly=1), |
329 | + 'is_escalate': fields.boolean('Project Type'), |
330 | 'progress': fields.function(_hours_get, string='Progress (%)', multi='hours', group_operator="avg", help="Computed as: Time Spent / Total Time.", |
331 | store = { |
332 | 'project.issue': (lambda self, cr, uid, ids, c={}: ids, ['task_id'], 10), |
333 | @@ -299,6 +303,7 @@ |
334 | 'kanban_state': 'normal', |
335 | 'date_last_stage_update': fields.datetime.now, |
336 | 'user_id': lambda obj, cr, uid, context: uid, |
337 | + 'is_escalate': False, |
338 | } |
339 | |
340 | _group_by_full = { |
341 | |
342 | === modified file 'project_issue/project_issue_view.xml' |
343 | --- project_issue/project_issue_view.xml 2013-11-29 09:46:10 +0000 |
344 | +++ project_issue/project_issue_view.xml 2014-02-14 15:15:55 +0000 |
345 | @@ -71,8 +71,8 @@ |
346 | <label for="project_id"/> |
347 | <div> |
348 | <field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/> |
349 | - <button name="case_escalate" string="⇒ Escalate" type="object" class="oe_link" |
350 | - groups="base.group_user"/> |
351 | + <field name="is_escalate" invisible="1"/> |
352 | + <button name="case_escalate" string="⇒ Escalate" type="object" class="oe_link" attrs="{'invisible':[('is_escalate','=',False)]}" groups="base.group_user"/> |
353 | </div> |
354 | </group> |
355 | <group> |
356 | @@ -299,6 +299,9 @@ |
357 | <field name="model">project.project</field> |
358 | <field name="inherit_id" ref="project.edit_project"/> |
359 | <field name="arch" type="xml"> |
360 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
361 | + <attribute name="invisible">0</attribute> |
362 | + </xpath> |
363 | <xpath expr='//div[@name="options_active"]' position='inside'> |
364 | <field name="use_issues" class="oe_inline" |
365 | on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/> |
366 | @@ -328,7 +331,7 @@ |
367 | <field name="use_issues"/> |
368 | <field name="issue_ids" invisible="1"/> |
369 | </field> |
370 | - <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
371 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after"> |
372 | <a t-if="record.use_issues.raw_value" style="margin-right: 10px" |
373 | name="%(act_project_project_2_project_issue_all)d" type="action"> |
374 | <t t-raw="record.issue_ids.raw_value.length"/> |
375 | @@ -336,6 +339,12 @@ |
376 | <span t-if="record.issue_ids.raw_value.length > 1">Issues</span> |
377 | </a> |
378 | </xpath> |
379 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/div" position="replace"> |
380 | + <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_count.raw_value gt 0)" style="margin-top: 6px;margin-left:20px;"> |
381 | + <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" /> |
382 | + <span>No activity yet, click to enter in the project.</span> |
383 | + </div> |
384 | + </xpath> |
385 | </field> |
386 | </record> |
387 | |
388 | |
389 | === modified file 'project_long_term/project_long_term_view.xml' |
390 | --- project_long_term/project_long_term_view.xml 2013-10-27 12:31:04 +0000 |
391 | +++ project_long_term/project_long_term_view.xml 2014-02-14 15:15:55 +0000 |
392 | @@ -97,6 +97,9 @@ |
393 | <field name="model">project.project</field> |
394 | <field name="inherit_id" ref="project.edit_project"/> |
395 | <field name="arch" type="xml"> |
396 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
397 | + <attribute name="invisible">0</attribute> |
398 | + </xpath> |
399 | <xpath expr="//div[@name='options_active']" position='inside'> |
400 | <field name="use_phases" class="oe_inline"/> |
401 | <label for="use_phases"/> |
402 | |
403 | === modified file 'project_mrp/project_mrp_view.xml' |
404 | --- project_mrp/project_mrp_view.xml 2013-10-27 12:31:04 +0000 |
405 | +++ project_mrp/project_mrp_view.xml 2014-02-14 15:15:55 +0000 |
406 | @@ -58,6 +58,34 @@ |
407 | </group> |
408 | </field> |
409 | </record> |
410 | + |
411 | + <record id="open_service_type_products" model="ir.actions.act_window"> |
412 | + <field name="name">Services</field> |
413 | + <field name="res_model">product.product</field> |
414 | + <field name="view_mode">kanban,tree,form</field> |
415 | + <field name="view_type">form</field> |
416 | + <field name="search_view_id" ref="product.product_search_form_view"/> |
417 | + <field name="view_id" ref="product.product_kanban_view"/> |
418 | + <field name="context" eval="'{\'default_type\':\'service\',\'default_procure_method\':\'make_to_order\',\'default_supply_method\':\'produce\',\'default_sale_ok\':True,\'default_purchase_ok\':False,\'consumable_services\':True}'"/> |
419 | + <field name="domain">[['type','=','service']]</field> |
420 | + <field name="help" type="html"> |
421 | + <p class="oe_view_nocontent_create"> |
422 | + Click to define a new service. |
423 | + </p><p> |
424 | + Services can be sold on quotations or sales order. |
425 | + All services defined from this menu will create tasks when the |
426 | + quotation is confirmed. |
427 | + </p><p> |
428 | + Another way to create tasks from sales is to use template of contracts |
429 | + linked to a project having pre-defined tasks that will be duplicated |
430 | + per contract reusing this project. |
431 | + </p> |
432 | + </field> |
433 | + </record> |
434 | + |
435 | + <menuitem id="menu_products_projects" name="Products" parent="base.menu_main_pm" sequence="3" /> |
436 | + <menuitem action="open_service_type_products" id="menu_products_services" name="Services" parent="menu_products_projects" sequence="1" /> |
437 | + |
438 | </data> |
439 | </openerp> |
440 | |
441 | |
442 | === modified file 'project_mrp/project_procurement.py' |
443 | --- project_mrp/project_procurement.py 2013-10-27 12:31:04 +0000 |
444 | +++ project_mrp/project_procurement.py 2014-02-14 15:15:55 +0000 |
445 | @@ -79,7 +79,7 @@ |
446 | 'partner_id': procurement.sale_line_id and procurement.sale_line_id.order_id.partner_id.id or False, |
447 | 'user_id': procurement.product_id.product_manager.id, |
448 | 'procurement_id': procurement.id, |
449 | - 'description': procurement.name + '\n' + (procurement.note or ''), |
450 | + 'description': (procurement.note or ''), |
451 | 'project_id': project and project.id or False, |
452 | 'company_id': procurement.company_id.id, |
453 | },context=context) |
454 | |
455 | === modified file 'project_timesheet/project_timesheet_view.xml' |
456 | --- project_timesheet/project_timesheet_view.xml 2013-10-27 12:31:04 +0000 |
457 | +++ project_timesheet/project_timesheet_view.xml 2014-02-14 15:15:55 +0000 |
458 | @@ -13,7 +13,7 @@ |
459 | <field name="currency_id"/> |
460 | <field name="partner_id"/> |
461 | </field> |
462 | - <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
463 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after"> |
464 | <a t-if="record.use_timesheets.raw_value" style="margin-right: 10px" |
465 | name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a> |
466 | </xpath> |
467 | @@ -25,10 +25,21 @@ |
468 | <field name="model">project.project</field> |
469 | <field name="inherit_id" ref="project.edit_project"/> |
470 | <field name="arch" type="xml"> |
471 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
472 | + <attribute name="invisible">0</attribute> |
473 | + </xpath> |
474 | <xpath expr='//div[@name="options_active"]' position='inside'> |
475 | <field name="use_timesheets" class="oe_inline"/> |
476 | <label for="use_timesheets"/> |
477 | </xpath> |
478 | + <xpath expr='//field[@name="partner_id"]' position='after'> |
479 | + <group colspan="2"> |
480 | + <p attrs="{'invisible': [('analytic_account_id','=',False)]}"> |
481 | + To invoice or setup invoicing and renewal options, go to the related contract: |
482 | + <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>. |
483 | + </p> |
484 | + </group> |
485 | + </xpath> |
486 | <xpath expr='//div[@name="buttons"]' position="inside"> |
487 | <button name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/> |
488 | </xpath> |