Merge lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-bth into lp:openobject-addons
- trunk-improve-project-visibility-bth
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-improve-project-visibility-bth |
Merge into: | lp:openobject-addons |
Diff against target: |
487 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-bth |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bhumi Thakkar (Open ERP) | Pending | ||
qdp (OpenERP) | Pending | ||
Priyesh (OpenERP) | Pending | ||
Mustufa Rangwala (Open ERP) | Pending | ||
Josse Colpaert (OpenERP) | Pending | ||
Review via email: mp+165605@code.launchpad.net |
This proposal supersedes a proposal from 2013-04-12.
Commit message
Description of the change
Hello,
Improved code as suggested.
Thanks.
Josse Colpaert (OpenERP) (jco-openerp) wrote : Posted in a previous version of this proposal | # |
Bhumi Thakkar (Open ERP) (bth-openerp) wrote : Posted in a previous version of this proposal | # |
=> Remove spaces.
=> Modify gnatt to gantt
=> by using the defaults set the value of pricelist_id
=> email_from to email in project for chatter in def message_
qdp (OpenERP) (qdp) wrote : Posted in a previous version of this proposal | # |
1) + 'pricelist_id': lambda self, cr, uid, c: self.pool.
this is completly wrong. you're fetching a partner object by giving a user id 'uid'! You must browse the partner_id field on res.users. So the correct code was:
+ 'pricelist_id': lambda self, cr, uid, c: self.pool.
(BTW, i'm not sure this will work if the partner doesn't have any pricelist set.)
2) it's too weird having message_
*leave as it in project
*in analytic account: return the project's results in case there is a project related
3) for the class oe_form_
Bhumi Thakkar (Open ERP) (bth-openerp) wrote : Posted in a previous version of this proposal | # |
I improved code for pricelist_id and checkbox of customer in chatter in project and contract module.
Bhumi Thakkar (Open ERP) (bth-openerp) wrote : Posted in a previous version of this proposal | # |
For the gantt icon, i make it global/generic as you suggested that is in https:/
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote : Posted in a previous version of this proposal | # |
Few comments:
- We should move get_default_
- Improve create method.
- Do not add new search view for product you can use existing.
Thanks,
Mustufa Rangwala
Bhumi Thakkar (Open ERP) (bth-openerp) wrote : Posted in a previous version of this proposal | # |
Improved code as per your suggestion.
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote : Posted in a previous version of this proposal | # |
Remove conflicts.
Bhumi Thakkar (Open ERP) (bth-openerp) wrote : Posted in a previous version of this proposal | # |
Merge latest trunk and resolve conflicts.
Priyesh (OpenERP) (pso-openerp) wrote : Posted in a previous version of this proposal | # |
Hello,
Thanks for your changes. Few points, which should be improve :
1. Right now, When you save any project, By default in Contract, its coming with Default Pricelist. But If Customer is present in Project, then it should first come up with Customer's Sales Pricelist.
2. Keep get_default_
Thanks,
Priyesh Solanki
- 8691. By Paramjit Singh Sahota(OpenERP)
-
[MERGE] Merged lp:openobject-addons.
- 8692. By Bhumi Thakkar (Open ERP)
-
[MERGE] Merge lp:openobject-addons.
- 8693. By Bhumi Thakkar (Open ERP)
-
[FIX]hide only in project=
>products= >services menu. - 8694. By Bhumi Thakkar (Open ERP)
-
[IMP] Product is hidden in searchview.
- 8695. By Bhumi Thakkar (Open ERP)
-
[IMP]Modify id.
- 8696. By Bhumi Thakkar (Open ERP)
-
[IMP]products filter hide.
- 8697. By Bhumi Thakkar (Open ERP)
-
[IMP]Improve code.
- 8698. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8699. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8700. By Bhumi Thakkar (Open ERP)
-
[REN]Rename name.
- 8701. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8702. By Jignesh Rathod(OpenERP)
-
merge with addons.
- 8703. By Jignesh Rathod(OpenERP)
-
Move menu in project_mrp and change message in gray.
- 8704. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp;openobject-
addons. - 8705. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8706. By Bhumi Thakkar (Open ERP)
-
[FIX]Removed conflicts.
- 8707. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8708. By Bhumi Thakkar (Open ERP)
-
[REM]Remove line.
- 8709. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved changes.
- 8710. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8711. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8712. By Bhumi Thakkar (Open ERP)
-
[IMP]Improve code.
- 8713. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8714. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8715. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved code for message for activity instead of separate.
- 8716. By Bhumi Thakkar (Open ERP)
-
[IMP]IMproved for project_timesheet.
- 8717. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8718. By Bhumi Thakkar (Open ERP)
-
[IMP]Checkbox task is hide when only project is installed, 'a' is small in activity word, escalation button is displayed when parent of project is there.
- 8719. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8720. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved condition for issue message.
- 8721. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8722. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved condition.
- 8723. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8724. By Bhumi Thakkar (Open ERP)
-
[IMP]Removed onchange.
- 8725. By Bhumi Thakkar (Open ERP)
-
[IMP]Rename project_type to is_escalate and working now.
- 8726. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8727. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved condition.
- 8728. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8729. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8730. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
Unmerged revisions
- 8730. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8729. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8728. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8727. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved condition.
- 8726. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
- 8725. By Bhumi Thakkar (Open ERP)
-
[IMP]Rename project_type to is_escalate and working now.
- 8724. By Bhumi Thakkar (Open ERP)
-
[IMP]Removed onchange.
- 8723. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge lp:openobject-addons.
- 8722. By Bhumi Thakkar (Open ERP)
-
[IMP]Improved condition.
- 8721. By Bhumi Thakkar (Open ERP)
-
[MERGE]Merge trunk.
Preview Diff
1 | === modified file 'account_analytic_analysis/__openerp__.py' |
2 | --- account_analytic_analysis/__openerp__.py 2013-03-01 08:36:10 +0000 |
3 | +++ account_analytic_analysis/__openerp__.py 2013-11-11 13:30:53 +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 2013-10-03 11:12:22 +0000 |
16 | +++ account_analytic_analysis/account_analytic_analysis.py 2013-11-11 13:30:53 +0000 |
17 | @@ -525,6 +525,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 2013-09-04 14:10:53 +0000 |
31 | +++ account_analytic_analysis/account_analytic_analysis_view.xml 2013-11-11 13:30:53 +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 2013-09-10 12:48:03 +0000 |
63 | +++ analytic/analytic.py 2013-11-11 13:30:53 +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 2013-08-20 16:52:58 +0000 |
85 | +++ hr_timesheet_invoice/hr_timesheet_invoice.py 2013-11-11 13:30:53 +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 | part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context) |
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-03-19 12:50:28 +0000 |
110 | +++ hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml 2013-11-11 13:30:53 +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 2013-09-04 14:10:53 +0000 |
149 | +++ procurement/procurement_view.xml 2013-11-11 13:30:53 +0000 |
150 | @@ -309,7 +309,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 2013-09-19 14:23:38 +0000 |
162 | +++ project/project.py 2013-11-11 13:30:53 +0000 |
163 | @@ -300,6 +300,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 | @@ -813,6 +819,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 | @@ -1276,6 +1283,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-07-19 10:01:19 +0000 |
195 | +++ project/project_demo.xml 2013-11-11 13:30:53 +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-10-08 13:56:50 +0000 |
207 | +++ project/project_view.xml 2013-11-11 13:30:53 +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 | <span t-if="record.task_count.raw_value gt 1"><field name="task_count"/> Tasks</span> |
259 | <span t-if="record.task_count.raw_value lt 2"><field name="task_count"/> Task</span> |
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 | @@ -439,12 +445,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 2013-11-11 13:30:53 +0000 differ |
308 | === modified file 'project_issue/project_issue.py' |
309 | --- project_issue/project_issue.py 2013-10-15 14:13:55 +0000 |
310 | +++ project_issue/project_issue.py 2013-11-11 13:30:53 +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-10-17 11:35:03 +0000 |
344 | +++ project_issue/project_issue_view.xml 2013-11-11 13:30:53 +0000 |
345 | @@ -70,8 +70,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 | @@ -298,6 +298,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 | @@ -327,13 +330,19 @@ |
367 | <field name="use_issues"/> |
368 | <field name="issue_count" 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 | <span t-if="record.issue_count.raw_value gt 1"><field name="issue_count"/> Issues</span> |
375 | <span t-if="record.issue_count.raw_value lt 2"><field name="issue_count"/> Issue</span> |
376 | </a> |
377 | </xpath> |
378 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/div" position="replace"> |
379 | + <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;"> |
380 | + <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" /> |
381 | + <span>No activity yet, click to enter in the project.</span> |
382 | + </div> |
383 | + </xpath> |
384 | </field> |
385 | </record> |
386 | |
387 | |
388 | === modified file 'project_long_term/project_long_term_view.xml' |
389 | --- project_long_term/project_long_term_view.xml 2013-09-04 14:11:22 +0000 |
390 | +++ project_long_term/project_long_term_view.xml 2013-11-11 13:30:53 +0000 |
391 | @@ -97,6 +97,9 @@ |
392 | <field name="model">project.project</field> |
393 | <field name="inherit_id" ref="project.edit_project"/> |
394 | <field name="arch" type="xml"> |
395 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
396 | + <attribute name="invisible">0</attribute> |
397 | + </xpath> |
398 | <xpath expr="//div[@name='options_active']" position='inside'> |
399 | <field name="use_phases" class="oe_inline"/> |
400 | <label for="use_phases"/> |
401 | |
402 | === modified file 'project_mrp/project_mrp_view.xml' |
403 | --- project_mrp/project_mrp_view.xml 2013-07-19 10:01:19 +0000 |
404 | +++ project_mrp/project_mrp_view.xml 2013-11-11 13:30:53 +0000 |
405 | @@ -58,6 +58,34 @@ |
406 | </group> |
407 | </field> |
408 | </record> |
409 | + |
410 | + <record id="open_service_type_products" model="ir.actions.act_window"> |
411 | + <field name="name">Services</field> |
412 | + <field name="res_model">product.product</field> |
413 | + <field name="view_mode">kanban,tree,form</field> |
414 | + <field name="view_type">form</field> |
415 | + <field name="search_view_id" ref="product.product_search_form_view"/> |
416 | + <field name="view_id" ref="product.product_kanban_view"/> |
417 | + <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}'"/> |
418 | + <field name="domain">[['type','=','service']]</field> |
419 | + <field name="help" type="html"> |
420 | + <p class="oe_view_nocontent_create"> |
421 | + Click to define a new service. |
422 | + </p><p> |
423 | + Services can be sold on quotations or sales order. |
424 | + All services defined from this menu will create tasks when the |
425 | + quotation is confirmed. |
426 | + </p><p> |
427 | + Another way to create tasks from sales is to use template of contracts |
428 | + linked to a project having pre-defined tasks that will be duplicated |
429 | + per contract reusing this project. |
430 | + </p> |
431 | + </field> |
432 | + </record> |
433 | + |
434 | + <menuitem id="menu_products_projects" name="Products" parent="base.menu_main_pm" sequence="3" /> |
435 | + <menuitem action="open_service_type_products" id="menu_products_services" name="Services" parent="menu_products_projects" sequence="1" /> |
436 | + |
437 | </data> |
438 | </openerp> |
439 | |
440 | |
441 | === modified file 'project_mrp/project_procurement.py' |
442 | --- project_mrp/project_procurement.py 2013-07-19 10:01:19 +0000 |
443 | +++ project_mrp/project_procurement.py 2013-11-11 13:30:53 +0000 |
444 | @@ -79,7 +79,7 @@ |
445 | 'partner_id': procurement.sale_line_id and procurement.sale_line_id.order_id.partner_id.id or False, |
446 | 'user_id': procurement.product_id.product_manager.id, |
447 | 'procurement_id': procurement.id, |
448 | - 'description': procurement.name + '\n' + (procurement.note or ''), |
449 | + 'description': (procurement.note or ''), |
450 | 'project_id': project and project.id or False, |
451 | 'company_id': procurement.company_id.id, |
452 | },context=context) |
453 | |
454 | === modified file 'project_timesheet/project_timesheet_view.xml' |
455 | --- project_timesheet/project_timesheet_view.xml 2013-06-07 16:09:27 +0000 |
456 | +++ project_timesheet/project_timesheet_view.xml 2013-11-11 13:30:53 +0000 |
457 | @@ -13,7 +13,7 @@ |
458 | <field name="currency_id"/> |
459 | <field name="partner_id"/> |
460 | </field> |
461 | - <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
462 | + <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after"> |
463 | <a t-if="record.use_timesheets.raw_value" style="margin-right: 10px" |
464 | name="open_timesheets" type="object"><field name="hours_quantity"/> Hours</a> |
465 | </xpath> |
466 | @@ -25,10 +25,21 @@ |
467 | <field name="model">project.project</field> |
468 | <field name="inherit_id" ref="project.edit_project"/> |
469 | <field name="arch" type="xml"> |
470 | + <xpath expr='//div[@name="options_active"]' position="attributes"> |
471 | + <attribute name="invisible">0</attribute> |
472 | + </xpath> |
473 | <xpath expr='//div[@name="options_active"]' position='inside'> |
474 | <field name="use_timesheets" class="oe_inline"/> |
475 | <label for="use_timesheets"/> |
476 | </xpath> |
477 | + <xpath expr='//field[@name="partner_id"]' position='after'> |
478 | + <group colspan="2"> |
479 | + <p attrs="{'invisible': [('analytic_account_id','=',False)]}"> |
480 | + To invoice or setup invoicing and renewal options, go to the related contract: |
481 | + <field name="analytic_account_id" readonly="1" required="0" class="oe_inline" nolabel="1"/>. |
482 | + </p> |
483 | + </group> |
484 | + </xpath> |
485 | <xpath expr='//div[@name="buttons"]' position="inside"> |
486 | <button name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/> |
487 | </xpath> |
- It is not really amusing to find a diff with lots of lines where a space is the only difference. get_suggested_ recipients( self, cr, uid, ids, context=None): I don't think a project has an email_from
- It is Gantt, not gnat for the oe_... (minor)
- "When you come from project, the default pricelist should be the one of customer": this should not be done by inheriting the create method, but by using the defaults. Because now, the user is going to type something and the system is going to override it without warning.
- In def message_