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

Proposed by jftempo
Status: Merged
Merged at revision: 4382
Proposed branch: lp:~unifield-team/unifield-server/us-2367
Merge into: lp:unifield-server
Diff against target: 244 lines (+77/-6) (has conflicts)
7 files modified
bin/addons/msf_cross_docking/cross_docking_view.xml (+1/-1)
bin/addons/msf_doc_import/wizard/wiz_common_import.py (+5/-1)
bin/addons/msf_printed_documents/report/report_reception.py (+4/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+13/-0)
bin/addons/stock/stock.py (+4/-0)
bin/addons/stock_override/stock.py (+44/-1)
bin/addons/stock_override/stock_view.xml (+6/-3)
Text conflict in bin/addons/msf_printed_documents/report/report_reception.py
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-2367
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+320810@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jeff Allen (jr.allen) :

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-24 07:13:20 +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-04-12 08:42:16 +0000
+++ bin/addons/msf_doc_import/wizard/wiz_common_import.py 2017-05-24 07:13:20 +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:
@@ -721,7 +723,9 @@
721 'reason_type_id': picking.reason_type_id.id,723 'reason_type_id': picking.reason_type_id.id,
722 'location_id': location_id,724 'location_id': location_id,
723 'location_dest_id': location_dest_id,725 'location_dest_id': location_dest_id,
724 'name': p_data['name'],}726 'name': p_data['name'],
727 'is_ext_cu': True if picking.ext_cu else False,
728 }
725729
726 values.update(self.onchange_product_id(cr, uid, False, p_data['id'], location_id, location_dest_id, picking.address_id and picking.address_id.id or False, picking.type, False).get('value', {}))730 values.update(self.onchange_product_id(cr, uid, False, p_data['id'], location_id, location_dest_id, picking.address_id and picking.address_id.id or False, picking.type, False).get('value', {}))
727731
728732
=== 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-24 07:13:20 +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/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2017-05-22 16:04:34 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2017-05-24 07:13:20 +0000
@@ -98181,6 +98181,7 @@
98181msgid "Article must be used only in a properly designed programme, need a more detailed description."98181msgid "Article must be used only in a properly designed programme, need a more detailed description."
98182msgstr "L'article doit être uniquement utilisé dans un programme correctement construit, à besoin d'une description plus détaillée."98182msgstr "L'article doit être uniquement utilisé dans un programme correctement construit, à besoin d'une description plus détaillée."
9818398183
98184<<<<<<< TREE
98184#. module: sync_client98185#. module: sync_client
98185#: view:sync.client.update_received:098186#: view:sync.client.update_received:0
98186msgid "Updates Received"98187msgid "Updates Received"
@@ -98556,3 +98557,15 @@
98556#, python-format98557#, python-format
98557msgid "%s_template.xls"98558msgid "%s_template.xls"
98558msgstr "modèle_%s.xls"98559msgstr "modèle_%s.xls"
98560=======
98561#. module: stock_override
98562#: code:addons/stock_override/stock.py:386
98563#, python-format
98564msgid "You are changing an External Consumption Unit, please check that source location of your stock moves are still consistent"
98565msgstr "Vous avez changé d'unité de consommation externe, merci de vérifier que vos mouvements de stock sont toujours cohérents"
98566
98567#. module: stock_override
98568#: field:stock.location,filter_partner_id2:0
98569msgid "Filter location by partner"
98570msgstr "Filtrer l'emplacement de stock par partenaire"
98571>>>>>>> MERGE-SOURCE
9855998572
=== modified file 'bin/addons/stock/stock.py'
--- bin/addons/stock/stock.py 2017-05-22 16:04:34 +0000
+++ bin/addons/stock/stock.py 2017-05-24 07:13:20 +0000
@@ -1849,6 +1849,10 @@
1849 """1849 """
1850 if context is None:1850 if context is None:
1851 context = {}1851 context = {}
1852
1853 if context.get('ext_cu', False):
1854 return context['ext_cu']
1855
1852 if context.get('move_line', []):1856 if context.get('move_line', []):
1853 try:1857 try:
1854 return context['move_line'][0][2]['location_id']1858 return context['move_line'][0][2]['location_id']
18551859
=== 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-24 07:13:20 +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 an 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 = {}
@@ -1335,6 +1348,14 @@
13351348
1336 return False1349 return False
13371350
1351 def _default_is_ext_cu(self, cr, uid, context=None):
1352 if not context:
1353 context = {}
1354 if context.get('ext_cu', False):
1355 return True
1356 return False
1357
1358
1338 def _get_inactive_product(self, cr, uid, ids, field_name, args, context=None):1359 def _get_inactive_product(self, cr, uid, ids, field_name, args, context=None):
1339 '''1360 '''
1340 Fill the error message if the product of the line is inactive1361 Fill the error message if the product of the line is inactive
@@ -1418,6 +1439,7 @@
1418 'from_dpo': fields.function(_get_from_dpo, fnct_search=_search_from_dpo, type='boolean', method=True, store=False, string='From DPO ?'),1439 'from_dpo': fields.function(_get_from_dpo, fnct_search=_search_from_dpo, type='boolean', method=True, store=False, string='From DPO ?'),
1419 'sync_dpo': fields.boolean(string='Sync. DPO'),1440 'sync_dpo': fields.boolean(string='Sync. DPO'),
1420 'from_wkf_line': fields.related('picking_id', 'from_wkf', type='boolean', string='Internal use: from wkf'),1441 'from_wkf_line': fields.related('picking_id', 'from_wkf', type='boolean', string='Internal use: from wkf'),
1442 'is_ext_cu': fields.boolean(string='Ext. CU'),
1421 'fake_state': fields.related('state', type='char', store=False, string="Internal use"),1443 'fake_state': fields.related('state', type='char', store=False, string="Internal use"),
1422 'processed_stock_move': fields.boolean(string='Processed Stock Move'),1444 'processed_stock_move': fields.boolean(string='Processed Stock Move'),
1423 'inactive_product': fields.function(_get_inactive_product, method=True, type='boolean', string='Product is inactive', store=False, multi='inactive'),1445 'inactive_product': fields.function(_get_inactive_product, method=True, type='boolean', string='Product is inactive', store=False, multi='inactive'),
@@ -1442,6 +1464,7 @@
1442 'inactive_product': False,1464 'inactive_product': False,
1443 'inactive_error': lambda *a: '',1465 'inactive_error': lambda *a: '',
1444 'has_to_be_resourced': False,1466 'has_to_be_resourced': False,
1467 'is_ext_cu': _default_is_ext_cu,
1445 }1468 }
14461469
1447 @check_rw_warning1470 @check_rw_warning
@@ -2065,7 +2088,7 @@
2065 kwargs['move'] is the current move2088 kwargs['move'] is the current move
2066 '''2089 '''
2067 move = kwargs['move']2090 move = kwargs['move']
2068 return move.location_id.usage == 'supplier'2091 return move.location_id.usage == 'supplier' or (move.location_id.usage == 'customer' and move.location_id.location_category == 'consumption_unit')
20692092
2070 def _hook_cancel_assign_batch(self, cr, uid, ids, context=None):2093 def _hook_cancel_assign_batch(self, cr, uid, ids, context=None):
2071 '''2094 '''
@@ -2575,6 +2598,25 @@
2575 return [('id', 'in', ids)]2598 return [('id', 'in', ids)]
2576 return []2599 return []
25772600
2601 def _search_filter_partner_ext_cu(self, cr, uid, ids, fields, arg, context=None):
2602 if not arg or not arg[0][2] or not isinstance(arg[0][2], list) or not len(arg[0][2]) == 2:
2603 return []
2604 if context is None:
2605 context = {}
2606
2607 partner_id2 = arg[0][2][0]
2608 ext_cu = arg[0][2][1]
2609
2610 domain = []
2611 if not partner_id2 and not ext_cu:
2612 domain = []
2613 elif partner_id2:
2614 domain = [('usage', '=', 'supplier')]
2615 else: # ext_cu
2616 domain = [('usage', '=', 'customer'), ('location_category', '=', 'consumption_unit')]
2617
2618 return domain
2619
25782620
2579 _columns = {2621 _columns = {
2580 'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location'), ('nomenclature', 'Nomenclature')],2622 'chained_location_type': fields.selection([('none', 'None'), ('customer', 'Customer'), ('fixed', 'Fixed Location'), ('nomenclature', 'Nomenclature')],
@@ -2586,6 +2628,7 @@
2586 "\n* Fixed Location: The chained location is taken from the next field: Chained Location if Fixed." \2628 "\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."\2629 "\n* Nomenclature: The chained location is taken from the options field: Chained Location is according to the nomenclature level of product."\
2588 ),2630 ),
2631 'filter_partner_ext_cu': fields.function(_fake_get, method=True, type='boolean', string='Filter location by partner', fnct_search=_search_filter_partner_ext_cu),
2589 'chained_options_ids': fields.one2many('stock.location.chained.options', 'location_id', string='Chained options'),2632 'chained_options_ids': fields.one2many('stock.location.chained.options', 'location_id', string='Chained options'),
2590 'optional_loc': fields.boolean(string='Is an optional location ?'),2633 '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"),2634 'stock_real': fields.function(_product_value, method=True, type='float', string='Real Stock', multi="stock"),
25922635
=== modified file 'bin/addons/stock_override/stock_view.xml'
--- bin/addons/stock_override/stock_view.xml 2017-05-10 12:47:14 +0000
+++ bin/addons/stock_override/stock_view.xml 2017-05-24 07:13:20 +0000
@@ -561,11 +561,13 @@
561 </script>561 </script>
562 </html>562 </html>
563 </group>563 </group>
564 <field name="sale_id" invisible="1" />
564 <group colspan="4" col="6">565 <group colspan="4" col="6">
565 <group colspan="4" col="4">566 <group colspan="4" col="4">
566 <field name="name" readonly="1"/>567 <field name="name" readonly="1"/>
567 <field name="origin" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>568 <field name="origin" attrs="{'readonly': [('state', 'not in', ['draft', 'auto', 'assigned', 'confirmed'])]}"/>
568 <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)" required="0" attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}"/>569 <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)]}"/>
570 <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')]" />
569 <field name="address_id" invisible="1" />571 <field name="address_id" invisible="1" />
570 <field name="backorder_id" readonly="1"/>572 <field name="backorder_id" readonly="1"/>
571 <field name="reason_type_id" widget="selection"573 <field name="reason_type_id" widget="selection"
@@ -637,6 +639,7 @@
637 <group colspan="2" col="4">639 <group colspan="2" col="4">
638 <separator colspan="4" string="Move Information"/>640 <separator colspan="4" string="Move Information"/>
639 <field name="from_wkf_line" invisible="1" />641 <field name="from_wkf_line" invisible="1" />
642 <field name="is_ext_cu" invisible="1" />
640 <field name="name" invisible="1" colspan="4"/>643 <field name="name" invisible="1" colspan="4"/>
641 <field name="product_id"644 <field name="product_id"
642 context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True, 'available_for_restriction': 'picking', 'search_default_not_restricted': 1}"645 context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True, 'available_for_restriction': 'picking', 'search_default_not_restricted': 1}"
@@ -666,9 +669,9 @@
666 <group colspan="2" col="2">669 <group colspan="2" col="2">
667 <separator string="Locations" colspan="2"/>670 <separator string="Locations" colspan="2"/>
668 <field name="location_id"671 <field name="location_id"
669 domain="[('usage', '!=', 'view'), ('usage', '=', 'supplier'), ('id', '!=', location_dest_id)]"672 domain="[('filter_partner_ext_cu', 'in', [parent.partner_id2, parent.ext_cu]), ('usage', '!=', 'view'), ('id', '!=', location_dest_id), '|', '&amp;', ('usage', '=', 'customer'), ('location_category', '=', 'consumption_unit'), ('usage', '=', 'supplier')]"
670 context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"673 context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"
671 attrs="{'readonly': [('from_wkf_line', '=', True)]}"674 attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('is_ext_cu', '=', True)]}"
672 />675 />
673 <field name="product_type" invisible="1"/>676 <field name="product_type" invisible="1"/>
674 <field name="location_dest_id"677 <field name="location_dest_id"

Subscribers

People subscribed via source and target branches

to all changes: