Merge lp:~dorian-kemps/unifield-server/US-4172 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4865
Proposed branch: lp:~dorian-kemps/unifield-server/US-4172
Merge into: lp:unifield-server
Diff against target: 106 lines (+17/-14)
6 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+2/-2)
bin/addons/purchase/purchase_order_line.py (+0/-1)
bin/addons/purchase/purchase_view.xml (+2/-2)
bin/addons/purchase_override/purchase.py (+9/-7)
bin/addons/purchase_override/purchase_view.xml (+1/-1)
bin/addons/tender_flow/tender_flow.py (+3/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-4172
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+341381@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 'bin/addons/msf_profile/i18n/fr_MF.po'
2--- bin/addons/msf_profile/i18n/fr_MF.po 2018-04-20 07:09:56 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-04-23 15:25:51 +0000
4@@ -2655,8 +2655,8 @@
5
6 #. module: purchase_override
7 #: view:purchase.order.cancel.wizard:0
8-msgid "Please confirm that you want to cancel all lines of this PO"
9-msgstr "Please confirm that you want to cancel all lines of this PO"
10+msgid "Please confirm that you want to cancel all non-confirmed lines of this PO"
11+msgstr "Veuillez confirmer que vous voulez annuler toutes les lignes non-confirmées du BC"
12
13 #. module: register_accounting
14 #: view:wizard.transfer.with.change:0
15
16=== modified file 'bin/addons/purchase/purchase_order_line.py'
17--- bin/addons/purchase/purchase_order_line.py 2018-04-03 12:31:40 +0000
18+++ bin/addons/purchase/purchase_order_line.py 2018-04-23 15:25:51 +0000
19@@ -390,7 +390,6 @@
20 res[line.id] = a
21 return res
22
23-
24 _columns = {
25 'block_resourced_line_creation': fields.boolean(string='Block resourced line creation', help='Set as true to block resourced line creation in case of cancelled-r line'),
26 'set_as_sourced_n': fields.boolean(string='Set as Sourced-n', help='Line has been created further and has to be created back in preceding documents'),
27
28=== modified file 'bin/addons/purchase/purchase_view.xml'
29--- bin/addons/purchase/purchase_view.xml 2017-12-07 10:07:55 +0000
30+++ bin/addons/purchase/purchase_view.xml 2018-04-23 15:25:51 +0000
31@@ -242,7 +242,7 @@
32 <button string="Validate" icon="terp-check" name="validated" type="workflow" attrs="{'invisible': [('fake_state', '!=', 'draft')]}" header="True"/>
33 <button string="Confirm" icon="terp-check" name="button_confirmed" type="object" attrs="{'invisible': [('fake_state', 'not in', ['validated', 'validated_n'])]}" header="True"/>
34 <button string="Validate reception" icon="terp-camera_test" name="done" type="workflow" attrs="{'invisible': ['|', ('fake_state', '!=', 'confirmed'), ('order_type', '!=', 'direct')]}"/>
35- <button string="Cancel" icon="gtk-del" type="object" name="ask_unlink" attrs="{'invisible': [('fake_state', 'not in', ['draft', 'validated', 'validated_n'])]}"/>
36+ <button string="Cancel" icon="gtk-del" type="object" name="ask_unlink" attrs="{'invisible': ['|', '&amp;', ('fake_state', '!=', 'draft'), ('partner_type', 'not in', ['external', 'esc']), '&amp;', ('fake_state', 'not in', ['draft', 'validated', 'validated_n']), ('partner_type', 'in', ['external', 'esc'])]}"/>
37 </tree>
38 <!-- default form view -->
39 </field>
40@@ -375,7 +375,7 @@
41 <group colspan="4" col="16">
42 <field name="state" readonly="1"/>
43 <button name="close_lines" type="object" string="Validate the reception" icon="terp-camera_test" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('order_type', '!=', 'direct')]}"/>
44- <button name="purchase_cancel" type="object" attrs="{'invisible': [('state', 'not in', ['draft']), ('partner_type', 'not in', ('external', 'esc'))]}" string="Cancel" icon="gtk-cancel"/>
45+ <button name="purchase_cancel" type="object" attrs="{'invisible': ['|', '&amp;', ('state', 'not in', ['draft', 'draft_p']), ('partner_type', 'not in', ['external', 'esc']), '&amp;', ('state', 'not in', ['draft', 'draft_p', 'validated', 'validated_p']), ('partner_type', 'in', ['external', 'esc'])]}" string="Cancel" icon="gtk-cancel"/>
46 <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert" attrs="{'invisible': ['|', '|', '|', '|', '|', ('canceled_end', '=', True), ('po_from_fo', '=', True), ('po_from_ir', '=', True), ('po_from_rr', '=', True), ('tender_id', '!=', False), ('state', '!=', 'cancel')]}"/>
47 <button name="validate_lines" states="draft,draft_p" string="Validate lines" type="object" icon="gtk-go-forward"/>
48 <button name="confirm_lines" states="validated,validated_p" string="Confirm lines" icon="gtk-go-forward" type="object"/>
49
50=== modified file 'bin/addons/purchase_override/purchase.py'
51--- bin/addons/purchase_override/purchase.py 2017-12-12 09:31:02 +0000
52+++ bin/addons/purchase_override/purchase.py 2018-04-23 15:25:51 +0000
53@@ -420,17 +420,19 @@
54 for wiz in self.browse(cr, uid, ids, context=context):
55 po = wiz.order_id
56
57- # cancel all lines:
58+ # cancel all non-confirmed lines:
59 if po.rfq_ok:
60 self.pool.get('purchase.order').cancel_rfq(cr, uid, [po.id], context=context)
61 else:
62 for pol in po.order_line:
63- if pol.has_pol_been_synched:
64- continue
65- signal = 'cancel'
66- if resource and pol.linked_sol_id:
67- signal = 'cancel_r'
68- wf_service.trg_validate(uid, 'purchase.order.line', pol.id, signal, cr)
69+ if (pol.order_id.partner_type in ('external', 'esc') and pol.state in ('draft', 'validated', 'validated_n'))\
70+ or (pol.order_id.partner_type not in ('external', 'esc') and pol.state == 'draft'):
71+ if pol.has_pol_been_synched:
72+ continue
73+ signal = 'cancel'
74+ if resource and pol.linked_sol_id:
75+ signal = 'cancel_r'
76+ wf_service.trg_validate(uid, 'purchase.order.line', pol.id, signal, cr)
77
78 return {'type': 'ir.actions.act_window_close'}
79
80
81=== modified file 'bin/addons/purchase_override/purchase_view.xml'
82--- bin/addons/purchase_override/purchase_view.xml 2017-10-16 12:08:12 +0000
83+++ bin/addons/purchase_override/purchase_view.xml 2018-04-23 15:25:51 +0000
84@@ -119,7 +119,7 @@
85 <field name="has_linked_line" invisible="1" />
86 <group colspan="4" col="1">
87 <html>
88- <h3 style="text-align: center; margin: 13px"><translate>Please confirm that you want to cancel all lines of this PO</translate></h3>
89+ <h3 style="text-align: center; margin: 13px"><translate>Please confirm that you want to cancel all non-confirmed lines of this PO</translate></h3>
90 </html>
91 </group>
92 <group colspan="4" col="1" attrs="{'invisible': [('has_linked_line', '=', False)]}">
93
94=== modified file 'bin/addons/tender_flow/tender_flow.py'
95--- bin/addons/tender_flow/tender_flow.py 2018-04-03 12:39:47 +0000
96+++ bin/addons/tender_flow/tender_flow.py 2018-04-23 15:25:51 +0000
97@@ -1624,7 +1624,9 @@
98 if not rfq.rfq_ok:
99 continue
100 for rfq_line in rfq.order_line:
101- wf_service.trg_validate(uid, 'purchase.order.line', rfq_line.id, 'cancel', cr)
102+ if (rfq_line.order_id.partner_type in ('external', 'esc') and rfq_line.state in ('draft', 'validated', 'validated_n'))\
103+ or (rfq_line.order_id.partner_type not in ('external', 'esc') and rfq_line.state == 'draft'):
104+ wf_service.trg_validate(uid, 'purchase.order.line', rfq_line.id, 'cancel', cr)
105
106 self.write(cr, uid, [rfq.id], {'rfq_state': 'cancel'}, context=context)
107

Subscribers

People subscribed via source and target branches