Merge lp:~unifield-team/unifield-server/us-2367-2 into lp:unifield-server
- us-2367-2
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 4382 |
Proposed branch: | lp:~unifield-team/unifield-server/us-2367-2 |
Merge into: | lp:unifield-server |
Diff against target: |
153 lines (+39/-4) (has conflicts) 6 files modified
bin/addons/msf_cross_docking/cross_docking_view.xml (+1/-1) bin/addons/msf_doc_import/wizard/wiz_common_import.py (+2/-0) bin/addons/msf_printed_documents/report/report_reception.py (+4/-0) bin/addons/stock/stock.py (+4/-0) bin/addons/stock_override/stock.py (+24/-1) bin/addons/stock_override/stock_view.xml (+4/-2) Text conflict in bin/addons/msf_printed_documents/report/report_reception.py |
To merge this branch: | bzr merge lp:~unifield-team/unifield-server/us-2367-2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+324387@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Jeff Allen (jr.allen) : | # |
Revision history for this message
jftempo (jfb-tempo-consulting) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/addons/msf_cross_docking/cross_docking_view.xml' | |||
2 | --- bin/addons/msf_cross_docking/cross_docking_view.xml 2016-11-04 12:57:37 +0000 | |||
3 | +++ bin/addons/msf_cross_docking/cross_docking_view.xml 2017-05-22 11:38:53 +0000 | |||
4 | @@ -56,7 +56,7 @@ | |||
5 | 56 | <field name="arch" type="xml"> | 56 | <field name="arch" type="xml"> |
6 | 57 | <data> | 57 | <data> |
7 | 58 | <xpath expr="/form/notebook/page[@string='General Information']/field[@name='move_lines']" position="attributes" > | 58 | <xpath expr="/form/notebook/page[@string='General Information']/field[@name='move_lines']" position="attributes" > |
9 | 59 | <attribute name="default_get">{'purchase_id': purchase_id, 'reason_type_id': reason_type_id, 'warehouse_id': warehouse_id, 'address_in_id': address_id, 'date_expected': min_date} </attribute> | 59 | <attribute name="default_get">{'purchase_id': purchase_id, 'reason_type_id': reason_type_id, 'warehouse_id': warehouse_id, 'address_in_id': address_id, 'date_expected': min_date, 'ext_cu': ext_cu} </attribute> |
10 | 60 | </xpath> | 60 | </xpath> |
11 | 61 | </data> | 61 | </data> |
12 | 62 | </field> | 62 | </field> |
13 | 63 | 63 | ||
14 | === modified file 'bin/addons/msf_doc_import/wizard/wiz_common_import.py' | |||
15 | --- bin/addons/msf_doc_import/wizard/wiz_common_import.py 2017-02-13 17:09:21 +0000 | |||
16 | +++ bin/addons/msf_doc_import/wizard/wiz_common_import.py 2017-05-22 11:38:53 +0000 | |||
17 | @@ -697,6 +697,8 @@ | |||
18 | 697 | 697 | ||
19 | 698 | if picking.partner_id and picking.type == 'in': | 698 | if picking.partner_id and picking.type == 'in': |
20 | 699 | location_id = picking.partner_id.property_stock_supplier.id | 699 | location_id = picking.partner_id.property_stock_supplier.id |
21 | 700 | elif picking.ext_cu and picking.type == 'in': | ||
22 | 701 | location_id = picking.ext_cu.id | ||
23 | 700 | elif picking.type == 'in': | 702 | elif picking.type == 'in': |
24 | 701 | location_id = get_ref(cr, uid, 'stock', 'stock_location_suppliers')[1] | 703 | location_id = get_ref(cr, uid, 'stock', 'stock_location_suppliers')[1] |
25 | 702 | else: | 704 | else: |
26 | 703 | 705 | ||
27 | === modified file 'bin/addons/msf_printed_documents/report/report_reception.py' | |||
28 | --- bin/addons/msf_printed_documents/report/report_reception.py 2017-04-19 12:52:45 +0000 | |||
29 | +++ bin/addons/msf_printed_documents/report/report_reception.py 2017-05-22 11:38:53 +0000 | |||
30 | @@ -163,12 +163,16 @@ | |||
31 | 163 | return False | 163 | return False |
32 | 164 | 164 | ||
33 | 165 | def getPartnerName(self,o): | 165 | def getPartnerName(self,o): |
34 | 166 | <<<<<<< TREE | ||
35 | 166 | if o.purchase_id: | 167 | if o.purchase_id: |
36 | 167 | return o.purchase_id and o.purchase_id.partner_id and o.purchase_id.partner_id.name or False | 168 | return o.purchase_id and o.purchase_id.partner_id and o.purchase_id.partner_id.name or False |
37 | 168 | elif o.partner_id: | 169 | elif o.partner_id: |
38 | 169 | return o.partner_id.name | 170 | return o.partner_id.name |
39 | 170 | else: | 171 | else: |
40 | 171 | return False | 172 | return False |
41 | 173 | ======= | ||
42 | 174 | return o.purchase_id and o.purchase_id.partner_id and o.purchase_id.partner_id.name or (o.ext_cu and o.ext_cu.name) | ||
43 | 175 | >>>>>>> MERGE-SOURCE | ||
44 | 172 | 176 | ||
45 | 173 | def getPartnerAddress(self,o): | 177 | def getPartnerAddress(self,o): |
46 | 174 | if o.purchase_id: | 178 | if o.purchase_id: |
47 | 175 | 179 | ||
48 | === modified file 'bin/addons/stock/stock.py' | |||
49 | --- bin/addons/stock/stock.py 2017-03-22 09:52:17 +0000 | |||
50 | +++ bin/addons/stock/stock.py 2017-05-22 11:38:53 +0000 | |||
51 | @@ -1848,6 +1848,10 @@ | |||
52 | 1848 | """ | 1848 | """ |
53 | 1849 | if context is None: | 1849 | if context is None: |
54 | 1850 | context = {} | 1850 | context = {} |
55 | 1851 | |||
56 | 1852 | if context.get('ext_cu', False): | ||
57 | 1853 | return context['ext_cu'] | ||
58 | 1854 | |||
59 | 1851 | if context.get('move_line', []): | 1855 | if context.get('move_line', []): |
60 | 1852 | try: | 1856 | try: |
61 | 1853 | return context['move_line'][0][2]['location_id'] | 1857 | return context['move_line'][0][2]['location_id'] |
62 | 1854 | 1858 | ||
63 | === modified file 'bin/addons/stock_override/stock.py' | |||
64 | --- bin/addons/stock_override/stock.py 2016-11-09 10:00:04 +0000 | |||
65 | +++ bin/addons/stock_override/stock.py 2017-05-22 11:38:53 +0000 | |||
66 | @@ -320,6 +320,7 @@ | |||
67 | 320 | 'from_yml_test': fields.boolean('Only used to pass addons unit test', readonly=True, help='Never set this field to true !'), | 320 | 'from_yml_test': fields.boolean('Only used to pass addons unit test', readonly=True, help='Never set this field to true !'), |
68 | 321 | 'address_id': fields.many2one('res.partner.address', 'Delivery address', help="Address of partner", readonly=False, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, domain="[('partner_id', '=', partner_id)]"), | 321 | 'address_id': fields.many2one('res.partner.address', 'Delivery address', help="Address of partner", readonly=False, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}, domain="[('partner_id', '=', partner_id)]"), |
69 | 322 | 'partner_id2': fields.many2one('res.partner', 'Partner', required=False), | 322 | 'partner_id2': fields.many2one('res.partner', 'Partner', required=False), |
70 | 323 | 'ext_cu': fields.many2one('stock.location', string='Ext. C.U.'), | ||
71 | 323 | 'partner_type': fields.related( | 324 | 'partner_type': fields.related( |
72 | 324 | 'partner_id', | 325 | 'partner_id', |
73 | 325 | 'partner_type', | 326 | 'partner_type', |
74 | @@ -376,6 +377,18 @@ | |||
75 | 376 | 'company_id2': lambda s,c,u,ids,ctx=None: s.pool.get('res.users').browse(c,u,u).company_id.partner_id.id, | 377 | 'company_id2': lambda s,c,u,ids,ctx=None: s.pool.get('res.users').browse(c,u,u).company_id.partner_id.id, |
76 | 377 | } | 378 | } |
77 | 378 | 379 | ||
78 | 380 | |||
79 | 381 | def on_change_ext_cu(self, cr, uid, ids, ext_cu, context=None): | ||
80 | 382 | if self.pool.get('stock.move').search_exist(cr, uid, [('picking_id', 'in', ids)], context=context): | ||
81 | 383 | return { | ||
82 | 384 | 'warning': { | ||
83 | 385 | 'title': _('Warning'), | ||
84 | 386 | 'message': _('You are changing External Consumption Unit, please check that source location of your stock moves are still consistent'), | ||
85 | 387 | } | ||
86 | 388 | } | ||
87 | 389 | return {} | ||
88 | 390 | |||
89 | 391 | |||
90 | 379 | def copy_data(self, cr, uid, id, default=None, context=None): | 392 | def copy_data(self, cr, uid, id, default=None, context=None): |
91 | 380 | if default is None: | 393 | if default is None: |
92 | 381 | default = {} | 394 | default = {} |
93 | @@ -2065,7 +2078,7 @@ | |||
94 | 2065 | kwargs['move'] is the current move | 2078 | kwargs['move'] is the current move |
95 | 2066 | ''' | 2079 | ''' |
96 | 2067 | move = kwargs['move'] | 2080 | move = kwargs['move'] |
98 | 2068 | return move.location_id.usage == 'supplier' | 2081 | return move.location_id.usage == 'supplier' or (move.location_id.usage == 'customer' and move.location_id.location_category == 'consumption_unit') |
99 | 2069 | 2082 | ||
100 | 2070 | def _hook_cancel_assign_batch(self, cr, uid, ids, context=None): | 2083 | def _hook_cancel_assign_batch(self, cr, uid, ids, context=None): |
101 | 2071 | ''' | 2084 | ''' |
102 | @@ -2575,6 +2588,15 @@ | |||
103 | 2575 | return [('id', 'in', ids)] | 2588 | return [('id', 'in', ids)] |
104 | 2576 | return [] | 2589 | return [] |
105 | 2577 | 2590 | ||
106 | 2591 | def _search_filter_cu_partner(self, cr, uid, ids, fields, arg, context=None): | ||
107 | 2592 | if not arg or not arg[0][2] or not isinstance(arg[0][2], list) or not len(arg[0][2]) == 2: | ||
108 | 2593 | return [] | ||
109 | 2594 | if context is None: | ||
110 | 2595 | context = {} | ||
111 | 2596 | ext_cu = arg[0][2][0] | ||
112 | 2597 | partner_id = arg[0][2][1] | ||
113 | 2598 | # TODO: write here the filter | ||
114 | 2599 | return [] | ||
115 | 2578 | 2600 | ||
116 | 2579 | _columns = { | 2601 | _columns = { |
117 | 2580 | 'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location'), ('nomenclature', 'Nomenclature')], | 2602 | 'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location'), ('nomenclature', 'Nomenclature')], |
118 | @@ -2586,6 +2608,7 @@ | |||
119 | 2586 | "\n* Fixed Location: The chained location is taken from the next field: Chained Location if Fixed." \ | 2608 | "\n* Fixed Location: The chained location is taken from the next field: Chained Location if Fixed." \ |
120 | 2587 | "\n* Nomenclature: The chained location is taken from the options field: Chained Location is according to the nomenclature level of product."\ | 2609 | "\n* Nomenclature: The chained location is taken from the options field: Chained Location is according to the nomenclature level of product."\ |
121 | 2588 | ), | 2610 | ), |
122 | 2611 | 'filter_cu_partner': fields.function(_fake_get, method=True, type='boolean', string='Filter location by ext cu/partner', fnct_search=_search_filter_cu_partner), | ||
123 | 2589 | 'chained_options_ids': fields.one2many('stock.location.chained.options', 'location_id', string='Chained options'), | 2612 | 'chained_options_ids': fields.one2many('stock.location.chained.options', 'location_id', string='Chained options'), |
124 | 2590 | 'optional_loc': fields.boolean(string='Is an optional location ?'), | 2613 | 'optional_loc': fields.boolean(string='Is an optional location ?'), |
125 | 2591 | 'stock_real': fields.function(_product_value, method=True, type='float', string='Real Stock', multi="stock"), | 2614 | 'stock_real': fields.function(_product_value, method=True, type='float', string='Real Stock', multi="stock"), |
126 | 2592 | 2615 | ||
127 | === modified file 'bin/addons/stock_override/stock_view.xml' | |||
128 | --- bin/addons/stock_override/stock_view.xml 2017-03-21 08:14:52 +0000 | |||
129 | +++ bin/addons/stock_override/stock_view.xml 2017-05-22 11:38:53 +0000 | |||
130 | @@ -559,11 +559,13 @@ | |||
131 | 559 | </script> | 559 | </script> |
132 | 560 | </html> | 560 | </html> |
133 | 561 | </group> | 561 | </group> |
134 | 562 | <field name="sale_id" invisible="1" /> | ||
135 | 562 | <group colspan="4" col="6"> | 563 | <group colspan="4" col="6"> |
136 | 563 | <group colspan="4" col="4"> | 564 | <group colspan="4" col="4"> |
137 | 564 | <field name="name" readonly="1"/> | 565 | <field name="name" readonly="1"/> |
138 | 565 | <field name="origin" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/> | 566 | <field name="origin" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/> |
140 | 566 | <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)" required="0" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}"/> | 567 | <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)" required="0" attrs="{'readonly': ['|', ('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned']), ('ext_cu', '!=', False)]}"/> |
141 | 568 | <field name="ext_cu" on_change="on_change_ext_cu(ext_cu)" attrs="{'readonly': ['|', '|', ('partner_id2', '!=', False), ('sale_id', '!=', False), ('purchase_id', '!=', False)]}" domain="[('location_category', '=', 'consumption_unit')]" /> | ||
142 | 567 | <field name="address_id" invisible="1" /> | 569 | <field name="address_id" invisible="1" /> |
143 | 568 | <field name="backorder_id" readonly="1"/> | 570 | <field name="backorder_id" readonly="1"/> |
144 | 569 | <field name="reason_type_id" widget="selection" | 571 | <field name="reason_type_id" widget="selection" |
145 | @@ -664,7 +666,7 @@ | |||
146 | 664 | <group colspan="2" col="2"> | 666 | <group colspan="2" col="2"> |
147 | 665 | <separator string="Locations" colspan="2"/> | 667 | <separator string="Locations" colspan="2"/> |
148 | 666 | <field name="location_id" | 668 | <field name="location_id" |
150 | 667 | domain="[('usage', '!=', 'view'), ('usage', '=', 'supplier'), ('id', '!=', location_dest_id)]" | 669 | domain="[('filter_cu_partner', 'in', [parent.ext_cu, parent.partner_id2]), ('usage', '!=', 'view'), ('id', '!=', location_dest_id), '|', '&', ('usage', '=', 'customer'), ('location_category', '=', 'consumption_unit'), ('usage', '=', 'supplier')]" |
151 | 668 | context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" | 670 | context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" |
152 | 669 | attrs="{'readonly': [('from_wkf_line', '=', True)]}" | 671 | attrs="{'readonly': [('from_wkf_line', '=', True)]}" |
153 | 670 | /> | 672 | /> |
Please also add the missing translations.