Merge lp:~unifield-team/unifield-server/us-2367-2 into lp:unifield-server

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
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+324387@code.launchpad.net
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 :

Please also add the missing translations.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/msf_cross_docking/cross_docking_view.xml'
--- bin/addons/msf_cross_docking/cross_docking_view.xml 2016-11-04 12:57:37 +0000
+++ bin/addons/msf_cross_docking/cross_docking_view.xml 2017-05-22 11:38:53 +0000
@@ -56,7 +56,7 @@
56 <field name="arch" type="xml">56 <field name="arch" type="xml">
57 <data>57 <data>
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" >
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>
60 </xpath>60 </xpath>
61 </data>61 </data>
62 </field>62 </field>
6363
=== modified file 'bin/addons/msf_doc_import/wizard/wiz_common_import.py'
--- bin/addons/msf_doc_import/wizard/wiz_common_import.py 2017-02-13 17:09:21 +0000
+++ bin/addons/msf_doc_import/wizard/wiz_common_import.py 2017-05-22 11:38:53 +0000
@@ -697,6 +697,8 @@
697697
698 if picking.partner_id and picking.type == 'in':698 if picking.partner_id and picking.type == 'in':
699 location_id = picking.partner_id.property_stock_supplier.id699 location_id = picking.partner_id.property_stock_supplier.id
700 elif picking.ext_cu and picking.type == 'in':
701 location_id = picking.ext_cu.id
700 elif picking.type == 'in':702 elif picking.type == 'in':
701 location_id = get_ref(cr, uid, 'stock', 'stock_location_suppliers')[1]703 location_id = get_ref(cr, uid, 'stock', 'stock_location_suppliers')[1]
702 else:704 else:
703705
=== modified file 'bin/addons/msf_printed_documents/report/report_reception.py'
--- bin/addons/msf_printed_documents/report/report_reception.py 2017-04-19 12:52:45 +0000
+++ bin/addons/msf_printed_documents/report/report_reception.py 2017-05-22 11:38:53 +0000
@@ -163,12 +163,16 @@
163 return False163 return False
164164
165 def getPartnerName(self,o):165 def getPartnerName(self,o):
166<<<<<<< TREE
166 if o.purchase_id:167 if o.purchase_id:
167 return o.purchase_id and o.purchase_id.partner_id and o.purchase_id.partner_id.name or False168 return o.purchase_id and o.purchase_id.partner_id and o.purchase_id.partner_id.name or False
168 elif o.partner_id:169 elif o.partner_id:
169 return o.partner_id.name170 return o.partner_id.name
170 else:171 else:
171 return False172 return False
173=======
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)
175>>>>>>> MERGE-SOURCE
172176
173 def getPartnerAddress(self,o):177 def getPartnerAddress(self,o):
174 if o.purchase_id:178 if o.purchase_id:
175179
=== modified file 'bin/addons/stock/stock.py'
--- bin/addons/stock/stock.py 2017-03-22 09:52:17 +0000
+++ bin/addons/stock/stock.py 2017-05-22 11:38:53 +0000
@@ -1848,6 +1848,10 @@
1848 """1848 """
1849 if context is None:1849 if context is None:
1850 context = {}1850 context = {}
1851
1852 if context.get('ext_cu', False):
1853 return context['ext_cu']
1854
1851 if context.get('move_line', []):1855 if context.get('move_line', []):
1852 try:1856 try:
1853 return context['move_line'][0][2]['location_id']1857 return context['move_line'][0][2]['location_id']
18541858
=== modified file 'bin/addons/stock_override/stock.py'
--- bin/addons/stock_override/stock.py 2016-11-09 10:00:04 +0000
+++ bin/addons/stock_override/stock.py 2017-05-22 11:38:53 +0000
@@ -320,6 +320,7 @@
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 !'),
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)]"),
322 'partner_id2': fields.many2one('res.partner', 'Partner', required=False),322 'partner_id2': fields.many2one('res.partner', 'Partner', required=False),
323 'ext_cu': fields.many2one('stock.location', string='Ext. C.U.'),
323 'partner_type': fields.related(324 'partner_type': fields.related(
324 'partner_id',325 'partner_id',
325 'partner_type',326 'partner_type',
@@ -376,6 +377,18 @@
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,
377 }378 }
378379
380
381 def on_change_ext_cu(self, cr, uid, ids, ext_cu, context=None):
382 if self.pool.get('stock.move').search_exist(cr, uid, [('picking_id', 'in', ids)], context=context):
383 return {
384 'warning': {
385 'title': _('Warning'),
386 'message': _('You are changing External Consumption Unit, please check that source location of your stock moves are still consistent'),
387 }
388 }
389 return {}
390
391
379 def copy_data(self, cr, uid, id, default=None, context=None):392 def copy_data(self, cr, uid, id, default=None, context=None):
380 if default is None:393 if default is None:
381 default = {}394 default = {}
@@ -2065,7 +2078,7 @@
2065 kwargs['move'] is the current move2078 kwargs['move'] is the current move
2066 '''2079 '''
2067 move = kwargs['move']2080 move = kwargs['move']
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')
20692082
2070 def _hook_cancel_assign_batch(self, cr, uid, ids, context=None):2083 def _hook_cancel_assign_batch(self, cr, uid, ids, context=None):
2071 '''2084 '''
@@ -2575,6 +2588,15 @@
2575 return [('id', 'in', ids)]2588 return [('id', 'in', ids)]
2576 return []2589 return []
25772590
2591 def _search_filter_cu_partner(self, cr, uid, ids, fields, arg, context=None):
2592 if not arg or not arg[0][2] or not isinstance(arg[0][2], list) or not len(arg[0][2]) == 2:
2593 return []
2594 if context is None:
2595 context = {}
2596 ext_cu = arg[0][2][0]
2597 partner_id = arg[0][2][1]
2598 # TODO: write here the filter
2599 return []
25782600
2579 _columns = {2601 _columns = {
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')],
@@ -2586,6 +2608,7 @@
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." \
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."\
2588 ),2610 ),
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),
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'),
2590 'optional_loc': fields.boolean(string='Is an optional location ?'),2613 'optional_loc': fields.boolean(string='Is an optional location ?'),
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"),
25922615
=== modified file 'bin/addons/stock_override/stock_view.xml'
--- bin/addons/stock_override/stock_view.xml 2017-03-21 08:14:52 +0000
+++ bin/addons/stock_override/stock_view.xml 2017-05-22 11:38:53 +0000
@@ -559,11 +559,13 @@
559 </script>559 </script>
560 </html>560 </html>
561 </group>561 </group>
562 <field name="sale_id" invisible="1" />
562 <group colspan="4" col="6">563 <group colspan="4" col="6">
563 <group colspan="4" col="4">564 <group colspan="4" col="4">
564 <field name="name" readonly="1"/>565 <field name="name" readonly="1"/>
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'])]}"/>
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)]}"/>
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')]" />
567 <field name="address_id" invisible="1" />569 <field name="address_id" invisible="1" />
568 <field name="backorder_id" readonly="1"/>570 <field name="backorder_id" readonly="1"/>
569 <field name="reason_type_id" widget="selection"571 <field name="reason_type_id" widget="selection"
@@ -664,7 +666,7 @@
664 <group colspan="2" col="2">666 <group colspan="2" col="2">
665 <separator string="Locations" colspan="2"/>667 <separator string="Locations" colspan="2"/>
666 <field name="location_id"668 <field name="location_id"
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), '|', '&amp;', ('usage', '=', 'customer'), ('location_category', '=', 'consumption_unit'), ('usage', '=', 'supplier')]"
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}"
669 attrs="{'readonly': [('from_wkf_line', '=', True)]}"671 attrs="{'readonly': [('from_wkf_line', '=', True)]}"
670 />672 />

Subscribers

People subscribed via source and target branches

to all changes: