Merge lp:~akretion-team/openerp-rma/rma-cleanup-cleanup-cleanup into lp:~openerprma/openerp-rma/7.0
- rma-cleanup-cleanup-cleanup
- Merge into 7.0
Status: | Work in progress |
---|---|
Proposed branch: | lp:~akretion-team/openerp-rma/rma-cleanup-cleanup-cleanup |
Merge into: | lp:~openerprma/openerp-rma/7.0 |
Diff against target: |
1732 lines (+649/-428) (has conflicts) 20 files modified
crm_claim_rma/__openerp__.py (+4/-2) crm_claim_rma/crm_claim_rma.py (+176/-44) crm_claim_rma/crm_claim_rma_data.xml (+93/-101) crm_claim_rma/crm_claim_rma_view.xml (+139/-114) crm_claim_rma/security/ir.model.access.csv (+14/-7) crm_claim_rma/security/rma_group.xml (+30/-0) crm_claim_rma/stock_view.xml (+8/-4) crm_claim_rma/wizard/claim_make_picking_view.xml (+8/-8) crm_rma_advance_location/__openerp__.py (+3/-3) crm_rma_advance_location/claim_rma_view.xml (+19/-17) crm_rma_advance_location/stock.py (+1/-1) crm_rma_advance_location/stock_view.xml (+2/-3) crm_rma_advance_location/wizard/__init__.py (+2/-2) crm_rma_advance_location/wizard/claim_make_picking.py (+38/-32) crm_rma_advance_location/wizard/claim_make_picking_from_picking.py (+44/-42) crm_rma_advance_location/wizard/claim_make_picking_from_picking_view.xml (+15/-19) crm_rma_advance_location/wizard/claim_make_picking_view.xml (+0/-3) product_warranty/__openerp__.py (+1/-1) product_warranty/product_warranty.py (+48/-19) product_warranty/res_company_view.xml (+4/-6) Text conflict in crm_claim_rma/crm_claim_rma.py Text conflict in crm_claim_rma/crm_claim_rma_view.xml Text conflict in crm_claim_rma/stock_view.xml |
To merge this branch: | bzr merge lp:~akretion-team/openerp-rma/rma-cleanup-cleanup-cleanup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Romain Deheele - Camptocamp (community) | code review, test | Needs Fixing | |
Joël Grand-Guillaume @ camptocamp | code review, no tests | Needs Fixing | |
Review via email: mp+215970@code.launchpad.net |
Commit message
Description of the change
The main changes of this MPs are :
1) Create 2 groups for RMA : User and Manager (by default, RMAs i.e. crm.claim can be used by salesman... but do you know a company where RMAs are handled by salesman ??)
2) Clean-up presentation in copyright headers and update licence to AGPL when needed
3) Update views to v7.0 style
4) CLEAN UP CODE (and there is still A LOT to do in this area ! A LOT !). Remove dead code. I mean, this project, in the current state of the code, doesn't deserve to be an OCA project and doesn't meet the quality standards of OCA. This is just a start to try and clean a number of dirty stuff, but there is still a lot to do in this area. For example, a number of fields should be renamed, but this would have to be done in another merge proposal (I haven't changed any field name in this MP).
5) Small changes to prepare the arrival of the modules crm_claim_
- 72. By Alexandre Fayolle - camptocamp
-
[i18n] french translation typo
- 73. By alexis-via
-
[MERGE] lp:~akretion-team/openerp-rma/rma-cleanup-cleanup-cleanup
- 74. By Raphaël Valyi - http://www.akretion.com
-
[FIX] ensure security group is defined before being used
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : | # |
Hi,
Thanks for improving the module. I may not have the time to read all carefully, just what I saw in a few minutes here:
* L269 : For the method "_get_default_
* L910-1010 : Removing all link and button to access the related partner's document is a bit sad don't you think ? Our customer love that. But you may have move that somewhere else and I missed it ?
Regards,
Joël
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
following the comment by Alexis on 23/04/2014 I'm setting this MP as "work in progress"
Romain Deheele - Camptocamp (romaindeheele) wrote : | # |
Hello Alexis,
I think that the duplicate constraint problem (sequence management) is solved with :
http://
Romain
Romain Deheele - Camptocamp (romaindeheele) wrote : | # |
on_change_
you need to add the field company_id in the crm.claim view "crm_case_
Regards,
Romain
- 75. By Alexis de Lattre
-
Avoid double increment of RMA number
Unmerged revisions
- 75. By Alexis de Lattre
-
Avoid double increment of RMA number
- 74. By Raphaël Valyi - http://www.akretion.com
-
[FIX] ensure security group is defined before being used
- 73. By alexis-via
-
[MERGE] lp:~akretion-team/openerp-rma/rma-cleanup-cleanup-cleanup
Preview Diff
1 | === modified file 'crm_claim_rma/__openerp__.py' | |||
2 | --- crm_claim_rma/__openerp__.py 2014-04-23 15:08:04 +0000 | |||
3 | +++ crm_claim_rma/__openerp__.py 2015-11-20 10:22:38 +0000 | |||
4 | @@ -75,9 +75,11 @@ | |||
5 | 75 | 'crm_claim', | 75 | 'crm_claim', |
6 | 76 | 'product_warranty', | 76 | 'product_warranty', |
7 | 77 | ], | 77 | ], |
9 | 78 | 'data': ['wizard/claim_make_picking_view.xml', | 78 | 'data': [ |
10 | 79 | 'security/rma_group.xml', | ||
11 | 80 | 'security/ir.model.access.csv', | ||
12 | 81 | 'wizard/claim_make_picking_view.xml', | ||
13 | 79 | 'crm_claim_rma_view.xml', | 82 | 'crm_claim_rma_view.xml', |
14 | 80 | 'security/ir.model.access.csv', | ||
15 | 81 | 'account_invoice_view.xml', | 83 | 'account_invoice_view.xml', |
16 | 82 | 'stock_view.xml', | 84 | 'stock_view.xml', |
17 | 83 | 'res_partner_view.xml', | 85 | 'res_partner_view.xml', |
18 | 84 | 86 | ||
19 | === modified file 'crm_claim_rma/crm_claim_rma.py' | |||
20 | --- crm_claim_rma/crm_claim_rma.py 2014-05-16 12:28:51 +0000 | |||
21 | +++ crm_claim_rma/crm_claim_rma.py 2015-11-20 10:22:38 +0000 | |||
22 | @@ -1,8 +1,8 @@ | |||
23 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
24 | 2 | ############################################################################## | 2 | ############################################################################## |
25 | 3 | # | 3 | # |
28 | 4 | # Copyright 2013 Camptocamp | 4 | # Copyright 2013-2014 Camptocamp |
29 | 5 | # Copyright 2009-2013 Akretion, | 5 | # Copyright 2009-2014 Akretion, |
30 | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, |
31 | 7 | # Benoît Guillot, Joel Grand-Guillaume | 7 | # Benoît Guillot, Joel Grand-Guillaume |
32 | 8 | # | 8 | # |
33 | @@ -21,9 +21,13 @@ | |||
34 | 21 | # | 21 | # |
35 | 22 | ############################################################################## | 22 | ############################################################################## |
36 | 23 | 23 | ||
37 | 24 | <<<<<<< TREE | ||
38 | 24 | import calendar | 25 | import calendar |
39 | 25 | import math | 26 | import math |
40 | 26 | from openerp.osv import fields, orm, osv | 27 | from openerp.osv import fields, orm, osv |
41 | 28 | ======= | ||
42 | 29 | from openerp.osv import fields, orm | ||
43 | 30 | >>>>>>> MERGE-SOURCE | ||
44 | 27 | from datetime import datetime | 31 | from datetime import datetime |
45 | 28 | from dateutil.relativedelta import relativedelta | 32 | from dateutil.relativedelta import relativedelta |
46 | 29 | from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT, | 33 | from openerp.tools import (DEFAULT_SERVER_DATE_FORMAT, |
47 | @@ -37,7 +41,7 @@ | |||
48 | 37 | _name = "substate.substate" | 41 | _name = "substate.substate" |
49 | 38 | _description = "substate that precise a given state" | 42 | _description = "substate that precise a given state" |
50 | 39 | _columns = { | 43 | _columns = { |
52 | 40 | 'name': fields.char('Sub state', required=True), | 44 | 'name': fields.char('Sub State', required=True), |
53 | 41 | 'substate_descr': fields.text( | 45 | 'substate_descr': fields.text( |
54 | 42 | 'Description', | 46 | 'Description', |
55 | 43 | help="To give more information about the sub state"), | 47 | help="To give more information about the sub state"), |
56 | @@ -51,11 +55,41 @@ | |||
57 | 51 | _name = "claim.line" | 55 | _name = "claim.line" |
58 | 52 | _description = "List of product to return" | 56 | _description = "List of product to return" |
59 | 53 | 57 | ||
65 | 54 | # Comment written in a claim.line to know about the warranty status | 58 | def prodlot_id_change( |
66 | 55 | WARRANT_COMMENT = { | 59 | self, cr, uid, ids, prodlot_id, company_id, warehouse_id, |
67 | 56 | 'valid': "Valid", | 60 | context=None): |
68 | 57 | 'expired': "Expired", | 61 | res = {'value': {}} |
69 | 58 | 'not_define': "Not Defined"} | 62 | if prodlot_id: |
70 | 63 | prodlot = self.pool['stock.production.lot'].browse( | ||
71 | 64 | cr, uid, prodlot_id, context=context) | ||
72 | 65 | return_address_id, return_type = \ | ||
73 | 66 | self.pool['crm.claim']._get_return_info_from_product( | ||
74 | 67 | cr, uid, prodlot.product_id, company_id, | ||
75 | 68 | context=context) | ||
76 | 69 | |||
77 | 70 | res['value'].update({ | ||
78 | 71 | 'product_id': prodlot.product_id.id, | ||
79 | 72 | 'product_returned_quantity': 1, | ||
80 | 73 | 'return_address_id': return_address_id, | ||
81 | 74 | 'return_type': return_type, | ||
82 | 75 | }) | ||
83 | 76 | else: | ||
84 | 77 | res['value'].update({ | ||
85 | 78 | 'product_id': False, | ||
86 | 79 | 'product_returned_quantity': 0, | ||
87 | 80 | 'return_address_id': False, | ||
88 | 81 | 'return_type': False, | ||
89 | 82 | }) | ||
90 | 83 | return res | ||
91 | 84 | |||
92 | 85 | def product_id_change( | ||
93 | 86 | self, cr, uid, ids, product_id, company_id, context=None): | ||
94 | 87 | res = {'domain': {}} | ||
95 | 88 | if product_id: | ||
96 | 89 | res['domain']['prodlot_id'] = "[('product_id', '=', product_id)]" | ||
97 | 90 | else: | ||
98 | 91 | res['domain']['prodlot_id'] = "[]" | ||
99 | 92 | return res | ||
100 | 59 | 93 | ||
101 | 60 | # Method to calculate total amount of the line : qty*UP | 94 | # Method to calculate total amount of the line : qty*UP |
102 | 61 | def _line_total_amount(self, cr, uid, ids, field_name, arg, context=None): | 95 | def _line_total_amount(self, cr, uid, ids, field_name, arg, context=None): |
103 | @@ -118,8 +152,8 @@ | |||
104 | 118 | help="Quantity returned * Unit sold price",), | 152 | help="Quantity returned * Unit sold price",), |
105 | 119 | 'prodlot_id': fields.many2one( | 153 | 'prodlot_id': fields.many2one( |
106 | 120 | 'stock.production.lot', | 154 | 'stock.production.lot', |
109 | 121 | string='Serial/Lot n°', | 155 | string='Serial Number', |
110 | 122 | help="The serial/lot of the returned product"), | 156 | help="The serial number of the returned product"), |
111 | 123 | 'applicable_guarantee': fields.selection( | 157 | 'applicable_guarantee': fields.selection( |
112 | 124 | [('us', 'Company'), | 158 | [('us', 'Company'), |
113 | 125 | ('supplier', 'Supplier'), | 159 | ('supplier', 'Supplier'), |
114 | @@ -127,16 +161,18 @@ | |||
115 | 127 | 'Warranty type'), | 161 | 'Warranty type'), |
116 | 128 | 'guarantee_limit': fields.date( | 162 | 'guarantee_limit': fields.date( |
117 | 129 | 'Warranty limit', | 163 | 'Warranty limit', |
118 | 130 | readonly=True, | ||
119 | 131 | help="The warranty limit is computed as: invoice date + warranty " | 164 | help="The warranty limit is computed as: invoice date + warranty " |
120 | 132 | "defined on selected product."), | 165 | "defined on selected product."), |
124 | 133 | 'warning': fields.char( | 166 | 'warning': fields.selection([ |
125 | 134 | 'Warranty', | 167 | ('valid', "Valid"), |
126 | 135 | readonly=True, | 168 | ('expired', "Expired"), |
127 | 169 | ('not_define', "Not Defined"), | ||
128 | 170 | ], 'Warranty', | ||
129 | 136 | help="If warranty has expired"), | 171 | help="If warranty has expired"), |
130 | 137 | 'warranty_type': fields.selection( | 172 | 'warranty_type': fields.selection( |
131 | 138 | get_warranty_return_partner, | 173 | get_warranty_return_partner, |
132 | 139 | 'Warranty type', | 174 | 'Warranty type', |
133 | 175 | <<<<<<< TREE | ||
134 | 140 | readonly=True, | 176 | readonly=True, |
135 | 141 | help="Who is in charge of the warranty return treatment towards " | 177 | help="Who is in charge of the warranty return treatment towards " |
136 | 142 | "the end customer. Company will use the current company " | 178 | "the end customer. Company will use the current company " |
137 | @@ -145,13 +181,28 @@ | |||
138 | 145 | "to be applied is the one of the return partner (ie: can be " | 181 | "to be applied is the one of the return partner (ie: can be " |
139 | 146 | "returned to the company and be under the brand warranty"), | 182 | "returned to the company and be under the brand warranty"), |
140 | 147 | 'warranty_return_partner': fields.many2one( | 183 | 'warranty_return_partner': fields.many2one( |
141 | 184 | ======= | ||
142 | 185 | help="Who is in charge of the warranty return treatment towards the end customer. " | ||
143 | 186 | "Company will use the current company delivery or default address and so on for " | ||
144 | 187 | "supplier and brand manufacturer. Does not necessarily mean that the warranty to be " | ||
145 | 188 | "applied is the one of the return partner (ie: can be returned to the company and " | ||
146 | 189 | "be under the brand warranty"), | ||
147 | 190 | "warranty_return_partner" : fields.many2one( | ||
148 | 191 | >>>>>>> MERGE-SOURCE | ||
149 | 148 | 'res.partner', | 192 | 'res.partner', |
150 | 149 | string='Warranty Address', | 193 | string='Warranty Address', |
151 | 150 | help="Where the customer has to send back the product(s)"), | 194 | help="Where the customer has to send back the product(s)"), |
152 | 151 | 'claim_id': fields.many2one( | 195 | 'claim_id': fields.many2one( |
153 | 152 | 'crm.claim', string='Related claim', | 196 | 'crm.claim', string='Related claim', |
154 | 153 | help="To link to the case.claim object"), | 197 | help="To link to the case.claim object"), |
155 | 198 | <<<<<<< TREE | ||
156 | 154 | 'state': fields.selection( | 199 | 'state': fields.selection( |
157 | 200 | ======= | ||
158 | 201 | 'company_id': fields.related( | ||
159 | 202 | 'claim_id', 'company_id', type="many2one", | ||
160 | 203 | relation="res.company", string="Company"), | ||
161 | 204 | 'state' : fields.selection( | ||
162 | 205 | >>>>>>> MERGE-SOURCE | ||
163 | 155 | [('draft', 'Draft'), | 206 | [('draft', 'Draft'), |
164 | 156 | ('refused', 'Refused'), | 207 | ('refused', 'Refused'), |
165 | 157 | ('confirmed', 'Confirmed, waiting for product'), | 208 | ('confirmed', 'Confirmed, waiting for product'), |
166 | @@ -196,6 +247,7 @@ | |||
167 | 196 | 'name': 'none', | 247 | 'name': 'none', |
168 | 197 | } | 248 | } |
169 | 198 | 249 | ||
170 | 250 | <<<<<<< TREE | ||
171 | 199 | @staticmethod | 251 | @staticmethod |
172 | 200 | def warranty_limit(start, warranty_duration): | 252 | def warranty_limit(start, warranty_duration): |
173 | 201 | """ Take a duration in float, return the duration in relativedelta | 253 | """ Take a duration in float, return the duration in relativedelta |
174 | @@ -263,6 +315,8 @@ | |||
175 | 263 | self.set_warranty(cr, uid, [line.id], context=context) | 315 | self.set_warranty(cr, uid, [line.id], context=context) |
176 | 264 | return True | 316 | return True |
177 | 265 | 317 | ||
178 | 318 | ======= | ||
179 | 319 | >>>>>>> MERGE-SOURCE | ||
180 | 266 | def get_destination_location(self, cr, uid, product_id, | 320 | def get_destination_location(self, cr, uid, product_id, |
181 | 267 | warehouse_id, context=None): | 321 | warehouse_id, context=None): |
182 | 268 | """Compute and return the destination location ID to take | 322 | """Compute and return the destination location ID to take |
183 | @@ -281,6 +335,7 @@ | |||
184 | 281 | location_dest_id = seller.name.property_stock_supplier.id | 335 | location_dest_id = seller.name.property_stock_supplier.id |
185 | 282 | return location_dest_id | 336 | return location_dest_id |
186 | 283 | 337 | ||
187 | 338 | <<<<<<< TREE | ||
188 | 284 | # Method to calculate warranty return address | 339 | # Method to calculate warranty return address |
189 | 285 | def set_warranty_return_address(self, cr, uid, ids, claim_line, | 340 | def set_warranty_return_address(self, cr, uid, ids, claim_line, |
190 | 286 | context=None): | 341 | context=None): |
191 | @@ -330,40 +385,35 @@ | |||
192 | 330 | claim_line, context=context) | 385 | claim_line, context=context) |
193 | 331 | return True | 386 | return True |
194 | 332 | 387 | ||
195 | 388 | ======= | ||
196 | 389 | >>>>>>> MERGE-SOURCE | ||
197 | 333 | 390 | ||
198 | 334 | #TODO add the option to split the claim_line in order to manage the same | 391 | #TODO add the option to split the claim_line in order to manage the same |
199 | 335 | # product separately | 392 | # product separately |
200 | 336 | class crm_claim(orm.Model): | 393 | class crm_claim(orm.Model): |
201 | 337 | _inherit = 'crm.claim' | 394 | _inherit = 'crm.claim' |
207 | 338 | 395 | _order = 'number desc' | |
203 | 339 | def _get_sequence_number(self, cr, uid, context=None): | ||
204 | 340 | seq_obj = self.pool.get('ir.sequence') | ||
205 | 341 | res = seq_obj.get(cr, uid, 'crm.claim.rma', context=context) or '/' | ||
206 | 342 | return res | ||
208 | 343 | 396 | ||
209 | 344 | def _get_default_warehouse(self, cr, uid, context=None): | 397 | def _get_default_warehouse(self, cr, uid, context=None): |
222 | 345 | user_obj = self.pool.get('res.users') | 398 | warehouse_model, warehouse_id = self.pool['ir.model.data'].\ |
223 | 346 | user = user_obj.browse(cr, uid, uid, context=context) | 399 | get_object_reference(cr, uid, 'stock', 'warehouse0') |
224 | 347 | company_id = user.company_id.id | 400 | assert warehouse_model == 'stock.warehouse', 'Wrong model !' |
225 | 348 | wh_obj = self.pool.get('stock.warehouse') | 401 | return warehouse_id |
214 | 349 | wh_ids = wh_obj.search(cr, uid, | ||
215 | 350 | [('company_id', '=', company_id)], | ||
216 | 351 | context=context) | ||
217 | 352 | if not wh_ids: | ||
218 | 353 | raise orm.except_orm( | ||
219 | 354 | _('Error!'), | ||
220 | 355 | _('There is no warehouse for the current user\'s company.')) | ||
221 | 356 | return wh_ids[0] | ||
226 | 357 | 402 | ||
227 | 358 | def name_get(self, cr, uid, ids, context=None): | 403 | def name_get(self, cr, uid, ids, context=None): |
228 | 359 | res = [] | 404 | res = [] |
229 | 360 | if isinstance(ids, (int, long)): | 405 | if isinstance(ids, (int, long)): |
230 | 361 | ids = [ids] | 406 | ids = [ids] |
231 | 362 | for claim in self.browse(cr, uid, ids, context=context): | 407 | for claim in self.browse(cr, uid, ids, context=context): |
232 | 408 | <<<<<<< TREE | ||
233 | 363 | number = claim.number and str(claim.number) or '' | 409 | number = claim.number and str(claim.number) or '' |
234 | 364 | res.append((claim.id, '[' + number + '] ' + claim.name)) | 410 | res.append((claim.id, '[' + number + '] ' + claim.name)) |
235 | 411 | ======= | ||
236 | 412 | res.append((claim.id, '[%s] %s' % (claim.number, claim.name))) | ||
237 | 413 | >>>>>>> MERGE-SOURCE | ||
238 | 365 | return res | 414 | return res |
239 | 366 | 415 | ||
240 | 416 | <<<<<<< TREE | ||
241 | 367 | def create(self, cr, uid, vals, context=None): | 417 | def create(self, cr, uid, vals, context=None): |
242 | 368 | if ('number' not in vals) or (vals.get('number') == '/'): | 418 | if ('number' not in vals) or (vals.get('number') == '/'): |
243 | 369 | vals['number'] = self._get_sequence_number(cr, uid, | 419 | vals['number'] = self._get_sequence_number(cr, uid, |
244 | @@ -372,22 +422,22 @@ | |||
245 | 372 | return new_id | 422 | return new_id |
246 | 373 | 423 | ||
247 | 374 | def copy_data(self, cr, uid, id, default=None, context=None): | 424 | def copy_data(self, cr, uid, id, default=None, context=None): |
248 | 425 | ======= | ||
249 | 426 | def copy(self, cr, uid, id, default=None, context=None): | ||
250 | 427 | >>>>>>> MERGE-SOURCE | ||
251 | 375 | if default is None: | 428 | if default is None: |
252 | 376 | default = {} | 429 | default = {} |
254 | 377 | std_default = { | 430 | default.update({ |
255 | 378 | 'invoice_ids': False, | 431 | 'invoice_ids': False, |
256 | 379 | 'picking_ids': False, | 432 | 'picking_ids': False, |
262 | 380 | 'number': self._get_sequence_number(cr, uid, context=context), | 433 | 'number': self.pool['ir.sequence'].get(cr, uid, 'crm.claim.rma'), |
263 | 381 | } | 434 | }) |
264 | 382 | std_default.update(default) | 435 | return super(crm_claim, self).copy( |
265 | 383 | return super(crm_claim, self).copy_data( | 436 | cr, uid, id, default=default, context=context) |
261 | 384 | cr, uid, id, default=std_default, context=context) | ||
266 | 385 | 437 | ||
267 | 386 | _columns = { | 438 | _columns = { |
268 | 387 | 'number': fields.char( | 439 | 'number': fields.char( |
269 | 388 | 'Number', readonly=True, | 440 | 'Number', readonly=True, |
270 | 389 | states={'draft': [('readonly', False)]}, | ||
271 | 390 | required=True, | ||
272 | 391 | select=True, | 441 | select=True, |
273 | 392 | help="Company internal claim unique number"), | 442 | help="Company internal claim unique number"), |
274 | 393 | 'claim_type': fields.selection( | 443 | 'claim_type': fields.selection( |
275 | @@ -396,6 +446,7 @@ | |||
276 | 396 | ('other', 'Other')], | 446 | ('other', 'Other')], |
277 | 397 | string='Claim type', | 447 | string='Claim type', |
278 | 398 | required=True, | 448 | required=True, |
279 | 449 | track_visibility='onchange', | ||
280 | 399 | help="Customer: from customer to company.\n " | 450 | help="Customer: from customer to company.\n " |
281 | 400 | "Supplier: from company to supplier."), | 451 | "Supplier: from company to supplier."), |
282 | 401 | 'claim_line_ids': fields.one2many( | 452 | 'claim_line_ids': fields.one2many( |
283 | @@ -409,19 +460,23 @@ | |||
284 | 409 | 'account.invoice', 'claim_id', 'Refunds'), | 460 | 'account.invoice', 'claim_id', 'Refunds'), |
285 | 410 | 'picking_ids': fields.one2many('stock.picking', 'claim_id', 'RMA'), | 461 | 'picking_ids': fields.one2many('stock.picking', 'claim_id', 'RMA'), |
286 | 411 | 'invoice_id': fields.many2one( | 462 | 'invoice_id': fields.many2one( |
287 | 463 | <<<<<<< TREE | ||
288 | 412 | 'account.invoice', string='Invoice', | 464 | 'account.invoice', string='Invoice', |
289 | 413 | help='Related original Cusotmer invoice'), | 465 | help='Related original Cusotmer invoice'), |
290 | 414 | 'delivery_address_id': fields.many2one( | 466 | 'delivery_address_id': fields.many2one( |
291 | 415 | 'res.partner', string='Partner delivery address', | 467 | 'res.partner', string='Partner delivery address', |
292 | 416 | help="This address will be used to deliver repaired or replacement" | 468 | help="This address will be used to deliver repaired or replacement" |
293 | 417 | "products."), | 469 | "products."), |
294 | 470 | ======= | ||
295 | 471 | 'account.invoice', string='Customer Invoice', | ||
296 | 472 | help='Related original Customer invoice'), | ||
297 | 473 | >>>>>>> MERGE-SOURCE | ||
298 | 418 | 'warehouse_id': fields.many2one( | 474 | 'warehouse_id': fields.many2one( |
299 | 419 | 'stock.warehouse', string='Warehouse', | 475 | 'stock.warehouse', string='Warehouse', |
300 | 420 | required=True), | 476 | required=True), |
301 | 421 | } | 477 | } |
302 | 422 | 478 | ||
303 | 423 | _defaults = { | 479 | _defaults = { |
304 | 424 | 'number': '/', | ||
305 | 425 | 'claim_type': 'customer', | 480 | 'claim_type': 'customer', |
306 | 426 | 'warehouse_id': _get_default_warehouse, | 481 | 'warehouse_id': _get_default_warehouse, |
307 | 427 | } | 482 | } |
308 | @@ -431,11 +486,44 @@ | |||
309 | 431 | 'Number/Reference must be unique per Company!'), | 486 | 'Number/Reference must be unique per Company!'), |
310 | 432 | ] | 487 | ] |
311 | 433 | 488 | ||
312 | 489 | <<<<<<< TREE | ||
313 | 434 | def onchange_partner_address_id(self, cr, uid, ids, add, email=False, | 490 | def onchange_partner_address_id(self, cr, uid, ids, add, email=False, |
314 | 435 | context=None): | 491 | context=None): |
315 | 436 | res = super(crm_claim, self | 492 | res = super(crm_claim, self |
316 | 437 | ).onchange_partner_address_id(cr, uid, ids, add, | 493 | ).onchange_partner_address_id(cr, uid, ids, add, |
317 | 438 | email=email) | 494 | email=email) |
318 | 495 | ======= | ||
319 | 496 | def create(self, cr, uid, vals, context=None): | ||
320 | 497 | if not vals: | ||
321 | 498 | vals = {} | ||
322 | 499 | if not vals.get('number'): | ||
323 | 500 | vals['number'] = self.pool['ir.sequence'].next_by_code( | ||
324 | 501 | cr, uid, 'crm.claim.rma') | ||
325 | 502 | return super(crm_claim, self).create(cr, uid, vals, context=context) | ||
326 | 503 | |||
327 | 504 | def _get_return_info_from_product( | ||
328 | 505 | self, cr, uid, product, company_id, context=None): | ||
329 | 506 | seller = product.seller_info_id | ||
330 | 507 | if seller: | ||
331 | 508 | return_address_id = seller.warranty_return_address.id | ||
332 | 509 | return_type = seller.warranty_return_partner | ||
333 | 510 | else: | ||
334 | 511 | # when no supplier is configured, get the info from the company | ||
335 | 512 | if not company_id: | ||
336 | 513 | company_id = self.pool['res.company']._company_default_get( | ||
337 | 514 | cr, uid, 'claim.line', context=context) | ||
338 | 515 | company = self.pool['res.company'].browse( | ||
339 | 516 | cr, uid, company_id, context=context) | ||
340 | 517 | return_address_id = (company.crm_return_address_id.id or | ||
341 | 518 | company.partner_id.id) | ||
342 | 519 | return_type = 'company' | ||
343 | 520 | return (return_address_id, return_type) | ||
344 | 521 | |||
345 | 522 | def onchange_partner_address_id( | ||
346 | 523 | self, cr, uid, ids, add, email=False, context=None): | ||
347 | 524 | res = super(crm_claim, self).onchange_partner_address_id( | ||
348 | 525 | cr, uid, ids, add, email=email) | ||
349 | 526 | >>>>>>> MERGE-SOURCE | ||
350 | 439 | if add: | 527 | if add: |
351 | 440 | if (not res['value']['email_from'] | 528 | if (not res['value']['email_from'] |
352 | 441 | or not res['value']['partner_phone']): | 529 | or not res['value']['partner_phone']): |
353 | @@ -448,26 +536,66 @@ | |||
354 | 448 | res['value']['partner_phone'] = other_add.phone | 536 | res['value']['partner_phone'] = other_add.phone |
355 | 449 | return res | 537 | return res |
356 | 450 | 538 | ||
357 | 539 | <<<<<<< TREE | ||
358 | 451 | def onchange_invoice_id(self, cr, uid, ids, invoice_id, warehouse_id, | 540 | def onchange_invoice_id(self, cr, uid, ids, invoice_id, warehouse_id, |
359 | 452 | context=None): | 541 | context=None): |
360 | 542 | ======= | ||
361 | 543 | def onchange_invoice_id( | ||
362 | 544 | self, cr, uid, ids, invoice_id, warehouse_id, claim_date, | ||
363 | 545 | company_id, context=None): | ||
364 | 546 | >>>>>>> MERGE-SOURCE | ||
365 | 453 | invoice_line_obj = self.pool.get('account.invoice.line') | 547 | invoice_line_obj = self.pool.get('account.invoice.line') |
366 | 454 | invoice_obj = self.pool.get('account.invoice') | 548 | invoice_obj = self.pool.get('account.invoice') |
367 | 455 | claim_line_obj = self.pool.get('claim.line') | 549 | claim_line_obj = self.pool.get('claim.line') |
372 | 456 | invoice_line_ids = invoice_line_obj.search( | 550 | if not invoice_id: |
373 | 457 | cr, uid, | 551 | return {} |
374 | 458 | [('invoice_id', '=', invoice_id)], | 552 | invoice = self.pool['account.invoice'].browse( |
375 | 459 | context=context) | 553 | cr, uid, invoice_id, context=context) |
376 | 554 | |||
377 | 555 | if not invoice.date_invoice: | ||
378 | 556 | raise orm.except_orm( | ||
379 | 557 | _('Error'), | ||
380 | 558 | _("The invoice %s doesn't have a date. " | ||
381 | 559 | "Must be a validated invoice." % invoice.number)) | ||
382 | 560 | date_inv_dt = datetime.strptime( | ||
383 | 561 | invoice.date_invoice, DEFAULT_SERVER_DATE_FORMAT) | ||
384 | 562 | |||
385 | 460 | claim_lines = [] | 563 | claim_lines = [] |
386 | 461 | value = {} | 564 | value = {} |
387 | 462 | if not warehouse_id: | 565 | if not warehouse_id: |
388 | 566 | <<<<<<< TREE | ||
389 | 463 | warehouse_id = self._get_default_warehouse(cr, uid, | 567 | warehouse_id = self._get_default_warehouse(cr, uid, |
390 | 464 | context=context) | 568 | context=context) |
391 | 465 | invoice_lines = invoice_line_obj.browse(cr, uid, invoice_line_ids, | 569 | invoice_lines = invoice_line_obj.browse(cr, uid, invoice_line_ids, |
392 | 466 | context=context) | 570 | context=context) |
393 | 467 | for invoice_line in invoice_lines: | 571 | for invoice_line in invoice_lines: |
394 | 572 | ======= | ||
395 | 573 | warehouse_id = self._get_default_warehouse( | ||
396 | 574 | cr, uid, context=context) | ||
397 | 575 | |||
398 | 576 | for invoice_line in invoice.invoice_line: | ||
399 | 577 | >>>>>>> MERGE-SOURCE | ||
400 | 468 | location_dest_id = claim_line_obj.get_destination_location( | 578 | location_dest_id = claim_line_obj.get_destination_location( |
401 | 469 | cr, uid, invoice_line.product_id.id, | 579 | cr, uid, invoice_line.product_id.id, |
402 | 470 | warehouse_id, context=context) | 580 | warehouse_id, context=context) |
403 | 581 | |||
404 | 582 | warning = 'not_define' | ||
405 | 583 | warranty_duration = invoice_line.product_id.warranty | ||
406 | 584 | limit = self.pool['product.product'].warranty_limit( | ||
407 | 585 | cr, uid, date_inv_dt, warranty_duration, context=context) | ||
408 | 586 | # If warranty period was defined | ||
409 | 587 | if warranty_duration > 0: | ||
410 | 588 | claim_date_dt = datetime.strptime( | ||
411 | 589 | claim_date, DEFAULT_SERVER_DATETIME_FORMAT) | ||
412 | 590 | if limit < claim_date_dt: | ||
413 | 591 | warning = 'expired' | ||
414 | 592 | else: | ||
415 | 593 | warning = 'valid' | ||
416 | 594 | |||
417 | 595 | return_address_id, return_type = \ | ||
418 | 596 | self._get_return_info_from_product( | ||
419 | 597 | cr, uid, product, company_id, context=context) | ||
420 | 598 | |||
421 | 471 | claim_lines.append({ | 599 | claim_lines.append({ |
422 | 472 | 'name': invoice_line.name, | 600 | 'name': invoice_line.name, |
423 | 473 | 'claim_origine': "none", | 601 | 'claim_origine': "none", |
424 | @@ -477,6 +605,10 @@ | |||
425 | 477 | 'unit_sale_price': invoice_line.price_unit, | 605 | 'unit_sale_price': invoice_line.price_unit, |
426 | 478 | 'location_dest_id': location_dest_id, | 606 | 'location_dest_id': location_dest_id, |
427 | 479 | 'state': 'draft', | 607 | 'state': 'draft', |
428 | 608 | 'warranty_return_partner': return_address_id, | ||
429 | 609 | 'warranty_type': return_type, | ||
430 | 610 | 'guarantee_limit': limit.strftime(DEFAULT_SERVER_DATE_FORMAT), | ||
431 | 611 | 'warning': warning, | ||
432 | 480 | }) | 612 | }) |
433 | 481 | value = {'claim_line_ids': claim_lines} | 613 | value = {'claim_line_ids': claim_lines} |
434 | 482 | delivery_address_id = False | 614 | delivery_address_id = False |
435 | 483 | 615 | ||
436 | === modified file 'crm_claim_rma/crm_claim_rma_data.xml' | |||
437 | --- crm_claim_rma/crm_claim_rma_data.xml 2013-04-30 19:15:31 +0000 | |||
438 | +++ crm_claim_rma/crm_claim_rma_data.xml 2015-11-20 10:22:38 +0000 | |||
439 | @@ -1,104 +1,96 @@ | |||
440 | 1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> |
441 | 2 | <openerp> | 2 | <openerp> |
543 | 3 | <data noupdate="1"> | 3 | <data noupdate="1"> |
544 | 4 | <!-- Claims Sequence n° --> | 4 | |
545 | 5 | <record id="seq_type_claim" model="ir.sequence.type"> | 5 | <!-- Claims Sequence n° --> |
546 | 6 | <field name="name">CRM Claim</field> | 6 | <record id="seq_type_claim" model="ir.sequence.type"> |
547 | 7 | <field name="code">crm.claim.rma</field> | 7 | <field name="name">CRM Claim</field> |
548 | 8 | </record> | 8 | <field name="code">crm.claim.rma</field> |
549 | 9 | 9 | </record> | |
550 | 10 | <record id="seq_claim" model="ir.sequence"> | 10 | |
551 | 11 | <field name="name">CRM Claim</field> | 11 | <record id="seq_claim" model="ir.sequence"> |
552 | 12 | <field name="code">crm.claim.rma</field> | 12 | <field name="name">CRM Claim</field> |
553 | 13 | <field eval="5" name="padding"/> | 13 | <field name="code">crm.claim.rma</field> |
554 | 14 | <field name="prefix">RMA-%(year)s/</field> | 14 | <field name="padding" eval="5"/> |
555 | 15 | </record> | 15 | <field name="prefix">RMA-%(year)s/</field> |
556 | 16 | 16 | </record> | |
557 | 17 | <!-- | 17 | |
558 | 18 | Claim sections | 18 | <!-- Claim sections --> |
559 | 19 | --> | 19 | |
560 | 20 | 20 | <record model="crm.case.section" id="section_after_sales_service"> | |
561 | 21 | <record model="crm.case.section" id="section_after_sales_service"> | 21 | <field name="name">After Sales Service</field> |
562 | 22 | <field name="name">After Sales Service</field> | 22 | <field name="code">ASV</field> |
563 | 23 | <field name="code">ASV</field> | 23 | <field name="parent_id" ref="crm.section_sales_department"/> |
564 | 24 | <field name="parent_id" ref="crm.section_sales_department"/> | 24 | </record> |
565 | 25 | <!-- <field name="stage_ids" eval="[(4, ref('crm_claim.stage_claim1')), (4, ref('crm_claim.stage_claim2')), (4, ref('crm_claim.stage_claim3')), (4, ref('crm_claim.stage_claim5'))]"/> --> | 25 | |
566 | 26 | </record> | 26 | <!-- Claim categories --> |
567 | 27 | 27 | ||
568 | 28 | <!-- | 28 | <record model="crm.case.categ" id="categ_claim10"> |
569 | 29 | Claim categories | 29 | <field name="name">No Inventory</field> |
570 | 30 | --> | 30 | <field name="section_id" ref="section_after_sales_service"/> |
571 | 31 | 31 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
572 | 32 | <record model="crm.case.categ" id="categ_claim10"> | 32 | </record> |
573 | 33 | <field name="name">No Inventory</field> | 33 | |
574 | 34 | <field name="section_id" ref="section_after_sales_service"/> | 34 | <record model="crm.case.categ" id="categ_claim11"> |
575 | 35 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 35 | <field name="name">Customer Return</field> |
576 | 36 | </record> | 36 | <field name="section_id" ref="section_after_sales_service"/> |
577 | 37 | 37 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
578 | 38 | <record model="crm.case.categ" id="categ_claim11"> | 38 | </record> |
579 | 39 | <field name="name">Customer Return</field> | 39 | |
580 | 40 | <field name="section_id" ref="section_after_sales_service"/> | 40 | <record model="crm.case.categ" id="categ_claim12"> |
581 | 41 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 41 | <field name="name">Cancelled by Customer</field> |
582 | 42 | </record> | 42 | <field name="section_id" ref="section_after_sales_service"/> |
583 | 43 | 43 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
584 | 44 | <record model="crm.case.categ" id="categ_claim12"> | 44 | </record> |
585 | 45 | <field name="name">Buyer Cancelled</field> | 45 | |
586 | 46 | <field name="section_id" ref="section_after_sales_service"/> | 46 | <record model="crm.case.categ" id="categ_claim13"> |
587 | 47 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 47 | <field name="name">General Adjustement</field> |
588 | 48 | </record> | 48 | <field name="section_id" ref="section_after_sales_service"/> |
589 | 49 | 49 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
590 | 50 | <record model="crm.case.categ" id="categ_claim13"> | 50 | </record> |
591 | 51 | <field name="name">General Adjustement</field> | 51 | |
592 | 52 | <field name="section_id" ref="section_after_sales_service"/> | 52 | <record model="crm.case.categ" id="categ_claim14"> |
593 | 53 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 53 | <field name="name">Could Not Ship</field> |
594 | 54 | </record> | 54 | <field name="section_id" ref="section_after_sales_service"/> |
595 | 55 | 55 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
596 | 56 | <record model="crm.case.categ" id="categ_claim14"> | 56 | </record> |
597 | 57 | <field name="name">Could Not Ship</field> | 57 | |
598 | 58 | <field name="section_id" ref="section_after_sales_service"/> | 58 | <record model="crm.case.categ" id="categ_claim15"> |
599 | 59 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 59 | <field name="name">Different Item</field> |
600 | 60 | </record> | 60 | <field name="section_id" ref="section_after_sales_service"/> |
601 | 61 | 61 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
602 | 62 | <record model="crm.case.categ" id="categ_claim15"> | 62 | </record> |
603 | 63 | <field name="name">Different Item</field> | 63 | |
604 | 64 | <field name="section_id" ref="section_after_sales_service"/> | 64 | <record model="crm.case.categ" id="categ_claim16"> |
605 | 65 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 65 | <field name="name">Merchandise Not Received</field> |
606 | 66 | </record> | 66 | <field name="section_id" ref="section_after_sales_service"/> |
607 | 67 | 67 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
608 | 68 | <record model="crm.case.categ" id="categ_claim16"> | 68 | </record> |
609 | 69 | <field name="name">Merchandise Not Received</field> | 69 | |
610 | 70 | <field name="section_id" ref="section_after_sales_service"/> | 70 | <record model="crm.case.categ" id="categ_claim17"> |
611 | 71 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 71 | <field name="name">Merchandise Not As Described</field> |
612 | 72 | </record> | 72 | <field name="section_id" ref="section_after_sales_service"/> |
613 | 73 | 73 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
614 | 74 | <record model="crm.case.categ" id="categ_claim17"> | 74 | </record> |
615 | 75 | <field name="name">Merchandise Not As Described</field> | 75 | |
616 | 76 | <field name="section_id" ref="section_after_sales_service"/> | 76 | <record model="crm.case.categ" id="categ_claim18"> |
617 | 77 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 77 | <field name="name">Price Error</field> |
618 | 78 | </record> | 78 | <field name="section_id" ref="section_after_sales_service"/> |
619 | 79 | 79 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
620 | 80 | <record model="crm.case.categ" id="categ_claim18"> | 80 | </record> |
621 | 81 | <field name="name">Pricing Error</field> | 81 | |
622 | 82 | <field name="section_id" ref="section_after_sales_service"/> | 82 | <record model="crm.case.categ" id="categ_claim19"> |
623 | 83 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 83 | <field name="name">Shipping Address Undeliverable</field> |
624 | 84 | </record> | 84 | <field name="section_id" ref="section_after_sales_service"/> |
625 | 85 | 85 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
626 | 86 | <record model="crm.case.categ" id="categ_claim19"> | 86 | </record> |
627 | 87 | <field name="name">Shipping Address Undeliverable</field> | 87 | |
628 | 88 | <field name="section_id" ref="section_after_sales_service"/> | 88 | <record model="crm.case.categ" id="categ_claim20"> |
629 | 89 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 89 | <field name="name">Delivered Late by Carrier</field> |
630 | 90 | </record> | 90 | <field name="section_id" ref="section_after_sales_service"/> |
631 | 91 | 91 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | |
632 | 92 | <record model="crm.case.categ" id="categ_claim20"> | 92 | </record> |
633 | 93 | <field name="name">Delivered Late by Carrier</field> | 93 | |
634 | 94 | <field name="section_id" ref="section_after_sales_service"/> | 94 | |
635 | 95 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | 95 | </data> |
535 | 96 | </record> | ||
536 | 97 | |||
537 | 98 | <record model="crm.case.categ" id="categ_claim21"> | ||
538 | 99 | <field name="name">Missed Fulfilment Promise</field> | ||
539 | 100 | <field name="section_id" ref="section_after_sales_service"/> | ||
540 | 101 | <field name="object_id" search="[('model','=','crm.claim')]" model="ir.model"/> | ||
541 | 102 | </record> | ||
542 | 103 | </data> | ||
636 | 104 | </openerp> | 96 | </openerp> |
637 | 105 | 97 | ||
638 | === modified file 'crm_claim_rma/crm_claim_rma_view.xml' | |||
639 | --- crm_claim_rma/crm_claim_rma_view.xml 2014-04-23 07:07:52 +0000 | |||
640 | +++ crm_claim_rma/crm_claim_rma_view.xml 2015-11-20 10:22:38 +0000 | |||
641 | @@ -7,42 +7,29 @@ | |||
642 | 7 | <field name="name">CRM - Claims Search</field> | 7 | <field name="name">CRM - Claims Search</field> |
643 | 8 | <field name="model">claim.line</field> | 8 | <field name="model">claim.line</field> |
644 | 9 | <field name="arch" type="xml"> | 9 | <field name="arch" type="xml"> |
672 | 10 | <search string="Search Claims"> | 10 | <search string="Search Return Lines"> |
673 | 11 | <filter icon="terp-check" string="Current" name="current" | 11 | <filter string="Current" name="current" |
674 | 12 | domain="[('state','in',('draft', 'refused', 'treated'))]" | 12 | domain="[('state', 'in', ('draft', 'refused', 'treated'))]" |
675 | 13 | separator="1" help="Draft and Open Claims" /> | 13 | help="Draft and Open Return Lines" /> |
676 | 14 | <filter icon="terp-camera_test" | 14 | <filter string="In Progress" name="in_progress" |
677 | 15 | string="In Progress" | 15 | domain="[('state', 'in', ('confirmed', 'in_to_control', 'in_to_treate'))]" |
678 | 16 | domain="[('state','in',('confirmed','in_to_control','in_to_treate'))]" | 16 | help="Return Lines In Progress"/> |
679 | 17 | separator="1" help="In Progress Claims"/> | 17 | <field name="state"/> |
680 | 18 | <separator orientation="vertical"/> | 18 | <field name="substate_id"/> |
681 | 19 | <field name="state" select='1'/> | 19 | <field name="name"/> |
682 | 20 | <field name="substate_id" select='1'/> | 20 | <field name="warning"/> |
683 | 21 | <field name="name" select='1'/> | 21 | <field name="invoice_line_id"/> |
684 | 22 | <field name="warning" select='1'/> | 22 | <field name="product_id"/> |
685 | 23 | <field name="invoice_line_id" select='1'/> | 23 | <field name="prodlot_id"/> |
686 | 24 | <field name="product_id" select='1'/> | 24 | <group string="Group By..." name="group_by"> |
687 | 25 | <field name="prodlot_id" select='1'/> | 25 | <filter string="Invoice" |
661 | 26 | <newline/> | ||
662 | 27 | <group expand="0" string="More"> | ||
663 | 28 | <field name="last_state_change" select='1'/> | ||
664 | 29 | <field name="guarantee_limit" select='1'/> | ||
665 | 30 | <field name="return_value" select='1'/> | ||
666 | 31 | <field name="name" select='1'/> | ||
667 | 32 | </group> | ||
668 | 33 | <newline/> | ||
669 | 34 | <group expand="0" string="Group By..."> | ||
670 | 35 | <filter string="Invoice" icon="terp-dolar" | ||
671 | 36 | domain="[]" help="Invoice" | ||
688 | 37 | context="{'group_by':'invoice_id'}" /> | 26 | context="{'group_by':'invoice_id'}" /> |
691 | 38 | <filter string="Product" icon="terp-product" | 27 | <filter string="Product" |
690 | 39 | domain="[]" help="Product" | ||
692 | 40 | context="{'group_by':'product_id'}" /> | 28 | context="{'group_by':'product_id'}" /> |
698 | 41 | <separator orientation="vertical"/> | 29 | <filter string="Substate" |
699 | 42 | <filter string="Substate" icon="terp-stage" | 30 | context="{'group_by':'substate_id'}" /> |
700 | 43 | domain="[]" context="{'group_by':'substate_id'}" /> | 31 | <filter string="Claim n°" |
701 | 44 | <filter string="Claim n°" icon="terp-emblem-documents" | 32 | context="{'group_by':'claim_id'}" /> |
697 | 45 | domain="[]" context="{'group_by':'claim_id'}" /> | ||
702 | 46 | </group> | 33 | </group> |
703 | 47 | </search> | 34 | </search> |
704 | 48 | </field> | 35 | </field> |
705 | @@ -54,16 +41,15 @@ | |||
706 | 54 | <field name="model">claim.line</field> | 41 | <field name="model">claim.line</field> |
707 | 55 | <field name="arch" type="xml"> | 42 | <field name="arch" type="xml"> |
708 | 56 | <tree string="Returned lines"> | 43 | <tree string="Returned lines"> |
710 | 57 | <field name="claim_id" invisible="1"/> | 44 | <field name="claim_id" invisible="not context.get('claim_line_main_view')"/> |
711 | 58 | <field name="state"/> | 45 | <field name="state"/> |
712 | 59 | <field name="substate_id"/> | 46 | <field name="substate_id"/> |
713 | 60 | <field name="product_id"/> | 47 | <field name="product_id"/> |
714 | 61 | <field name="name"/> | 48 | <field name="name"/> |
715 | 62 | <field name="prodlot_id"/> | 49 | <field name="prodlot_id"/> |
720 | 63 | <field name="warning"/> | 50 | <field name="warning"/> |
721 | 64 | <field name="warranty_type"/> | 51 | <field name="warranty_type"/> |
722 | 65 | <field name="warranty_return_partner"/> | 52 | <field name="warranty_return_partner"/> |
719 | 66 | <button name="set_warranty" string="Compute Waranty" type="object" icon="gtk-justify-fill"/> | ||
723 | 67 | <field name="product_returned_quantity"/> | 53 | <field name="product_returned_quantity"/> |
724 | 68 | <field name="claim_origine"/> | 54 | <field name="claim_origine"/> |
725 | 69 | <field name="refund_line_id"/> | 55 | <field name="refund_line_id"/> |
726 | @@ -79,52 +65,50 @@ | |||
727 | 79 | <field name="model">claim.line</field> | 65 | <field name="model">claim.line</field> |
728 | 80 | <field name="arch" type="xml"> | 66 | <field name="arch" type="xml"> |
729 | 81 | <form string="Claim Line" version="7.0"> | 67 | <form string="Claim Line" version="7.0"> |
735 | 82 | <header> | 68 | <sheet string="Claims"> |
736 | 83 | <button name="set_warranty" string="Calculate warranty state" type="object" class="oe_highlight"/> | 69 | <div class="oe_title"> |
732 | 84 | </header> | ||
733 | 85 | <sheet string="Claims"> | ||
734 | 86 | <div class="oe_title"> | ||
737 | 87 | <group> | 70 | <group> |
738 | 88 | <label for="name" class="oe_edit_only"/> | 71 | <label for="name" class="oe_edit_only"/> |
739 | 89 | <h1><field name="name"/></h1> | 72 | <h1><field name="name"/></h1> |
740 | 90 | </group> | 73 | </group> |
778 | 91 | </div> | 74 | </div> |
779 | 92 | <group> | 75 | <group> |
780 | 93 | <group string="Returned good"> | 76 | <group string="Returned good"> |
781 | 94 | <field name="product_returned_quantity"/> | 77 | <field name="product_returned_quantity"/> |
782 | 95 | <field name="product_id"/> | 78 | <field name="product_id" on_change="product_id_change(product_id, company_id, context)"/> |
783 | 96 | <field name="prodlot_id"/> | 79 | <field name="prodlot_id" on_change="prodlot_id_change(prodlot_id, company_id, parent.warehouse_id, context)"/> |
784 | 97 | <field name="unit_sale_price"/> | 80 | <field name="unit_sale_price"/> |
785 | 98 | <field name="return_value"/> | 81 | <field name="return_value"/> |
786 | 99 | </group> | 82 | </group> |
787 | 100 | <group string="Linked Document"> | 83 | <group string="Linked Document"> |
788 | 101 | <field name="claim_id" /> | 84 | <field name="claim_id" invisible="not context.get('claim_line_main_view')"/> |
789 | 102 | <field name="invoice_line_id"/> | 85 | <field name="company_id" groups="base.group_multi_company"/> |
790 | 103 | <field name="refund_line_id"/> | 86 | <field name="invoice_line_id"/> |
791 | 104 | <field name="move_in_id"/> | 87 | <field name="refund_line_id"/> |
792 | 105 | <field name="move_out_id"/> | 88 | <field name="move_in_id"/> |
793 | 106 | </group> | 89 | <field name="move_out_id"/> |
794 | 107 | </group> | 90 | </group> |
795 | 108 | <group> | 91 | </group> |
796 | 109 | <group string="Problem"> | 92 | <group> |
797 | 110 | <field name="claim_origine" nolabel="1" colspan="4"/> | 93 | <group string="Problem"> |
798 | 111 | <field name="claim_descr" nolabel="1" colspan="4"/> | 94 | <field name="claim_origine" nolabel="1" colspan="2"/> |
799 | 112 | </group> | 95 | <field name="claim_descr" nolabel="1" colspan="2"/> |
800 | 113 | <group string="Warranty"> | 96 | </group> |
801 | 114 | <field name="guarantee_limit"/> | 97 | <group string="Warranty"> |
802 | 115 | <field name="warning"/> | 98 | <field name="guarantee_limit"/> |
803 | 116 | <field name="warranty_return_partner"/> | 99 | <field name="warning"/> |
804 | 117 | <field name="warranty_type"/> | 100 | <field name="warranty_return_partner"/> |
805 | 118 | </group> | 101 | <field name="warranty_type"/> |
806 | 119 | </group> | 102 | </group> |
807 | 120 | <separator string="State" colspan="4"/> | 103 | <group name="state" string="State"> |
808 | 121 | <group col="6" colspan="4"> | 104 | <field name="state"/> |
809 | 122 | <field name="state"/> | 105 | <field name="substate_id" widget="selection" /> |
810 | 123 | <field name="substate_id" widget='selection' /> | 106 | <field name="location_dest_id"/> |
811 | 124 | <field name="last_state_change"/> | 107 | <field name="last_state_change"/> |
812 | 125 | </group> | 108 | </group> |
813 | 126 | </sheet> | 109 | </group> |
814 | 127 | </form> | 110 | </sheet> |
815 | 111 | </form> | ||
816 | 128 | </field> | 112 | </field> |
817 | 129 | </record> | 113 | </record> |
818 | 130 | 114 | ||
819 | @@ -140,41 +124,48 @@ | |||
820 | 140 | </field> | 124 | </field> |
821 | 141 | <field name="name" position="before"> | 125 | <field name="name" position="before"> |
822 | 142 | <field name="number" /> | 126 | <field name="number" /> |
823 | 127 | <field name="claim_type" /> | ||
824 | 143 | </field> | 128 | </field> |
825 | 144 | </field> | 129 | </field> |
826 | 145 | </record> | 130 | </record> |
827 | 146 | 131 | ||
841 | 147 | <record model="ir.ui.view" id="crm_case_claims_form_view_replace"> | 132 | <record id="crm_case_claims_form_view" model="ir.ui.view"> |
842 | 148 | <field name="name">CRM - Claims Form</field> | 133 | <field name="name">CRM RMA - Claims Form</field> |
830 | 149 | <field name="model">crm.claim</field> | ||
831 | 150 | <field name="inherit_id" ref="crm_claim.crm_case_claims_form_view"/> | ||
832 | 151 | <field name="arch" type="xml"> | ||
833 | 152 | <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]" position="replace"> | ||
834 | 153 | <field name="categ_id" /> | ||
835 | 154 | </field> | ||
836 | 155 | </field> | ||
837 | 156 | </record> | ||
838 | 157 | |||
839 | 158 | <record model="ir.ui.view" id="crm_claim_rma_form_view"> | ||
840 | 159 | <field name="name">CRM - Claim product return Form</field> | ||
843 | 160 | <field name="model">crm.claim</field> | 134 | <field name="model">crm.claim</field> |
844 | 161 | <field name="inherit_id" ref="crm_claim.crm_case_claims_form_view"/> | 135 | <field name="inherit_id" ref="crm_claim.crm_case_claims_form_view"/> |
845 | 162 | <field name="arch" type="xml"> | 136 | <field name="arch" type="xml"> |
847 | 163 | <page string="Follow Up" position="before"> | 137 | <xpath expr="//sheet/group" position="before"> |
848 | 138 | <group name="number"> | ||
849 | 139 | <div class="oe_title"> | ||
850 | 140 | <label for="number" class="oe_edit_only"/> | ||
851 | 141 | <h1><field name="number"/></h1> | ||
852 | 142 | </div> | ||
853 | 143 | </group> | ||
854 | 144 | </xpath> | ||
855 | 145 | <field name="date_deadline" position="after"> | ||
856 | 146 | <field name="claim_type"/> | ||
857 | 147 | <field name="warehouse_id" /> | ||
858 | 148 | </field> | ||
859 | 149 | <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]" position="replace"> | ||
860 | 150 | <field name="categ_id" /> | ||
861 | 151 | </field> | ||
862 | 152 | <notebook position="inside"> | ||
863 | 164 | <page string="Product Return"> | 153 | <page string="Product Return"> |
866 | 165 | <group name="Product Return"> | 154 | <group name="Product Return" string="Product Returns"> |
865 | 166 | <separator string="Product Return" colspan="4"/> | ||
867 | 167 | <group> | 155 | <group> |
868 | 156 | <<<<<<< TREE | ||
869 | 168 | <field name="invoice_id" on_change="onchange_invoice_id(invoice_id,warehouse_id,context)" domain="['|',('commercial_partner_id','=',partner_id),('partner_id','=',partner_id)]" /> | 157 | <field name="invoice_id" on_change="onchange_invoice_id(invoice_id,warehouse_id,context)" domain="['|',('commercial_partner_id','=',partner_id),('partner_id','=',partner_id)]" /> |
870 | 169 | <field name="delivery_address_id" context="{'tree_view_ref': 'crm_claim_rma.view_partner_contact_tree', 'search_default_parent_id': partner_id}"/> | 158 | <field name="delivery_address_id" context="{'tree_view_ref': 'crm_claim_rma.view_partner_contact_tree', 'search_default_parent_id': partner_id}"/> |
871 | 159 | ======= | ||
872 | 160 | <field name="invoice_id" on_change="onchange_invoice_id(invoice_id, warehouse_id, date, company_id, context)" domain="['|', ('commercial_partner_id', '=', partner_id), ('partner_id', '=', partner_id), ('type', '=', 'out_invoice'), ('state', 'in', ('open', 'paid'))]" context="{'form_view_ref': 'account.invoice_form'}"/> | ||
873 | 161 | >>>>>>> MERGE-SOURCE | ||
874 | 170 | </group> | 162 | </group> |
875 | 171 | <group> | 163 | <group> |
876 | 172 | <!-- Place for mass return button from crm_rma_lot_mass_return --> | 164 | <!-- Place for mass return button from crm_rma_lot_mass_return --> |
877 | 173 | </group> | 165 | </group> |
878 | 174 | <field name="claim_line_ids" nolabel="1" colspan="4" editable="top"/> | 166 | <field name="claim_line_ids" nolabel="1" colspan="4" editable="top"/> |
879 | 175 | </group> | 167 | </group> |
882 | 176 | <group col="4" colspan="4" attrs="{'invisible':[('state', '<>','open')]}"> | 168 | <group attrs="{'invisible':[('state', '<>','open')]}" string="Actions on Product Returns" name="actions"> |
881 | 177 | <separator string="Action" colspan="4" /> | ||
883 | 178 | <button name="%(action_claim_picking_in)d" | 169 | <button name="%(action_claim_picking_in)d" |
884 | 179 | string="New Products Return" states="open" | 170 | string="New Products Return" states="open" |
885 | 180 | type="action" target="new" | 171 | type="action" target="new" |
886 | @@ -189,7 +180,7 @@ | |||
887 | 189 | 180 | ||
888 | 190 | <button name="%(account.action_account_invoice_refund)d" | 181 | <button name="%(account.action_account_invoice_refund)d" |
889 | 191 | type='action' string='New Refund' | 182 | type='action' string='New Refund' |
891 | 192 | states='open' icon="gtk-execute" | 183 | states='open' |
892 | 193 | context="{ | 184 | context="{ |
893 | 194 | 'invoice_ids': [invoice_id], | 185 | 'invoice_ids': [invoice_id], |
894 | 195 | 'claim_line_ids': claim_line_ids, | 186 | 'claim_line_ids': claim_line_ids, |
895 | @@ -199,16 +190,19 @@ | |||
896 | 199 | </group> | 190 | </group> |
897 | 200 | </page> | 191 | </page> |
898 | 201 | <page string="Generated Documents"> | 192 | <page string="Generated Documents"> |
903 | 202 | <separator colspan="2" string="Refunds"/> | 193 | <group name="refunds" string="Refunds"> |
904 | 203 | <field name="invoice_ids" colspan="4" readonly="1"/> | 194 | <field name="invoice_ids" readonly="1" nolabel="1"/> |
905 | 204 | <separator colspan="2" string="Receptions / Deliveries"/> | 195 | </group> |
906 | 205 | <field name="picking_ids" colspan="4" readonly="1"/> | 196 | <group name="picking" string="Receptions / Deliveries"> |
907 | 197 | <field name="picking_ids" readonly="1" nolabel="1"/> | ||
908 | 198 | </group> | ||
909 | 206 | </page> | 199 | </page> |
911 | 207 | </page> | 200 | </notebook> |
912 | 208 | </field> | 201 | </field> |
913 | 209 | </record> | 202 | </record> |
914 | 210 | 203 | ||
915 | 211 | 204 | ||
916 | 205 | <<<<<<< TREE | ||
917 | 212 | <!-- Right side link to orders --> | 206 | <!-- Right side link to orders --> |
918 | 213 | <act_window | 207 | <act_window |
919 | 214 | id="act_crm_claim_rma_sale_orders" | 208 | id="act_crm_claim_rma_sale_orders" |
920 | @@ -321,6 +315,8 @@ | |||
921 | 321 | </field> | 315 | </field> |
922 | 322 | </record> | 316 | </record> |
923 | 323 | 317 | ||
924 | 318 | ======= | ||
925 | 319 | >>>>>>> MERGE-SOURCE | ||
926 | 324 | <!-- Crm claim Search view --> | 320 | <!-- Crm claim Search view --> |
927 | 325 | <record id="view_crm_case_claims_filter" model="ir.ui.view"> | 321 | <record id="view_crm_case_claims_filter" model="ir.ui.view"> |
928 | 326 | <field name="name">CRM - Claims Search</field> | 322 | <field name="name">CRM - Claims Search</field> |
929 | @@ -330,13 +326,37 @@ | |||
930 | 330 | <field name="name" string="Claims" position="before"> | 326 | <field name="name" string="Claims" position="before"> |
931 | 331 | <field name="number"/> | 327 | <field name="number"/> |
932 | 332 | </field> | 328 | </field> |
935 | 333 | <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" position="before"> | 329 | <filter string="Stage" context="{'group_by':'stage_id'}" position="before"> |
936 | 334 | <filter string="Sales Team" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'section_id'}"/> | 330 | <filter string="Sales Team" name="section_id_groupby" context="{'group_by':'section_id'}"/> |
937 | 331 | <filter string="Claim Type" name="claim_type_groupby" context="{'group_by':'claim_type'}"/> | ||
938 | 335 | </filter> | 332 | </filter> |
939 | 336 | </field> | 333 | </field> |
940 | 337 | </record> | 334 | </record> |
941 | 338 | 335 | ||
943 | 339 | 336 | <record id="substate_substate_form" model="ir.ui.view"> | |
944 | 337 | <field name="name">substate.substate.form</field> | ||
945 | 338 | <field name="model">substate.substate</field> | ||
946 | 339 | <field name="arch" type="xml"> | ||
947 | 340 | <form string="Return Line Substates" version="7.0"> | ||
948 | 341 | <group name="main"> | ||
949 | 342 | <field name="name"/> | ||
950 | 343 | <field name="substate_descr"/> | ||
951 | 344 | </group> | ||
952 | 345 | </form> | ||
953 | 346 | </field> | ||
954 | 347 | </record> | ||
955 | 348 | |||
956 | 349 | <record id="substate_substate_tree" model="ir.ui.view"> | ||
957 | 350 | <field name="name">substate.substate.tree</field> | ||
958 | 351 | <field name="model">substate.substate</field> | ||
959 | 352 | <field name="arch" type="xml"> | ||
960 | 353 | <tree string="Return Line Substates"> | ||
961 | 354 | <field name="name"/> | ||
962 | 355 | </tree> | ||
963 | 356 | </field> | ||
964 | 357 | </record> | ||
965 | 358 | |||
966 | 359 | |||
967 | 340 | <!-- Menu --> | 360 | <!-- Menu --> |
968 | 341 | <record model="ir.actions.act_window" id="crm_claim.crm_case_categ_claim0"> | 361 | <record model="ir.actions.act_window" id="crm_claim.crm_case_categ_claim0"> |
969 | 342 | <field name="context">{"search_default_user_id":uid, "stage_type":'claim'}</field> | 362 | <field name="context">{"search_default_user_id":uid, "stage_type":'claim'}</field> |
970 | @@ -344,23 +364,28 @@ | |||
971 | 344 | 364 | ||
972 | 345 | <!-- return lines action --> | 365 | <!-- return lines action --> |
973 | 346 | <record model="ir.actions.act_window" id="act_crm_case_claim_lines"> | 366 | <record model="ir.actions.act_window" id="act_crm_case_claim_lines"> |
975 | 347 | <field name="name">Claim lines</field> | 367 | <field name="name">Return Lines</field> |
976 | 348 | <field name="res_model">claim.line</field> | 368 | <field name="res_model">claim.line</field> |
977 | 349 | <field name="view_type">form</field> | 369 | <field name="view_type">form</field> |
978 | 350 | <field name="view_mode">tree,form</field> | 370 | <field name="view_mode">tree,form</field> |
981 | 351 | <field name="view_id" ref="crm_claim_line_tree_view"/> | 371 | <field name="context">{'claim_line_main_view': True}</field> |
980 | 352 | <field name="search_view_id" ref="view_crm_claim_lines_filter"/> | ||
982 | 353 | </record> | 372 | </record> |
983 | 354 | <!-- substates action --> | 373 | <!-- substates action --> |
984 | 355 | <record id="act_crm_claim_substates" model="ir.actions.act_window"> | 374 | <record id="act_crm_claim_substates" model="ir.actions.act_window"> |
986 | 356 | <field name="name">Claim line substates</field> | 375 | <field name="name">Return Line Substates</field> |
987 | 357 | <field name="res_model">substate.substate</field> | 376 | <field name="res_model">substate.substate</field> |
988 | 358 | <field name="view_type">form</field> | 377 | <field name="view_type">form</field> |
989 | 378 | <field name="view_mode">tree,form</field> | ||
990 | 359 | </record> | 379 | </record> |
991 | 360 | <!-- Menu --> | 380 | <!-- Menu --> |
993 | 361 | <menuitem name="Return lines" id="menu_crm_case_claims_claim_lines" | 381 | <menuitem id="menu_crm_case_claims_claim_lines" |
994 | 362 | parent="base.menu_aftersale" action="act_crm_case_claim_lines" sequence="2"/> | 382 | parent="base.menu_aftersale" action="act_crm_case_claim_lines" sequence="2"/> |
996 | 363 | <menuitem name="Returned line substates" id="menu_crm_case_claims_claim_line_substates" | 383 | <menuitem id="menu_crm_case_claims_claim_line_substates" |
997 | 364 | parent="crm_claim.menu_config_claim" action="act_crm_claim_substates" sequence="2"/> | 384 | parent="crm_claim.menu_config_claim" action="act_crm_claim_substates" sequence="2"/> |
998 | 385 | |||
999 | 386 | <!-- Add group RMA User to menu entry "After-Sale Services" --> | ||
1000 | 387 | <record id="base.menu_aftersale" model="ir.ui.menu"> | ||
1001 | 388 | <field name="groups_id" eval="[(4, ref('group_rma_user'))]"/> | ||
1002 | 389 | </record> | ||
1003 | 365 | </data> | 390 | </data> |
1004 | 366 | </openerp> | 391 | </openerp> |
1005 | 367 | 392 | ||
1006 | === modified file 'crm_claim_rma/security/ir.model.access.csv' | |||
1007 | --- crm_claim_rma/security/ir.model.access.csv 2013-02-11 14:26:42 +0000 | |||
1008 | +++ crm_claim_rma/security/ir.model.access.csv 2015-11-20 10:22:38 +0000 | |||
1009 | @@ -1,7 +1,14 @@ | |||
1017 | 1 | "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
1018 | 2 | "access_substate_user","substate.substate.user","model_substate_substate","base.group_sale_salesman_all_leads","True","True","True", | 2 | access_substate_user,Read access on substate.substate to Sale User,model_substate_substate,base.group_sale_salesman,1,0,0,0 |
1019 | 3 | "access_claim_line_user","claim.line.user","model_claim_line","base.group_sale_salesman_all_leads","True","True","True", | 3 | access_substate_manager,substate.substate.manager,model_substate_substate,base.group_sale_manager,1,1,1,1 |
1020 | 4 | "access_substate_manager","substate.substate.manager","model_substate_substate","base.group_sale_manager","True","True","True","True" | 4 | access_substate_rma_user,Read access on substate.substate to RMA User,model_substate_substate,group_rma_user,1,0,0,0 |
1021 | 5 | "access_claim_line_manager","claim.line.manager","model_claim_line","base.group_sale_manager","True","True","True","True" | 5 | access_substate_rma_manager,Full access on substate.substate to RMA Manager,model_substate_substate,group_rma_manager,1,1,1,1 |
1022 | 6 | "access_substate_user","substate.substate.user","model_substate_substate","base.group_sale_salesman","True","True","True", | 6 | access_claim_line_user,claim.line.user,model_claim_line,base.group_sale_salesman,1,1,1,0 |
1023 | 7 | "access_claim_line_user","claim.line.user","model_claim_line","base.group_sale_salesman","True","True","True", | 7 | access_claim_line_manager,claim.line.manager,model_claim_line,base.group_sale_manager,1,1,1,1 |
1024 | 8 | access_claim_line_rma_user,Access on claim.line to RMA User,model_claim_line,group_rma_user,1,1,1,0 | ||
1025 | 9 | access_claim_line_rma_manager,Full Access on claim.line to RMA Manager,model_claim_line,group_rma_manager,1,1,1,1 | ||
1026 | 10 | access_crm_claim_rma_user,Access on crm.claim to RMA User,crm_claim.model_crm_claim,group_rma_user,1,1,1,0 | ||
1027 | 11 | access_crm_claim_rma_manager,Access on crm.claim to RMA Manager,crm_claim.model_crm_claim,group_rma_manager,1,1,1,1 | ||
1028 | 12 | access_crm_claim_stage_rma_user,Access on crm.claim.stage to RMA User,crm_claim.model_crm_claim_stage,group_rma_user,1,0,0,0 | ||
1029 | 13 | access_crm_claim_stage_rma_manager,Full access on crm.claim.stage to RMA Manager,crm_claim.model_crm_claim_stage,group_rma_manager,1,1,1,1 | ||
1030 | 14 | access_crm_claim_report_rma_manager,Full access on crm.claim.report to RMA Manager,crm_claim.model_crm_claim_report,group_rma_manager,1,1,1,1 | ||
1031 | 8 | 15 | ||
1032 | === added file 'crm_claim_rma/security/rma_group.xml' | |||
1033 | --- crm_claim_rma/security/rma_group.xml 1970-01-01 00:00:00 +0000 | |||
1034 | +++ crm_claim_rma/security/rma_group.xml 2015-11-20 10:22:38 +0000 | |||
1035 | @@ -0,0 +1,30 @@ | |||
1036 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
1037 | 2 | <!-- | ||
1038 | 3 | Copyright (C) 2014 Akretion (http://www.akretion.com/) | ||
1039 | 4 | @author: Alexis de Lattre <alexis.delattre@akretion.com> | ||
1040 | 5 | The licence is in the file __openerp__.py | ||
1041 | 6 | --> | ||
1042 | 7 | |||
1043 | 8 | <openerp> | ||
1044 | 9 | <data noupdate="1"> | ||
1045 | 10 | |||
1046 | 11 | |||
1047 | 12 | <record id="module_category_rma" model="ir.module.category"> | ||
1048 | 13 | <field name="name">RMA</field> | ||
1049 | 14 | <field name="sequence">30</field> | ||
1050 | 15 | </record> | ||
1051 | 16 | |||
1052 | 17 | <record id="group_rma_user" model="res.groups"> | ||
1053 | 18 | <field name="name">User</field> | ||
1054 | 19 | <field name="category_id" ref="module_category_rma"/> | ||
1055 | 20 | </record> | ||
1056 | 21 | |||
1057 | 22 | <record id="group_rma_manager" model="res.groups"> | ||
1058 | 23 | <field name="name">Manager</field> | ||
1059 | 24 | <field name="category_id" ref="module_category_rma"/> | ||
1060 | 25 | <field name="implied_ids" eval="[(4, ref('group_rma_user'))]"/> | ||
1061 | 26 | </record> | ||
1062 | 27 | |||
1063 | 28 | |||
1064 | 29 | </data> | ||
1065 | 30 | </openerp> | ||
1066 | 0 | 31 | ||
1067 | === modified file 'crm_claim_rma/stock_view.xml' | |||
1068 | --- crm_claim_rma/stock_view.xml 2014-02-26 11:11:38 +0000 | |||
1069 | +++ crm_claim_rma/stock_view.xml 2015-11-20 10:22:38 +0000 | |||
1070 | @@ -24,16 +24,20 @@ | |||
1071 | 24 | </xpath> | 24 | </xpath> |
1072 | 25 | </field> | 25 | </field> |
1073 | 26 | </record> | 26 | </record> |
1075 | 27 | 27 | ||
1076 | 28 | <record id="view_picking_in_search" model="ir.ui.view"> | 28 | <record id="view_picking_in_search" model="ir.ui.view"> |
1077 | 29 | <field name="name">crm_claim_rma.picking_in_search</field> | 29 | <field name="name">crm_claim_rma.picking_in_search</field> |
1078 | 30 | <field name="model">stock.picking.in</field> | 30 | <field name="model">stock.picking.in</field> |
1079 | 31 | <field name="inherit_id" ref="stock.view_picking_in_search" /> | 31 | <field name="inherit_id" ref="stock.view_picking_in_search" /> |
1080 | 32 | <field name="arch" type="xml"> | 32 | <field name="arch" type="xml"> |
1082 | 33 | <filter string="To Invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]" position="after"> | 33 | <filter string="To Invoice" name="to_invoice" position="after"> |
1083 | 34 | <separator/> | 34 | <separator/> |
1084 | 35 | <<<<<<< TREE | ||
1085 | 35 | <filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" /> | 36 | <filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" /> |
1086 | 36 | <field name="claim_id" string="RMA" invisible="True"/> | 37 | <field name="claim_id" string="RMA" invisible="True"/> |
1087 | 38 | ======= | ||
1088 | 39 | <filter string="RMA" domain="[('claim_id', '!=', 'False')]" /> | ||
1089 | 40 | >>>>>>> MERGE-SOURCE | ||
1090 | 37 | </filter> | 41 | </filter> |
1091 | 38 | </field> | 42 | </field> |
1092 | 39 | </record> | 43 | </record> |
1093 | @@ -43,9 +47,9 @@ | |||
1094 | 43 | <field name="model">stock.picking.out</field> | 47 | <field name="model">stock.picking.out</field> |
1095 | 44 | <field name="inherit_id" ref="stock.view_picking_out_search" /> | 48 | <field name="inherit_id" ref="stock.view_picking_out_search" /> |
1096 | 45 | <field name="arch" type="xml"> | 49 | <field name="arch" type="xml"> |
1098 | 46 | <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice" position="after"> | 50 | <filter name="to_invoice" string="To Invoice" position="after"> |
1099 | 47 | <separator/> | 51 | <separator/> |
1101 | 48 | <filter string="RMA" icon="terp-accessories-archiver-minus" domain="[('claim_id', '!=', 'False')]" /> | 52 | <filter string="RMA" domain="[('claim_id', '!=', 'False')]" /> |
1102 | 49 | </filter> | 53 | </filter> |
1103 | 50 | </field> | 54 | </field> |
1104 | 51 | </record> | 55 | </record> |
1105 | 52 | 56 | ||
1106 | === modified file 'crm_claim_rma/wizard/claim_make_picking_view.xml' | |||
1107 | --- crm_claim_rma/wizard/claim_make_picking_view.xml 2013-12-20 14:31:15 +0000 | |||
1108 | +++ crm_claim_rma/wizard/claim_make_picking_view.xml 2015-11-20 10:22:38 +0000 | |||
1109 | @@ -12,13 +12,15 @@ | |||
1110 | 12 | <field name="model">claim_make_picking.wizard</field> | 12 | <field name="model">claim_make_picking.wizard</field> |
1111 | 13 | <field name="arch" type="xml"> | 13 | <field name="arch" type="xml"> |
1112 | 14 | <form string="Select exchange lines to add in picking" version="7.0"> | 14 | <form string="Select exchange lines to add in picking" version="7.0"> |
1118 | 15 | <separator string="Locations" colspan="4"/> | 15 | <group name="locations" string="Locations"> |
1119 | 16 | <field name="claim_line_source_location" nolabel="1" /> | 16 | <field name="claim_line_source_location" /> |
1120 | 17 | <field name="claim_line_dest_location" nolabel="1" /> | 17 | <field name="claim_line_dest_location" /> |
1121 | 18 | <separator string="Select lines for picking" colspan="4"/> | 18 | </group> |
1122 | 19 | <field name="claim_line_ids" nolabel="1" colspan="4"/> | 19 | <group name="lines" string="Select Lines for Picking"> |
1123 | 20 | <field name="claim_line_ids" nolabel="1"/> | ||
1124 | 21 | </group> | ||
1125 | 20 | <footer> | 22 | <footer> |
1127 | 21 | <button name="action_create_picking" string="Create picking" type="object" class="oe_highlight"/> | 23 | <button name="action_create_picking" string="Create Picking" type="object" class="oe_highlight"/> |
1128 | 22 | or | 24 | or |
1129 | 23 | <button string="Cancel" class="oe_link" special="cancel" /> | 25 | <button string="Cancel" class="oe_link" special="cancel" /> |
1130 | 24 | </footer> | 26 | </footer> |
1131 | @@ -28,7 +30,6 @@ | |||
1132 | 28 | 30 | ||
1133 | 29 | <record id="action_claim_picking_in" model="ir.actions.act_window"> | 31 | <record id="action_claim_picking_in" model="ir.actions.act_window"> |
1134 | 30 | <field name="name">Return Products</field> | 32 | <field name="name">Return Products</field> |
1135 | 31 | <field name="type">ir.actions.act_window</field> | ||
1136 | 32 | <field name="res_model">claim_make_picking.wizard</field> | 33 | <field name="res_model">claim_make_picking.wizard</field> |
1137 | 33 | <field name="src_model">crm.claim</field> | 34 | <field name="src_model">crm.claim</field> |
1138 | 34 | <field name="view_type">form</field> | 35 | <field name="view_type">form</field> |
1139 | @@ -39,7 +40,6 @@ | |||
1140 | 39 | 40 | ||
1141 | 40 | <record id="action_claim_picking_out" model="ir.actions.act_window"> | 41 | <record id="action_claim_picking_out" model="ir.actions.act_window"> |
1142 | 41 | <field name="name">Create Outgoing Shipments</field> | 42 | <field name="name">Create Outgoing Shipments</field> |
1143 | 42 | <field name="type">ir.actions.act_window</field> | ||
1144 | 43 | <field name="res_model">claim_make_picking.wizard</field> | 43 | <field name="res_model">claim_make_picking.wizard</field> |
1145 | 44 | <field name="src_model">crm.claim</field> | 44 | <field name="src_model">crm.claim</field> |
1146 | 45 | <field name="view_type">form</field> | 45 | <field name="view_type">form</field> |
1147 | 46 | 46 | ||
1148 | === modified file 'crm_rma_advance_location/__openerp__.py' | |||
1149 | --- crm_rma_advance_location/__openerp__.py 2013-11-15 13:24:39 +0000 | |||
1150 | +++ crm_rma_advance_location/__openerp__.py 2015-11-20 10:22:38 +0000 | |||
1151 | @@ -2,7 +2,7 @@ | |||
1152 | 2 | ############################################################################## | 2 | ############################################################################## |
1153 | 3 | # | 3 | # |
1154 | 4 | # Copyright 2013 Camptocamp | 4 | # Copyright 2013 Camptocamp |
1156 | 5 | # Copyright 2009-2013 Akretion, | 5 | # Copyright 2009-2013 Akretion |
1157 | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume |
1158 | 7 | # | 7 | # |
1159 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
1160 | @@ -40,10 +40,10 @@ | |||
1161 | 40 | * Refurbish | 40 | * Refurbish |
1162 | 41 | * Mistake Loss | 41 | * Mistake Loss |
1163 | 42 | 42 | ||
1165 | 43 | And also various wizards on icoming deliveries that allow you to move your goods easily in those | 43 | And also various wizards on incoming deliveries that allow you to move your goods easily to those |
1166 | 44 | new locations from a done reception. | 44 | new locations from a done reception. |
1167 | 45 | 45 | ||
1169 | 46 | Using this module make the logistic flow of return a bit more complexe: | 46 | Using this module make the logistic flow of return a bit more complex: |
1170 | 47 | 47 | ||
1171 | 48 | * Returning product goes into RMA location with a incoming shipment | 48 | * Returning product goes into RMA location with a incoming shipment |
1172 | 49 | * From the incoming shipment, forward them to another places (stock, loss,...) | 49 | * From the incoming shipment, forward them to another places (stock, loss,...) |
1173 | 50 | 50 | ||
1174 | === modified file 'crm_rma_advance_location/claim_rma_view.xml' | |||
1175 | --- crm_rma_advance_location/claim_rma_view.xml 2013-11-15 13:24:39 +0000 | |||
1176 | +++ crm_rma_advance_location/claim_rma_view.xml 2015-11-20 10:22:38 +0000 | |||
1177 | @@ -1,20 +1,22 @@ | |||
1178 | 1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> |
1179 | 2 | <openerp> | 2 | <openerp> |
1197 | 3 | <data> | 3 | <data> |
1198 | 4 | <record model="ir.ui.view" id="crm_claim_rma_form_view"> | 4 | |
1199 | 5 | <field name="name">CRM - Claim product return Form</field> | 5 | <record id="crm_claim_rma_form_view" model="ir.ui.view"> |
1200 | 6 | <field name="model">crm.claim</field> | 6 | <field name="name">CRM - Claim product return Form</field> |
1201 | 7 | <field name="inherit_id" ref="crm_claim_rma.crm_claim_rma_form_view"/> | 7 | <field name="model">crm.claim</field> |
1202 | 8 | <field name="arch" type="xml"> | 8 | <field name="inherit_id" ref="crm_claim_rma.crm_case_claims_form_view"/> |
1203 | 9 | <xpath expr="//button[@string='New Delivery']" position="after"> | 9 | <field name="arch" type="xml"> |
1204 | 10 | <button name="%(action_claim_picking_loss)d" | 10 | <xpath expr="//button[@string='New Delivery']" position="after"> |
1205 | 11 | string="New Product Loss" states="open" | 11 | <button name="%(action_claim_picking_loss)d" |
1206 | 12 | type="action" target="new" | 12 | string="New Product Loss" states="open" |
1207 | 13 | context="{'warehouse_id': warehouse_id, | 13 | type="action" target="new" |
1208 | 14 | 'partner_id': partner_id}"/> | 14 | context="{'warehouse_id': warehouse_id, |
1209 | 15 | </xpath> | 15 | 'partner_id': partner_id}"/> |
1210 | 16 | </field> | 16 | </xpath> |
1211 | 17 | </record> | 17 | </field> |
1212 | 18 | 18 | </record> | |
1213 | 19 | </data> | 19 | |
1214 | 20 | |||
1215 | 21 | </data> | ||
1216 | 20 | </openerp> | 22 | </openerp> |
1217 | 21 | 23 | ||
1218 | === modified file 'crm_rma_advance_location/stock.py' | |||
1219 | --- crm_rma_advance_location/stock.py 2013-12-03 10:27:02 +0000 | |||
1220 | +++ crm_rma_advance_location/stock.py 2015-11-20 10:22:38 +0000 | |||
1221 | @@ -2,7 +2,7 @@ | |||
1222 | 2 | ############################################################################## | 2 | ############################################################################## |
1223 | 3 | # | 3 | # |
1224 | 4 | # Copyright 2013 Camptocamp | 4 | # Copyright 2013 Camptocamp |
1226 | 5 | # Copyright 2009-2013 Akretion, | 5 | # Copyright 2009-2013 Akretion |
1227 | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume |
1228 | 7 | # | 7 | # |
1229 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
1230 | 9 | 9 | ||
1231 | === modified file 'crm_rma_advance_location/stock_view.xml' | |||
1232 | --- crm_rma_advance_location/stock_view.xml 2013-11-14 10:07:54 +0000 | |||
1233 | +++ crm_rma_advance_location/stock_view.xml 2015-11-20 10:22:38 +0000 | |||
1234 | @@ -11,7 +11,7 @@ | |||
1235 | 11 | <!-- Those wizard aren't working yet --> | 11 | <!-- Those wizard aren't working yet --> |
1236 | 12 | <xpath expr="/form/header/button[@string='Return Products']" position="after"> | 12 | <xpath expr="/form/header/button[@string='Return Products']" position="after"> |
1237 | 13 | <button name="%(action_stock_picking_from_claim_picking)d" | 13 | <button name="%(action_stock_picking_from_claim_picking)d" |
1239 | 14 | string="Product to stock" type="action" | 14 | string="Product to Stock" type="action" |
1240 | 15 | attrs="{'invisible':['|', | 15 | attrs="{'invisible':['|', |
1241 | 16 | ('state','<>','done'), | 16 | ('state','<>','done'), |
1242 | 17 | ('claim_id', '=', False)]}"/> | 17 | ('claim_id', '=', False)]}"/> |
1243 | @@ -21,7 +21,7 @@ | |||
1244 | 21 | ('state','<>','done'), | 21 | ('state','<>','done'), |
1245 | 22 | ('claim_id', '=', False)]}"/> | 22 | ('claim_id', '=', False)]}"/> |
1246 | 23 | <button name="%(action_used_picking_from_claim_picking)d" | 23 | <button name="%(action_used_picking_from_claim_picking)d" |
1248 | 24 | string="Product to refurbish stock" type="action" | 24 | string="Product to Refurbish" type="action" |
1249 | 25 | attrs="{'invisible':['|', | 25 | attrs="{'invisible':['|', |
1250 | 26 | ('state','<>','done'), | 26 | ('state','<>','done'), |
1251 | 27 | ('claim_id', '=', False)]}"/> | 27 | ('claim_id', '=', False)]}"/> |
1252 | @@ -42,7 +42,6 @@ | |||
1253 | 42 | </xpath> | 42 | </xpath> |
1254 | 43 | </field> | 43 | </field> |
1255 | 44 | </record> | 44 | </record> |
1256 | 45 | |||
1257 | 46 | 45 | ||
1258 | 47 | </data> | 46 | </data> |
1259 | 48 | </openerp> | 47 | </openerp> |
1260 | 49 | 48 | ||
1261 | === modified file 'crm_rma_advance_location/wizard/__init__.py' | |||
1262 | --- crm_rma_advance_location/wizard/__init__.py 2013-11-14 10:07:54 +0000 | |||
1263 | +++ crm_rma_advance_location/wizard/__init__.py 2015-11-20 10:22:38 +0000 | |||
1264 | @@ -2,7 +2,7 @@ | |||
1265 | 2 | ############################################################################## | 2 | ############################################################################## |
1266 | 3 | # | 3 | # |
1267 | 4 | # Copyright 2013 Camptocamp | 4 | # Copyright 2013 Camptocamp |
1269 | 5 | # Copyright 2009-2013 Akretion, | 5 | # Copyright 2009-2013 Akretion |
1270 | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume | 6 | # Author: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, Joel Grand-Guillaume |
1271 | 7 | # | 7 | # |
1272 | 8 | # This program is free software: you can redistribute it and/or modify | 8 | # This program is free software: you can redistribute it and/or modify |
1273 | @@ -20,4 +20,4 @@ | |||
1274 | 20 | # | 20 | # |
1275 | 21 | ############################################################################## | 21 | ############################################################################## |
1276 | 22 | from . import claim_make_picking_from_picking | 22 | from . import claim_make_picking_from_picking |
1277 | 23 | from . import claim_make_picking | ||
1278 | 24 | \ No newline at end of file | 23 | \ No newline at end of file |
1279 | 24 | from . import claim_make_picking | ||
1280 | 25 | 25 | ||
1281 | === modified file 'crm_rma_advance_location/wizard/claim_make_picking.py' | |||
1282 | --- crm_rma_advance_location/wizard/claim_make_picking.py 2013-12-03 10:33:50 +0000 | |||
1283 | +++ crm_rma_advance_location/wizard/claim_make_picking.py 2015-11-20 10:22:38 +0000 | |||
1284 | @@ -1,26 +1,28 @@ | |||
1285 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
1286 | 2 | ######################################################################### | 2 | ######################################################################### |
1307 | 3 | # # | 3 | # |
1308 | 4 | # # | 4 | # crm_claim_rma_advance_location for OpenERP |
1309 | 5 | ######################################################################### | 5 | # Copyright (C) 2009-2014 Emmanuel Samyn |
1310 | 6 | # # | 6 | # Copyright (C) 2009-2014 Akretion (http://www.akretion.com) |
1311 | 7 | # crm_claim_rma for OpenERP # | 7 | # Authors: Emmanuel Samyn, Benoît GUILLOT <benoit.guillot@akretion.com> |
1312 | 8 | # Copyright (C) 2009-2012 Akretion, Emmanuel Samyn, # | 8 | # |
1313 | 9 | # Benoît GUILLOT <benoit.guillot@akretion.com> # | 9 | # This program is free software: you can redistribute it and/or modify |
1314 | 10 | #This program is free software: you can redistribute it and/or modify # | 10 | # it under the terms of the GNU Affero General Public License as |
1315 | 11 | #it under the terms of the GNU General Public License as published by # | 11 | # published by the Free Software Foundation, either version 3 of the |
1316 | 12 | #the Free Software Foundation, either version 3 of the License, or # | 12 | # License, or (at your option) any later version. |
1317 | 13 | #(at your option) any later version. # | 13 | # |
1318 | 14 | # # | 14 | # This program is distributed in the hope that it will be useful, |
1319 | 15 | #This program is distributed in the hope that it will be useful, # | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1320 | 16 | #but WITHOUT ANY WARRANTY; without even the implied warranty of # | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1321 | 17 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | 17 | # GNU Affero General Public License for more details. |
1322 | 18 | #GNU General Public License for more details. # | 18 | # |
1323 | 19 | # # | 19 | # You should have received a copy of the GNU Affero General Public License |
1324 | 20 | #You should have received a copy of the GNU General Public License # | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1325 | 21 | #along with this program. If not, see <http://www.gnu.org/licenses/>. # | 21 | # |
1326 | 22 | ######################################################################### | 22 | ######################################################################### |
1327 | 23 | |||
1328 | 23 | from openerp.osv import orm | 24 | from openerp.osv import orm |
1329 | 25 | from openerp.tools.translate import _ | ||
1330 | 24 | 26 | ||
1331 | 25 | 27 | ||
1332 | 26 | class claim_make_picking(orm.TransientModel): | 28 | class claim_make_picking(orm.TransientModel): |
1333 | @@ -29,23 +31,27 @@ | |||
1334 | 29 | 31 | ||
1335 | 30 | def _get_dest_loc(self, cr, uid, context=None): | 32 | def _get_dest_loc(self, cr, uid, context=None): |
1336 | 31 | """ Get default destination location """ | 33 | """ Get default destination location """ |
1337 | 32 | loc_id = super(claim_make_picking, self)._get_dest_loc(cr, uid, context=context) | ||
1338 | 33 | if context is None: | 34 | if context is None: |
1339 | 34 | context = {} | 35 | context = {} |
1341 | 35 | warehouse_obj = self.pool.get('stock.warehouse') | 36 | loc_id = super(claim_make_picking, self)._get_dest_loc( |
1342 | 37 | cr, uid, context=context) | ||
1343 | 36 | warehouse_id = context.get('warehouse_id') | 38 | warehouse_id = context.get('warehouse_id') |
1344 | 39 | warehouse = self.pool['stock.warehouse'].browse( | ||
1345 | 40 | cr, uid, warehouse_id, context=context) | ||
1346 | 37 | if context.get('picking_type') == 'in': | 41 | if context.get('picking_type') == 'in': |
1352 | 38 | loc_id = warehouse_obj.read( | 42 | loc_id = warehouse.lot_rma_id.id or False |
1353 | 39 | cr, uid, | 43 | if not loc_id: |
1354 | 40 | warehouse_id, | 44 | raise orm.except_orm( |
1355 | 41 | ['lot_rma_id'], | 45 | _('Error:'), |
1356 | 42 | context=context)['lot_rma_id'][0] | 46 | _("Missing RMA stock location on warehouse '%s'") |
1357 | 47 | % warehouse.name) | ||
1358 | 43 | elif context.get('picking_type') == 'loss': | 48 | elif context.get('picking_type') == 'loss': |
1364 | 44 | loc_id = warehouse_obj.read( | 49 | loc_id = warehouse.lot_carrier_loss_id.id or False |
1365 | 45 | cr, uid, | 50 | if not loc_id: |
1366 | 46 | warehouse_id, | 51 | raise orm.except_orm( |
1367 | 47 | ['lot_carrier_loss_id'], | 52 | _('Error:'), |
1368 | 48 | context=context)['lot_carrier_loss_id'][0] | 53 | _("Missing Carrier Loss stock location on warehouse '%s'") |
1369 | 54 | % warehouse.name) | ||
1370 | 49 | return loc_id | 55 | return loc_id |
1371 | 50 | 56 | ||
1372 | 51 | _defaults = { | 57 | _defaults = { |
1373 | 52 | 58 | ||
1374 | === modified file 'crm_rma_advance_location/wizard/claim_make_picking_from_picking.py' | |||
1375 | --- crm_rma_advance_location/wizard/claim_make_picking_from_picking.py 2013-11-21 15:41:37 +0000 | |||
1376 | +++ crm_rma_advance_location/wizard/claim_make_picking_from_picking.py 2015-11-20 10:22:38 +0000 | |||
1377 | @@ -1,27 +1,28 @@ | |||
1378 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
1379 | 2 | ######################################################################### | 2 | ######################################################################### |
1400 | 3 | # # | 3 | # |
1401 | 4 | # # | 4 | # crm_claim_rma_advance_location for OpenERP |
1402 | 5 | ######################################################################### | 5 | # Copyright (C) 2009-2014 Emmanuel Samyn |
1403 | 6 | # # | 6 | # Copyright (C) 2009-2014 Akretion (http://www.akretion.com) |
1404 | 7 | # crm_claim_rma for OpenERP # | 7 | # Authors: Emmanuel Samyn, Benoît GUILLOT <benoit.guillot@akretion.com> |
1405 | 8 | # Copyright (C) 2009-2012 Akretion, Emmanuel Samyn, # | 8 | # |
1406 | 9 | # Benoît GUILLOT <benoit.guillot@akretion.com> # | 9 | # This program is free software: you can redistribute it and/or modify |
1407 | 10 | #This program is free software: you can redistribute it and/or modify # | 10 | # it under the terms of the GNU Affero General Public License as |
1408 | 11 | #it under the terms of the GNU General Public License as published by # | 11 | # published by the Free Software Foundation, either version 3 of the |
1409 | 12 | #the Free Software Foundation, either version 3 of the License, or # | 12 | # License, or (at your option) any later version. |
1410 | 13 | #(at your option) any later version. # | 13 | # |
1411 | 14 | # # | 14 | # This program is distributed in the hope that it will be useful, |
1412 | 15 | #This program is distributed in the hope that it will be useful, # | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1413 | 16 | #but WITHOUT ANY WARRANTY; without even the implied warranty of # | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1414 | 17 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | 17 | # GNU Affero General Public License for more details. |
1415 | 18 | #GNU General Public License for more details. # | 18 | # |
1416 | 19 | # # | 19 | # You should have received a copy of the GNU Affero General Public License |
1417 | 20 | #You should have received a copy of the GNU General Public License # | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1418 | 21 | #along with this program. If not, see <http://www.gnu.org/licenses/>. # | 21 | # |
1419 | 22 | ######################################################################### | 22 | ######################################################################### |
1420 | 23 | |||
1421 | 23 | from openerp.osv import fields, orm | 24 | from openerp.osv import fields, orm |
1423 | 24 | from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT | 25 | from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT |
1424 | 25 | from openerp import netsvc | 26 | from openerp import netsvc |
1425 | 26 | import time | 27 | import time |
1426 | 27 | 28 | ||
1427 | @@ -31,15 +32,16 @@ | |||
1428 | 31 | _name = 'claim_make_picking_from_picking.wizard' | 32 | _name = 'claim_make_picking_from_picking.wizard' |
1429 | 32 | _description = 'Wizard to create pickings from picking lines' | 33 | _description = 'Wizard to create pickings from picking lines' |
1430 | 33 | _columns = { | 34 | _columns = { |
1433 | 34 | 'picking_line_source_location': fields.many2one('stock.location', | 35 | 'picking_line_source_location': fields.many2one( |
1434 | 35 | 'Source Location', | 36 | 'stock.location', 'Source Location', |
1435 | 36 | help="Location where the returned products are from.", | 37 | help="Location where the returned products are from.", |
1436 | 37 | required=True), | 38 | required=True), |
1439 | 38 | 'picking_line_dest_location': fields.many2one('stock.location', | 39 | 'picking_line_dest_location': fields.many2one( |
1440 | 39 | 'Dest. Location', | 40 | 'stock.location', 'Dest. Location', |
1441 | 40 | help="Location where the system will stock the returned products.", | 41 | help="Location where the system will stock the returned products.", |
1442 | 41 | required=True), | 42 | required=True), |
1444 | 42 | 'picking_line_ids': fields.many2many('stock.move', | 43 | 'picking_line_ids': fields.many2many( |
1445 | 44 | 'stock.move', | ||
1446 | 43 | 'claim_picking_line_picking', | 45 | 'claim_picking_line_picking', |
1447 | 44 | 'claim_picking_id', | 46 | 'claim_picking_id', |
1448 | 45 | 'picking_line_id', | 47 | 'picking_line_id', |
1449 | @@ -47,31 +49,36 @@ | |||
1450 | 47 | } | 49 | } |
1451 | 48 | 50 | ||
1452 | 49 | def _get_default_warehouse(self, cr, uid, context=None): | 51 | def _get_default_warehouse(self, cr, uid, context=None): |
1454 | 50 | warehouse_id=self.pool.get('crm.claim')._get_default_warehouse(cr, uid, context=context) | 52 | warehouse_id = self.pool['crm.claim']._get_default_warehouse( |
1455 | 53 | cr, uid, context=context) | ||
1456 | 51 | return warehouse_id | 54 | return warehouse_id |
1457 | 52 | 55 | ||
1458 | 53 | def _get_picking_lines(self, cr, uid, context): | 56 | def _get_picking_lines(self, cr, uid, context): |
1461 | 54 | return self.pool.get('stock.picking').read(cr, uid, | 57 | return self.pool.get('stock.picking').read( |
1462 | 55 | context['active_id'], ['move_lines'], context=context)['move_lines'] | 58 | cr, uid, context['active_id'], ['move_lines'], |
1463 | 59 | context=context)['move_lines'] | ||
1464 | 56 | 60 | ||
1465 | 57 | # Get default source location | 61 | # Get default source location |
1466 | 58 | def _get_source_loc(self, cr, uid, context): | 62 | def _get_source_loc(self, cr, uid, context): |
1468 | 59 | if context is None: context = {} | 63 | if context is None: |
1469 | 64 | context = {} | ||
1470 | 60 | warehouse_obj = self.pool.get('stock.warehouse') | 65 | warehouse_obj = self.pool.get('stock.warehouse') |
1471 | 61 | warehouse_id = self._get_default_warehouse(cr, uid, context=context) | 66 | warehouse_id = self._get_default_warehouse(cr, uid, context=context) |
1474 | 62 | return warehouse_obj.read(cr, uid, | 67 | return warehouse_obj.read( |
1475 | 63 | warehouse_id, ['lot_rma_id'], context=context)['lot_rma_id'][0] | 68 | cr, uid, warehouse_id, ['lot_rma_id'], |
1476 | 69 | context=context)['lot_rma_id'][0] | ||
1477 | 64 | 70 | ||
1478 | 65 | # Get default destination location | 71 | # Get default destination location |
1479 | 66 | def _get_dest_loc(self, cr, uid, context): | 72 | def _get_dest_loc(self, cr, uid, context): |
1481 | 67 | if context is None: context = {} | 73 | if context is None: |
1482 | 74 | context = {} | ||
1483 | 68 | warehouse_id = self._get_default_warehouse(cr, uid, context=context) | 75 | warehouse_id = self._get_default_warehouse(cr, uid, context=context) |
1484 | 69 | warehouse_obj = self.pool.get('stock.warehouse') | 76 | warehouse_obj = self.pool.get('stock.warehouse') |
1485 | 70 | if context.get('picking_type'): | 77 | if context.get('picking_type'): |
1490 | 71 | context_loc = context.get('picking_type')[8:] | 78 | loc_field = 'lot_%s_id' % context.get('picking_type')[8:] |
1491 | 72 | loc_field = 'lot_%s_id' %context.get('picking_type')[8:] | 79 | loc_id = warehouse_obj.read( |
1492 | 73 | loc_id = warehouse_obj.read(cr, uid, | 80 | cr, uid, warehouse_id, [loc_field], |
1493 | 74 | warehouse_id, [loc_field], context=context)[loc_field][0] | 81 | context=context)[loc_field][0] |
1494 | 75 | return loc_id | 82 | return loc_id |
1495 | 76 | 83 | ||
1496 | 77 | _defaults = { | 84 | _defaults = { |
1497 | @@ -80,9 +87,6 @@ | |||
1498 | 80 | 'picking_line_ids': _get_picking_lines, | 87 | 'picking_line_ids': _get_picking_lines, |
1499 | 81 | } | 88 | } |
1500 | 82 | 89 | ||
1501 | 83 | def action_cancel(self,cr,uid,ids,conect=None): | ||
1502 | 84 | return {'type': 'ir.actions.act_window_close',} | ||
1503 | 85 | |||
1504 | 86 | # If "Create" button pressed | 90 | # If "Create" button pressed |
1505 | 87 | def action_create_picking_from_picking(self, cr, uid, ids, context=None): | 91 | def action_create_picking_from_picking(self, cr, uid, ids, context=None): |
1506 | 88 | picking_obj = self.pool.get('stock.picking') | 92 | picking_obj = self.pool.get('stock.picking') |
1507 | @@ -162,5 +166,3 @@ | |||
1508 | 162 | 'res_id': picking_id, | 166 | 'res_id': picking_id, |
1509 | 163 | 'type': 'ir.actions.act_window', | 167 | 'type': 'ir.actions.act_window', |
1510 | 164 | } | 168 | } |
1511 | 165 | |||
1512 | 166 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1513 | 167 | 169 | ||
1514 | === modified file 'crm_rma_advance_location/wizard/claim_make_picking_from_picking_view.xml' | |||
1515 | --- crm_rma_advance_location/wizard/claim_make_picking_from_picking_view.xml 2013-11-14 10:07:54 +0000 | |||
1516 | +++ crm_rma_advance_location/wizard/claim_make_picking_from_picking_view.xml 2015-11-20 10:22:38 +0000 | |||
1517 | @@ -1,6 +1,5 @@ | |||
1518 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
1519 | 2 | <!-- | 2 | <!-- |
1520 | 3 | crm_claim_rma for OpenERP | ||
1521 | 4 | Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> | 3 | Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
1522 | 5 | The licence is in the file __openerp__.py | 4 | The licence is in the file __openerp__.py |
1523 | 6 | --> | 5 | --> |
1524 | @@ -11,26 +10,27 @@ | |||
1525 | 11 | <field name="name">claim_picking</field> | 10 | <field name="name">claim_picking</field> |
1526 | 12 | <field name="model">claim_make_picking_from_picking.wizard</field> | 11 | <field name="model">claim_make_picking_from_picking.wizard</field> |
1527 | 13 | <field name="arch" type="xml"> | 12 | <field name="arch" type="xml"> |
1539 | 14 | <form string="Select lines to add in picking"> | 13 | <form string="Select lines to add in picking" version="7.0"> |
1540 | 15 | <separator string="Locations" colspan="4"/> | 14 | <group string="Locations"> |
1541 | 16 | <field name="picking_line_source_location" nolabel="1" /> | 15 | <field name="picking_line_source_location" /> |
1542 | 17 | <field name="picking_line_dest_location" nolabel="1" /> | 16 | <field name="picking_line_dest_location" /> |
1543 | 18 | <separator string="Select lines for picking" colspan="4"/> | 17 | </group> |
1544 | 19 | <field name="picking_line_ids" nolabel="1" colspan="4"/> | 18 | <group string="Select lines for picking"> |
1545 | 20 | <group col="4" colspan="2"> | 19 | <field name="picking_line_ids" nolabel="1"/> |
1546 | 21 | <button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/> | 20 | </group> |
1547 | 22 | <button name="action_create_picking_from_picking" string="Create picking" | 21 | <footer> |
1548 | 23 | icon='gtk-ok' type="object"/> | 22 | <button name="action_create_picking_from_picking" |
1549 | 24 | </group> | 23 | string="Create Picking" |
1550 | 24 | class="oe_highlight" type="object"/> | ||
1551 | 25 | <button special="cancel" string="Cancel" type="object" class="oe_link"/> | ||
1552 | 26 | </footer> | ||
1553 | 25 | </form> | 27 | </form> |
1554 | 26 | </field> | 28 | </field> |
1556 | 27 | </record> | 29 | </record> |
1557 | 28 | 30 | ||
1558 | 29 | <record id="action_stock_picking_from_claim_picking" model="ir.actions.act_window"> | 31 | <record id="action_stock_picking_from_claim_picking" model="ir.actions.act_window"> |
1559 | 30 | <field name="name">Create Incomming Shipment to Stock</field> | 32 | <field name="name">Create Incomming Shipment to Stock</field> |
1560 | 31 | <field name="type">ir.actions.act_window</field> | ||
1561 | 32 | <field name="res_model">claim_make_picking_from_picking.wizard</field> | 33 | <field name="res_model">claim_make_picking_from_picking.wizard</field> |
1562 | 33 | <field name="src_model">stock.picking</field> | ||
1563 | 34 | <field name="view_type">form</field> | 34 | <field name="view_type">form</field> |
1564 | 35 | <field name="view_mode">form</field> | 35 | <field name="view_mode">form</field> |
1565 | 36 | <field name="target">new</field> | 36 | <field name="target">new</field> |
1566 | @@ -39,9 +39,7 @@ | |||
1567 | 39 | 39 | ||
1568 | 40 | <record id="action_loss_picking_from_claim_picking" model="ir.actions.act_window"> | 40 | <record id="action_loss_picking_from_claim_picking" model="ir.actions.act_window"> |
1569 | 41 | <field name="name">Create Incomming Shipment to Breakkage Loss Location</field> | 41 | <field name="name">Create Incomming Shipment to Breakkage Loss Location</field> |
1570 | 42 | <field name="type">ir.actions.act_window</field> | ||
1571 | 43 | <field name="res_model">claim_make_picking_from_picking.wizard</field> | 42 | <field name="res_model">claim_make_picking_from_picking.wizard</field> |
1572 | 44 | <field name="src_model">stock.picking</field> | ||
1573 | 45 | <field name="view_type">form</field> | 43 | <field name="view_type">form</field> |
1574 | 46 | <field name="view_mode">form</field> | 44 | <field name="view_mode">form</field> |
1575 | 47 | <field name="target">new</field> | 45 | <field name="target">new</field> |
1576 | @@ -50,9 +48,7 @@ | |||
1577 | 50 | 48 | ||
1578 | 51 | <record id="action_used_picking_from_claim_picking" model="ir.actions.act_window"> | 49 | <record id="action_used_picking_from_claim_picking" model="ir.actions.act_window"> |
1579 | 52 | <field name="name">Create Incomming Shipment to Refurbish Location</field> | 50 | <field name="name">Create Incomming Shipment to Refurbish Location</field> |
1580 | 53 | <field name="type">ir.actions.act_window</field> | ||
1581 | 54 | <field name="res_model">claim_make_picking_from_picking.wizard</field> | 51 | <field name="res_model">claim_make_picking_from_picking.wizard</field> |
1582 | 55 | <field name="src_model">stock.picking</field> | ||
1583 | 56 | <field name="view_type">form</field> | 52 | <field name="view_type">form</field> |
1584 | 57 | <field name="view_mode">form</field> | 53 | <field name="view_mode">form</field> |
1585 | 58 | <field name="target">new</field> | 54 | <field name="target">new</field> |
1586 | 59 | 55 | ||
1587 | === modified file 'crm_rma_advance_location/wizard/claim_make_picking_view.xml' | |||
1588 | --- crm_rma_advance_location/wizard/claim_make_picking_view.xml 2013-11-14 10:07:54 +0000 | |||
1589 | +++ crm_rma_advance_location/wizard/claim_make_picking_view.xml 2015-11-20 10:22:38 +0000 | |||
1590 | @@ -1,6 +1,5 @@ | |||
1591 | 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
1592 | 2 | <!-- | 2 | <!-- |
1593 | 3 | crm_claim_rma for OpenERP | ||
1594 | 4 | Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> | 3 | Copyright (C) 2011 Akretion Benoît GUILLOT <benoit.guillot@akretion.com> |
1595 | 5 | The licence is in the file __openerp__.py | 4 | The licence is in the file __openerp__.py |
1596 | 6 | --> | 5 | --> |
1597 | @@ -9,9 +8,7 @@ | |||
1598 | 9 | 8 | ||
1599 | 10 | <record id="action_claim_picking_loss" model="ir.actions.act_window"> | 9 | <record id="action_claim_picking_loss" model="ir.actions.act_window"> |
1600 | 11 | <field name="name">Create Products Loss</field> | 10 | <field name="name">Create Products Loss</field> |
1601 | 12 | <field name="type">ir.actions.act_window</field> | ||
1602 | 13 | <field name="res_model">claim_make_picking.wizard</field> | 11 | <field name="res_model">claim_make_picking.wizard</field> |
1603 | 14 | <field name="src_model">crm.claim</field> | ||
1604 | 15 | <field name="view_type">form</field> | 12 | <field name="view_type">form</field> |
1605 | 16 | <field name="view_mode">form</field> | 13 | <field name="view_mode">form</field> |
1606 | 17 | <field name="target">new</field> | 14 | <field name="target">new</field> |
1607 | 18 | 15 | ||
1608 | === modified file 'product_warranty/__openerp__.py' | |||
1609 | --- product_warranty/__openerp__.py 2013-11-21 15:08:21 +0000 | |||
1610 | +++ product_warranty/__openerp__.py 2015-11-20 10:22:38 +0000 | |||
1611 | @@ -47,7 +47,7 @@ | |||
1612 | 47 | 'res_company_view.xml', | 47 | 'res_company_view.xml', |
1613 | 48 | 'product_warranty_view.xml', | 48 | 'product_warranty_view.xml', |
1614 | 49 | ], | 49 | ], |
1616 | 50 | 'demo_xml': [], | 50 | 'demo': [], |
1617 | 51 | 'test': [], | 51 | 'test': [], |
1618 | 52 | 'installable': True, | 52 | 'installable': True, |
1619 | 53 | 'active': False, | 53 | 'active': False, |
1620 | 54 | 54 | ||
1621 | === modified file 'product_warranty/product_warranty.py' | |||
1622 | --- product_warranty/product_warranty.py 2013-12-03 10:26:17 +0000 | |||
1623 | +++ product_warranty/product_warranty.py 2015-11-20 10:22:38 +0000 | |||
1624 | @@ -1,26 +1,31 @@ | |||
1625 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
1626 | 2 | ######################################################################### | 2 | ######################################################################### |
1645 | 3 | # # | 3 | # |
1646 | 4 | # # | 4 | # Copyright (C) 2009-2014 Akretion (http://www.akretion.com/) |
1647 | 5 | ######################################################################### | 5 | # Copyright (C) 2009-2014 Emmanuel Samyn |
1648 | 6 | # # | 6 | # Authors: Emmanuel Samyn, Raphaël Valyi, Sébastien Beau, |
1649 | 7 | # Copyright (C) 2009-2011 Akretion, Emmanuel Samyn, Benoît Guillot # | 7 | # Benoît Guillot, Joel Grand-Guillaume |
1650 | 8 | # # | 8 | # |
1651 | 9 | #This program is free software: you can redistribute it and/or modify # | 9 | # This program is free software: you can redistribute it and/or modify |
1652 | 10 | #it under the terms of the GNU General Public License as published by # | 10 | # it under the terms of the GNU Affero General Public License as |
1653 | 11 | #the Free Software Foundation, either version 3 of the License, or # | 11 | # published by the Free Software Foundation, either version 3 of the |
1654 | 12 | #(at your option) any later version. # | 12 | # License, or (at your option) any later version. |
1655 | 13 | # # | 13 | # |
1656 | 14 | #This program is distributed in the hope that it will be useful, # | 14 | # This program is distributed in the hope that it will be useful, |
1657 | 15 | #but WITHOUT ANY WARRANTY; without even the implied warranty of # | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
1658 | 16 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1659 | 17 | #GNU General Public License for more details. # | 17 | # GNU Affero General Public License for more details. |
1660 | 18 | # # | 18 | # |
1661 | 19 | #You should have received a copy of the GNU General Public License # | 19 | # You should have received a copy of the GNU Affero General Public License |
1662 | 20 | #along with this program. If not, see <http://www.gnu.org/licenses/>. # | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
1663 | 21 | # | ||
1664 | 21 | ######################################################################### | 22 | ######################################################################### |
1665 | 22 | 23 | ||
1666 | 23 | from openerp.osv import orm, fields | 24 | from openerp.osv import orm, fields |
1667 | 25 | import math | ||
1668 | 26 | from datetime import datetime | ||
1669 | 27 | from dateutil.relativedelta import relativedelta | ||
1670 | 28 | import calendar | ||
1671 | 24 | 29 | ||
1672 | 25 | 30 | ||
1673 | 26 | class return_instruction(orm.Model): | 31 | class return_instruction(orm.Model): |
1674 | @@ -85,7 +90,7 @@ | |||
1675 | 85 | 90 | ||
1676 | 86 | _columns = { | 91 | _columns = { |
1677 | 87 | "warranty_duration": fields.float( | 92 | "warranty_duration": fields.float( |
1679 | 88 | 'Period', | 93 | 'Product Warranty (in months)', |
1680 | 89 | help="Warranty in month for this product/supplier relation. Only for " | 94 | help="Warranty in month for this product/supplier relation. Only for " |
1681 | 90 | "company/supplier relation (purchase order) ; the customer/company " | 95 | "company/supplier relation (purchase order) ; the customer/company " |
1682 | 91 | "relation (sale order) always use the product main warranty field"), | 96 | "relation (sale order) always use the product main warranty field"), |
1683 | @@ -121,3 +126,27 @@ | |||
1684 | 121 | 'warranty_return_partner': 'company', | 126 | 'warranty_return_partner': 'company', |
1685 | 122 | 'return_instructions': _get_default_instructions, | 127 | 'return_instructions': _get_default_instructions, |
1686 | 123 | } | 128 | } |
1687 | 129 | |||
1688 | 130 | |||
1689 | 131 | class product_product(orm.Model): | ||
1690 | 132 | _inherit = 'product.product' | ||
1691 | 133 | |||
1692 | 134 | def warranty_limit(self, cr, uid, start, warranty_duration, context=None): | ||
1693 | 135 | """ Take a duration in float, return the duration in relativedelta | ||
1694 | 136 | |||
1695 | 137 | ``relative_delta(months=...)`` only accepts integers. | ||
1696 | 138 | We have to extract the decimal part, and then, extend the delta with | ||
1697 | 139 | days. | ||
1698 | 140 | |||
1699 | 141 | """ | ||
1700 | 142 | decimal_part, months = math.modf(warranty_duration) | ||
1701 | 143 | months = int(months) | ||
1702 | 144 | # If we have a decimal part, we add the number them as days to | ||
1703 | 145 | # the limit. We need to get the month to know the number of | ||
1704 | 146 | # days. | ||
1705 | 147 | delta = relativedelta(months=months) | ||
1706 | 148 | monthday = start + delta | ||
1707 | 149 | __, days_month = calendar.monthrange(monthday.year, monthday.month) | ||
1708 | 150 | # ignore the rest of the days (hours) since we expect a date | ||
1709 | 151 | days = int(days_month * decimal_part) | ||
1710 | 152 | return start + relativedelta(months=months, days=days) | ||
1711 | 124 | 153 | ||
1712 | === modified file 'product_warranty/res_company_view.xml' | |||
1713 | --- product_warranty/res_company_view.xml 2013-11-21 15:08:21 +0000 | |||
1714 | +++ product_warranty/res_company_view.xml 2015-11-20 10:22:38 +0000 | |||
1715 | @@ -7,14 +7,12 @@ | |||
1716 | 7 | <field name="name">crm_claim_rma.company_form</field> | 7 | <field name="name">crm_claim_rma.company_form</field> |
1717 | 8 | <field name="model">res.company</field> | 8 | <field name="model">res.company</field> |
1718 | 9 | <field name="inherit_id" ref="base.view_company_form" /> | 9 | <field name="inherit_id" ref="base.view_company_form" /> |
1719 | 10 | <field eval="16" name="priority"/> | ||
1720 | 11 | <field name="arch" type="xml"> | 10 | <field name="arch" type="xml"> |
1724 | 12 | <data> | 11 | <page string="Configuration" position="inside"> |
1725 | 13 | <field name="company_registry" position="after"> | 12 | <group name="product-warranty" string="Product Warranty"> |
1723 | 14 | <separator string="Crm product return address" colspan="4"/> | ||
1726 | 15 | <field name="crm_return_address_id"/> | 13 | <field name="crm_return_address_id"/> |
1729 | 16 | </field> | 14 | </group> |
1730 | 17 | </data> | 15 | </page> |
1731 | 18 | </field> | 16 | </field> |
1732 | 19 | </record> | 17 | </record> |
1733 | 20 | 18 |
Just adding a small comment to say that Raphaël Valyi discovered a bug when doing a "-u crm_claim_rma" with that branch (it breaks on the duplicate constraint). We started digging to find a solution, but we didn't had time to implement it yet.