Merge lp:~openerp-dev/openobject-addons/trunk-addons-ps-test_7-contract-hip into lp:openobject-addons

Proposed by Hiral Patel (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-addons-ps-test_7-contract-hip
Merge into: lp:openobject-addons
Diff against target: 224 lines (+53/-24)
10 files modified
account/partner_view.xml (+3/-2)
account/project/project_view.xml (+9/-1)
account_analytic_analysis/account_analytic_analysis.py (+9/-0)
account_analytic_analysis/account_analytic_analysis_view.xml (+2/-2)
analytic/analytic_view.xml (+1/-1)
analytic/security/analytic_security.xml (+7/-1)
hr_timesheet/wizard/hr_timesheet_sign_in_out_view.xml (+15/-11)
project/project.py (+6/-4)
project/project_view.xml (+1/-0)
sale/sale_view.xml (+0/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-addons-ps-test_7-contract-hip
Reviewer Review Type Date Requested Status
Mustufa Rangwala (Open ERP) (community) Needs Fixing
Review via email: mp+140848@code.launchpad.net

Description of the change

Hello,

This Branch contain following changes:

   1. When creating a project, if there is no customer, the Type of Account should be "Analytic Account", right now it remains "Contract or Project".
   2. In SO when we select any product and (save and close) and if you again click on product and try to edit quantiity it's not possible.
   3. On Reconcile button on Manual Reconciliation list view KeyError: 'active_ids'.
   4. From the contract view, the customer must be required if the analytic account type is contract.
   5. Improve useability of Sign in sign out by project.
   6. Remove the filters Sale Order & Quotation From SO.
   7. Bank statement:, the computed balance field is missing.
   8. The group "Sales own leads" should see only it's own contracts or the contracts unassigned. (like opportunities).
   9. In contract, check "timesheets" in order to put the default reinvoicing to "100%".
         If you uncheck invoice on timesheet, the invoice ratio should be set to empty (check it's not used for expenses)

Pad Link: http://pad.openerp.com/p/rd-project.task-4489-Z8G7S791

Thanks.

To post a comment you must log in.
8208. By Hiral Patel (OpenERP)

[MERGE] Merge with lp:openobject-addons

8209. By Hiral Patel (OpenERP)

[MERGE] Merge with lp:openobject-addons

8210. By Hiral Patel (OpenERP)

Resolve conflicts

8211. By Hiral Patel (OpenERP)

[Rev] Revert the changes of revno 8200

8212. By Hiral Patel (OpenERP)

[Imp] Improve the code for on change customer change type

8213. By RGA(OpenERP)

Merge with trunk

8214. By RGA(OpenERP)

Merge with trunk

8215. By Ujjvala Collins

[MERGE]: Merged with latest trunk

8216. By RGA(OpenERP)

Remove unnecessary change or alredy fixed in trunk

8217. By RGA(OpenERP)

Remove record rule which fial runbot test

8218. By Ishwar Malvi(OpenERP)

[ADD] record rule: when 'sales own leads' config then login user can see his/her contract only or manager of contract

8219. By Ishwar Malvi(OpenERP)

typo:manage space

8220. By RGA(OpenERP)

[FIX] Error:active_id not found on domain eval when click on Accouting/Configuration/Analytic Accounts, here we diffenciate partner form view button and analytic accounts menu actions

8221. By RGA(OpenERP)

[IMP] Contract/Analytic account: customer field should be required when account type is project or contract

8222. By Ishwar Malvi(OpenERP)

[IMP] record rule: unassigned contract(without manager) should be accessed by all user

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Few points to fix:
1. action_account_analytic_account_partner_form has two reference, we can remove one its duplicated.
2. <field name="domain_force">['|','|','|',('create_uid','=',user.id),('create_uid','=',False),('manager_id','=',user.id),('manager_id','=',False)]</field> -> create_uid will not be false anytime so you can improve it and also you can remove domain for create_uid.

Thanks,
Mustufa Rangwala

review: Needs Fixing

Unmerged revisions

8222. By Ishwar Malvi(OpenERP)

[IMP] record rule: unassigned contract(without manager) should be accessed by all user

8221. By RGA(OpenERP)

[IMP] Contract/Analytic account: customer field should be required when account type is project or contract

8220. By RGA(OpenERP)

[FIX] Error:active_id not found on domain eval when click on Accouting/Configuration/Analytic Accounts, here we diffenciate partner form view button and analytic accounts menu actions

8219. By Ishwar Malvi(OpenERP)

typo:manage space

8218. By Ishwar Malvi(OpenERP)

[ADD] record rule: when 'sales own leads' config then login user can see his/her contract only or manager of contract

8217. By RGA(OpenERP)

Remove record rule which fial runbot test

8216. By RGA(OpenERP)

Remove unnecessary change or alredy fixed in trunk

8215. By Ujjvala Collins

[MERGE]: Merged with latest trunk

8214. By RGA(OpenERP)

Merge with trunk

8213. By RGA(OpenERP)

Merge with trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/partner_view.xml'
2--- account/partner_view.xml 2013-04-22 15:34:49 +0000
3+++ account/partner_view.xml 2013-05-21 13:53:31 +0000
4@@ -50,12 +50,13 @@
5 </field>
6 </record>
7
8- <record id="action_account_analytic_account_form" model="ir.actions.act_window">
9+ <record id="action_account_analytic_account_partner_form" model="ir.actions.act_window">
10 <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
11 <field name="name">Contracts/Analytic Accounts</field>
12 <field name="res_model">account.analytic.account</field>
13 <field name="view_mode">tree,form</field>
14 </record>
15+
16 <record model="ir.ui.view" id="partner_view_buttons">
17 <field name="name">partner.view.buttons</field>
18 <field name="model">res.partner</field>
19@@ -67,7 +68,7 @@
20 name="%(account.action_invoice_tree)d"
21 context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
22 <button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
23- <button type="action" string="Contracts/Analytic Accounts" name="%(account.action_account_analytic_account_form)d"
24+ <button type="action" string="Contracts/Analytic Accounts" name="%(account.action_account_analytic_account_partner_form)d"
25 groups="analytic.group_analytic_accounting"/>
26 </xpath>
27 </field>
28
29=== modified file 'account/project/project_view.xml'
30--- account/project/project_view.xml 2013-04-22 15:34:49 +0000
31+++ account/project/project_view.xml 2013-05-21 13:53:31 +0000
32@@ -71,7 +71,15 @@
33 </tree>
34 </field>
35 </record>
36-
37+
38+ <record id="action_account_analytic_account_partner_form" model="ir.actions.act_window">
39+ <field name="type">ir.actions.act_window</field>
40+ <field name="res_model">account.analytic.account</field>
41+ <field name="view_type">form</field>
42+ <field name="view_mode">tree,form</field>
43+ <field name="view_id" ref="view_account_analytic_account_tree"/>
44+ <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
45+ </record>
46
47 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
48 <field name="name">Analytic Accounts</field>
49
50=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
51--- account_analytic_analysis/account_analytic_analysis.py 2013-04-04 09:52:57 +0000
52+++ account_analytic_analysis/account_analytic_analysis.py 2013-05-21 13:53:31 +0000
53@@ -449,6 +449,15 @@
54 res[account.id]['toinvoice_total'] = self._get_total_toinvoice(account)
55 return res
56
57+ def on_change_invoice_on_timesheets(self, cr, uid, ids, invoice_on_timesheets, context=None):
58+ res = {'value': {}}
59+ if invoice_on_timesheets:
60+ ir_model_obj = self.pool.get('ir.model.data')
61+ res['value']['to_invoice'] = ir_model_obj.get_object_reference(cr, uid, 'hr_timesheet_invoice', 'timesheet_invoice_factor1')[1]
62+ else:
63+ res['value']['to_invoice'] = False
64+ return res
65+
66 _columns = {
67 'is_overdue_quantity' : fields.function(_is_overdue_quantity, method=True, type='boolean', string='Overdue Quantity',
68 store={
69
70=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
71--- account_analytic_analysis/account_analytic_analysis_view.xml 2013-04-22 15:34:49 +0000
72+++ account_analytic_analysis/account_analytic_analysis_view.xml 2013-05-21 13:53:31 +0000
73@@ -36,7 +36,7 @@
74 </div>
75 </xpath>
76 <field name="partner_id" position="attributes">
77- <attribute name="attrs">{'required': [('type','=','contract'),'|','|',('fix_price_invoices','=',True), ('invoice_on_timesheets', '=', True), ('recurring_invoices', '=', True)]}</attribute>
78+ <attribute name="attrs">{'required': ['|','|','|',('type','=','contract'),('fix_price_invoices','=',True), ('invoice_on_timesheets', '=', True), ('recurring_invoices', '=', True)]}</attribute>
79 </field>
80 <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
81 </xpath>
82@@ -87,7 +87,7 @@
83 <td class="oe_timesheet_grey">
84 <label for="invoice_on_timesheets"/>
85 </td><td class="oe_timesheet_grey">
86- <field name="invoice_on_timesheets" on_change="onchange_invoice_on_timesheets(invoice_on_timesheets)"/>
87+ <field name="invoice_on_timesheets" on_change="on_change_invoice_on_timesheets(invoice_on_timesheets, context)"/>
88 </td><td>
89 <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
90 </td><td>
91
92=== modified file 'analytic/analytic_view.xml'
93--- analytic/analytic_view.xml 2012-11-29 22:26:45 +0000
94+++ analytic/analytic_view.xml 2013-05-21 13:53:31 +0000
95@@ -21,7 +21,7 @@
96
97 <group name="main">
98 <group>
99- <field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
100+ <field name="partner_id" on_change="on_change_partner_id(partner_id, name)" attrs="{'required': [('type','=','contract')]}"/>
101 <field name="manager_id"/>
102 <field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
103 </group>
104
105=== modified file 'analytic/security/analytic_security.xml'
106--- analytic/security/analytic_security.xml 2012-07-13 17:08:38 +0000
107+++ analytic/security/analytic_security.xml 2013-05-21 13:53:31 +0000
108@@ -15,7 +15,13 @@
109 <field eval="True" name="global"/>
110 <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
111 </record>
112-
113+
114+ <record id="account_rule_personal_analytic_account" model="ir.rule">
115+ <field name="name">Personal Analytic Account</field>
116+ <field ref="analytic.model_account_analytic_account" name="model_id"/>
117+ <field name="domain_force">['|','|','|',('create_uid','=',user.id),('create_uid','=',False),('manager_id','=',user.id),('manager_id','=',False)]</field>
118+ <field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
119+ </record>
120 </data>
121 <data noupdate="0">
122
123
124=== modified file 'hr_timesheet/wizard/hr_timesheet_sign_in_out_view.xml'
125--- hr_timesheet/wizard/hr_timesheet_sign_in_out_view.xml 2012-11-29 22:26:45 +0000
126+++ hr_timesheet/wizard/hr_timesheet_sign_in_out_view.xml 2013-05-21 13:53:31 +0000
127@@ -58,17 +58,21 @@
128 <field name="arch" type="xml">
129 <form string="Sign In/Out by Project" version="7.0">
130 <group colspan="4" >
131- <separator string="General Information" colspan="4" />
132- <field name="name" readonly="True" />
133- <field name="state" readonly="True" />
134- <field name="date_start"/>
135- <field name="server_date"/>
136- <separator string="Work done in the last period" colspan="4" />
137- <field name="account_id" colspan="2"/>
138- <field name="info" colspan="2"/>
139- <field name="date"/>
140- <label string="(Keep empty for current_time)" colspan="2"/>
141- <field name="analytic_amount"/>
142+ <group>
143+ <separator string="General Information" colspan="4" />
144+ <field name="name" readonly="True" />
145+ <field name="state" readonly="True" />
146+ <field name="date_start"/>
147+ <field name="server_date"/>
148+ </group>
149+ <group>
150+ <separator string="Work done in the last period" colspan="4" />
151+ <field name="account_id" colspan="2"/>
152+ <field name="info" colspan="2"/>
153+ <field name="date"/>
154+ <label string="(Keep empty for current_time)" colspan="2"/>
155+ <field name="analytic_amount"/>
156+ </group>
157 </group>
158
159 <footer>
160
161=== modified file 'project/project.py'
162--- project/project.py 2013-04-23 15:29:43 +0000
163+++ project/project.py 2013-05-21 13:53:31 +0000
164@@ -99,13 +99,15 @@
165
166 def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
167 partner_obj = self.pool.get('res.partner')
168+ val = {}
169 if not part:
170- return {'value':{}}
171- val = {}
172+ val['type'] = 'normal'
173+ return {'value':val}
174 if 'pricelist_id' in self.fields_get(cr, uid, context=context):
175 pricelist = partner_obj.read(cr, uid, part, ['property_product_pricelist'], context=context)
176 pricelist_id = pricelist.get('property_product_pricelist', False) and pricelist.get('property_product_pricelist')[0] or False
177 val['pricelist_id'] = pricelist_id
178+ val['type'] = 'contract'
179 return {'value': val}
180
181 def _get_projects_from_tasks(self, cr, uid, task_ids, context=None):
182@@ -287,7 +289,7 @@
183 _order = "sequence, id"
184 _defaults = {
185 'active': True,
186- 'type': 'contract',
187+ 'type': 'normal',
188 'state': 'open',
189 'priority': 1,
190 'sequence': 10,
191@@ -546,7 +548,7 @@
192 model_name=vals.get('alias_model', 'project.task'),
193 context=context)
194 vals['alias_id'] = alias_id
195- if vals.get('type', False) not in ('template','contract'):
196+ if vals.get('type', False) not in ('template','contract','normal'):
197 vals['type'] = 'contract'
198 project_id = super(project, self).create(cr, uid, vals, context)
199 mail_alias.write(cr, uid, [vals['alias_id']], {'alias_defaults': {'project_id': project_id} }, context)
200
201=== modified file 'project/project_view.xml'
202--- project/project_view.xml 2013-04-22 15:34:49 +0000
203+++ project/project_view.xml 2013-05-21 13:53:31 +0000
204@@ -117,6 +117,7 @@
205 context="{'default_groups_ref': ['base.group_user', 'project.group_project_manager']}"/>
206 </group>
207 <group>
208+ <field name="type" invisible="1"/>
209 <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
210 <p colspan="2" attrs="{'invisible': [('analytic_account_id','=',False)]}">
211 To invoice or setup invoicing and renewal options, go to the related contract: <field name="analytic_account_id" readonly="1" required="0" class="oe_inline"/>.
212
213=== modified file 'sale/sale_view.xml'
214--- sale/sale_view.xml 2013-04-22 15:34:49 +0000
215+++ sale/sale_view.xml 2013-05-21 13:53:31 +0000
216@@ -302,8 +302,6 @@
217 <field name="name" string="Sales Order" filter_domain="['|',('name','ilike',self),('client_order_ref','ilike',self)]"/>
218 <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
219 <separator/>
220- <filter icon="terp-document-new" string="Quotations" name="draft" domain="[('state','in',('draft','sent'))]" help="Sales Order that haven't yet been confirmed"/>
221- <filter icon="terp-check" string="Sales" name="sales" domain="[('state','in',('manual','progress'))]"/>
222 <filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
223 <filter icon="terp-dolar_ok!" string="Done" domain="[('state','=','done')]" help="Sales Order done"/>
224 <separator/>

Subscribers

People subscribed via source and target branches

to all changes: