Merge lp:~unifield-team/unifield-addons/us-787 into lp:unifield-addons

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~unifield-team/unifield-addons/us-787
Merge into: lp:unifield-addons
Diff against target: 61 lines (+15/-2)
2 files modified
sale/sale.py (+3/-0)
stock/stock.py (+12/-2)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/us-787
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+279556@code.launchpad.net
To post a comment you must log in.
4678. By Quentin THEURET @Amaris

US-787 [IMP] Add INFOLOG message when a stock.picking become available

Unmerged revisions

4678. By Quentin THEURET @Amaris

US-787 [IMP] Add INFOLOG message when a stock.picking become available

4677. By Quentin THEURET @Amaris

US-787 [IMP] INFOLOG: Add message on FO confirmation

4676. By Quentin THEURET @Amaris

US-787 [IMP] INFOLOG: Physical inventories: Add the name of the object

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2015-02-05 16:24:18 +0000
3+++ sale/sale.py 2015-12-04 16:00:04 +0000
4@@ -615,6 +615,9 @@
5 message = _("The quotation '%s' has been converted to a sales order.") % (o.name,)
6 message = self._hook_message_action_wait(cr, uid, order=o, message=message)
7 self.log(cr, uid, o.id, message)
8+ self.infolog(cr, uid, "The Field Order id:%s (%s) has been confirmed." % (
9+ o.id, o.name,
10+ ))
11 return True
12
13 def procurement_lines_get(self, cr, uid, ids, *args):
14
15=== modified file 'stock/stock.py'
16--- stock/stock.py 2015-10-08 14:37:26 +0000
17+++ stock/stock.py 2015-12-04 16:00:04 +0000
18@@ -1424,6 +1424,9 @@
19 }
20 # modify the list of views
21 message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or '?') + "' "
22+ infolog_message = None
23+ if pick.state == 'assigned':
24+ infolog_message = type_list.get(pick.type, _('Document')) + " id:" + str(pick.id) or 'False' + " '" + (pick.name or '?') + "' "
25 if pick.min_date:
26 msg= _(' for the ')+ datetime.strptime(pick.min_date, '%Y-%m-%d %H:%M:%S').strftime(date_format).decode('utf-8')
27 state_list = {
28@@ -1437,14 +1440,21 @@
29 res = self._hook_picking_get_view(cr, uid, ids, context=context, pick=pick)
30 context.update({'view_id': res and res[1] or False})
31 message += state_list[pick.state]
32+ if infolog_message:
33+ infolog_message += state_list[pick.state]
34 # modify the message to be displayed
35 message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=message, pick=pick)
36+ if infolog_message:
37+ infolog_message = self._hook_log_picking_modify_message(cr, uid, ids, context=context, message=infolog_message, pick=pick)
38 # conditional test for message log
39 log_cond = self._hook_log_picking_log_cond(cr, uid, ids, context=context, pick=pick)
40 if log_cond and log_cond != 'packing':
41 self.log(cr, uid, pick.id, message, context=context)
42 elif not log_cond:
43 self._hook_custom_log(cr, uid, ids, context=context, message=message, pick=pick)
44+
45+ if infolog_message:
46+ self.infolog(cr, uid, message)
47 return True
48
49 stock_picking()
50@@ -2880,9 +2890,9 @@
51 account_move_obj.unlink(cr, uid, [account_move['id']], context=context)
52 self.write(cr, uid, [inv.id], {'state': 'cancel'}, context=context)
53 if self._name == 'initial.stock.inventory':
54- self.infolog(cr, uid, "The Initial Stock inventory id:%s has been canceled" % inv.id)
55+ self.infolog(cr, uid, "The Initial Stock inventory id:%s (%s) has been canceled" % (inv.id, inv.name))
56 else:
57- self.infolog(cr, uid, "The Physical inventory id:%s has been canceled" % inv.id)
58+ self.infolog(cr, uid, "The Physical inventory id:%s (%s) has been canceled" % (inv.id, inv.name))
59 return True
60
61 stock_inventory()

Subscribers

People subscribed via source and target branches

to all changes: