Merge lp:~unifield-team/unifield-addons/addons-uf-513 into lp:unifield-addons

Proposed by jftempo
Status: Merged
Merged at revision: 4506
Proposed branch: lp:~unifield-team/unifield-addons/addons-uf-513
Merge into: lp:unifield-addons
Diff against target: 70 lines (+21/-1) (has conflicts)
3 files modified
purchase/purchase.py (+8/-0)
purchase/test/procurement_buy.yml (+1/-1)
stock/stock.py (+12/-0)
Text conflict in stock/stock.py
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/addons-uf-513
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+82569@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/purchase.py'
2--- purchase/purchase.py 2011-10-24 13:46:20 +0000
3+++ purchase/purchase.py 2011-11-17 17:19:10 +0000
4@@ -708,6 +708,14 @@
5 'uom': uom,
6 'date': date_order,
7 })[pricelist]
8+ if price is False:
9+ warning = {
10+ 'title': 'No valid pricelist line found !',
11+ 'message':
12+ "Couldn't find a pricelist line matching this product and quantity.\n"
13+ "You have to change either the product, the quantity or the pricelist."
14+ }
15+ res.update({'warning': warning})
16 dt = (datetime.now() + relativedelta(days=int(seller_delay) or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
17
18
19
20=== modified file 'purchase/test/procurement_buy.yml'
21--- purchase/test/procurement_buy.yml 2011-01-14 00:11:01 +0000
22+++ purchase/test/procurement_buy.yml 2011-11-17 17:19:10 +0000
23@@ -24,7 +24,7 @@
24 seller_delay: '1'
25 seller_ids:
26 - delay: 1
27- name: base.res_partner_asus
28+ name: base.res_partner_10
29 min_qty: 2.0
30 qty: 5.0
31 -
32
33=== modified file 'stock/stock.py'
34--- stock/stock.py 2011-11-14 10:45:15 +0000
35+++ stock/stock.py 2011-11-17 17:19:10 +0000
36@@ -1324,6 +1324,12 @@
37 }
38 return self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', view_list.get(pick.type, 'view_picking_form'))
39
40+ def _hook_log_message_picking(self, cr, uid, ids, context=None, pick=False, message=''):
41+ '''
42+ Allow the modification of the logged message
43+ '''
44+ return message
45+
46 def _hook_log_picking_log_cond(self, cr, uid, ids, context=None, *args, **kwargs):
47 '''
48 specify if we display a log or not
49@@ -1375,8 +1381,12 @@
50 res = self._hook_picking_get_view(cr, uid, ids, context=context, pick=pick)
51 context.update({'view_id': res and res[1] or False})
52 message += state_list[pick.state]
53+<<<<<<< TREE
54 # modify the message to be displayed
55 message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=message, pick=pick,)
56+=======
57+ message = self._hook_log_message_picking(cr, uid, ids, context=context, pick=pick, message=message)
58+>>>>>>> MERGE-SOURCE
59 # conditional test for message log
60 if self._hook_log_picking_log_cond(cr, uid, ids, context=context, pick=pick,):
61 self.log(cr, uid, pick.id, message, context=context)
62@@ -1436,6 +1446,8 @@
63 @return: Ids of locations
64 """
65 locations = self.pool.get('stock.location').search(cr, uid, [('usage', '=', 'internal')])
66+ if context.get('location_id', False):
67+ locations = context['location_id'] and [context['location_id']] or []
68 cr.execute('''select
69 prodlot_id,
70 sum(qty)

Subscribers

People subscribed via source and target branches

to all changes: