Merge lp:~mallorymarcot/unifield-server/us-4201 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5141
Proposed branch: lp:~mallorymarcot/unifield-server/us-4201
Merge into: lp:unifield-server
Diff against target: 659 lines (+385/-26) (has conflicts)
13 files modified
bin/addons/msf_config_locations/stock_configuration.py (+82/-20)
bin/addons/msf_config_locations/stock_configuration_view.xml (+7/-3)
bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py (+30/-0)
bin/addons/msf_outgoing/wizard/incoming_shipment_processor_view.xml (+4/-1)
bin/addons/msf_outgoing/wizard/internal_move_processor.py (+16/-0)
bin/addons/msf_profile/i18n/fr_MF.po (+138/-0)
bin/addons/stock/__openerp__.py (+1/-0)
bin/addons/stock/stock.py (+24/-0)
bin/addons/stock/stock_view.xml (+1/-1)
bin/addons/stock/wizard/__init__.py (+1/-0)
bin/addons/stock/wizard/stock_location_confirm_deactivation.py (+55/-0)
bin/addons/stock/wizard/stock_location_confirm_deactivation.xml (+25/-0)
bin/addons/stock_override/stock_view.xml (+1/-1)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~mallorymarcot/unifield-server/us-4201
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+355438@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
=== modified file 'bin/addons/msf_config_locations/stock_configuration.py'
--- bin/addons/msf_config_locations/stock_configuration.py 2018-06-12 13:34:28 +0000
+++ bin/addons/msf_config_locations/stock_configuration.py 2018-11-06 16:35:55 +0000
@@ -603,9 +603,12 @@
603 string='Location type'),603 string='Location type'),
604 'error_message': fields.text(string='Information Message', readonly=True),604 'error_message': fields.text(string='Information Message', readonly=True),
605 'error': fields.boolean(string='Error'),605 'error': fields.boolean(string='Error'),
606 'move_from_to': fields.boolean(string='Has a move from/to the location'),606 'can_force': fields.boolean(string='Can force'),
607 'move_from': fields.boolean(string='Has a move from the location'),
608 'move_to': fields.boolean(string='Has a move to the location'),
607 'not_empty': fields.boolean(string='Location not empty'),609 'not_empty': fields.boolean(string='Location not empty'),
608 'has_child': fields.boolean(string='Location has children locations'),610 'has_child': fields.boolean(string='Location has children locations'),
611 'related_ir': fields.boolean(string='Location has related IR open'),
609 }612 }
610613
611 def location_id_on_change(self, cr, uid, ids, location_id, context=None):614 def location_id_on_change(self, cr, uid, ids, location_id, context=None):
@@ -614,44 +617,73 @@
614 Check if there is no stock in this location617 Check if there is no stock in this location
615 '''618 '''
616 res = {'error_message': '',619 res = {'error_message': '',
617 'move_from_to': False,620 'move_from': False,
621 'move_to': False,
618 'not_empty': False,622 'not_empty': False,
619 'has_child': False}623 'has_child': False,
624 'related_ir': False}
620 warning = {}625 warning = {}
621 error = False626 error = False
627 can_force = False
622628
623 if location_id:629 if location_id:
624 location = self.pool.get('stock.location').browse(cr, uid, location_id, context=context)630 location = self.pool.get('stock.location').browse(cr, uid, location_id, context=context)
625 # Check if no moves to this location aren't done631
626 move_from_to = self.pool.get('stock.move').search(cr, uid, [('state', 'not in', ('done', 'cancel')), '|', ('location_id', '=', location.id), ('location_dest_id', '=', location.id)])632 move_to = self.pool.get('stock.move').search(cr, uid, [
627 if move_from_to:633 ('state', 'not in', ('done', 'cancel')),
628 error = True634 ('location_dest_id', '=', location.id),
629 res['move_from_to'] = True635 ('type', 'in', ['in', 'internal']),
630 res['error_message'] += '''* You have at least one move from or to the location '%s' which is not 'Done'.636 ])
631Please click on the 'See moves' button to see which moves are still in progress from/to this location.''' %location.name637 if move_to:
632 res['error_message'] += '\n' + '\n'638 error = True
639 can_force = True
640 res['move_to'] = True
641 res['error_message'] += _("* You have at least one move to the location '%s' which is not 'Done'.\nPlease click on the 'See moves' button to see which moves are still in progress to this location.") % location.name
642 res['error_message'] += '\n' + '\n'
643
644 move_from = self.pool.get('stock.move').search(cr, uid, [
645 ('state', 'not in', ('done', 'cancel')),
646 ('id', 'not in', move_to),
647 '|', ('location_id', '=', location.id), ('location_dest_id', '=', location.id),
648 ])
649 if move_from:
650 error = True
651 res['move_from'] = True
652 res['error_message'] += _("* You have at least one move from or to the location '%s' which is not 'Done'.\nPlease click on the 'See moves' button to see which moves are still in progress from/to this location.") % location.name
653 res['error_message'] += '\n' + '\n'
654
655
633 # Check if no stock in the location656 # Check if no stock in the location
634 if location.stock_real and location.usage == 'internal':657 if location.stock_real and location.usage == 'internal':
635 error = True658 error = True
636 res['not_empty'] = True659 res['not_empty'] = True
637 res['error_message'] += '''* The location '%s' is not empty of products. 660 res['error_message'] += _("* The location '%s' is not empty of products.\nPlease click on the 'Products in location' button to see which products are still in the location.") % location.name
638Please click on the 'Products in location' button to see which products are still in the location.''' %location.name
639 res['error_message'] += '\n' + '\n'661 res['error_message'] += '\n' + '\n'
640662
641 # Check if the location has children locations663 # Check if the location has children locations
642 if location.child_ids:664 if location.child_ids:
643 error = True665 error = True
644 res['has_child'] = True666 res['has_child'] = True
645 res['error_message'] += '''* The location '%s' has children locations.667 res['error_message'] += _("* The location '%s' has children locations.\nPlease remove all children locations before remove it.\nPlease click on the 'Children locations' button to see all children locations.") % location.name
646Please remove all children locations before remove it.
647Please click on the 'Children locations' button to see all children locations.''' %location.name
648 res['error_message'] += '\n' + '\n'668 res['error_message'] += '\n' + '\n'
649669
670 related_ir = self.pool.get('sale.order').search(cr, uid, [
671 ('procurement_request', '=', True),
672 ('state', 'in', ('draft', 'draft_p', 'validated', 'validated_p', 'sourced', 'sourced_p')),
673 ('location_requestor_id', '=', location_id),
674 ], context=context)
675 if related_ir:
676 error = True
677 can_force = True
678 res['related_ir'] = True
679 res['error_message'] += _("* Warning there are open IR with location '%s'.\n Please click on the 'See documents' button to see all children locations.\n\n") % location.name
680
650 if error:681 if error:
651 warning.update({'title': 'Be careful !',682 warning.update({'title': _('Be careful !'),
652 'message': 'You have a problem with this location − Please see the message in the form for more information.'})683 'message': _('You have a problem with this location − Please see the message in the form for more information.')})
653684
654 res['error'] = error685 res['error'] = error
686 res['can_force'] = error and not (res['not_empty'] or res['has_child'] or res['move_from']) and can_force or False
655687
656 return {'value': res,688 return {'value': res,
657 'warning': warning}689 'warning': warning}
@@ -696,9 +728,8 @@
696 internal_cu_loc_id = data_obj.get_object_reference(cr, uid, 'msf_config_locations', 'stock_location_consumption_units_view')[1]728 internal_cu_loc_id = data_obj.get_object_reference(cr, uid, 'msf_config_locations', 'stock_location_consumption_units_view')[1]
697729
698 for wizard in self.browse(cr, uid, ids, context=context):730 for wizard in self.browse(cr, uid, ids, context=context):
699 if wizard.error or wizard.has_child or wizard.not_empty or wizard.move_from_to:731 if (wizard.error and not wizard.can_force) or wizard.has_child or wizard.not_empty or wizard.move_from:
700 raise osv.except_osv(_('Error'), _('You cannot remove this location because some errors are still here !'))732 raise osv.except_osv(_('Error'), _('You cannot remove this location because some errors are still here !'))
701
702 location = wizard.location_id733 location = wizard.location_id
703734
704 # De-activate the location735 # De-activate the location
@@ -762,6 +793,37 @@
762 'target': 'current',793 'target': 'current',
763 }794 }
764795
796
797 def related_ir(self, cr, uid, ids, context=None):
798 if context is None:
799 context = {}
800 if isinstance(ids, (int,long)):
801 ids = [ids]
802
803 wizard = self.browse(cr, uid, ids[0], context=context)
804 location = wizard.location_id
805 context.update({'procurement_request': True})
806
807 related_ir = self.pool.get('sale.order').search(cr, uid, [
808 ('procurement_request', '=', True),
809 ('state', 'in', ('draft', 'draft_p', 'validated', 'validated_p', 'sourced', 'sourced_p')),
810 ('location_requestor_id', '=', location.id),
811 ], context=context)
812
813 view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'procurement_request', 'procurement_request_tree_view')[1]
814
815 return {
816 'type': 'ir.actions.act_window',
817 'res_model': 'sale.order',
818 'domain': [('id', 'in', related_ir)],
819 'view_id': [view_id],
820 'view_type': 'form',
821 'view_mode': 'tree,form',
822 'target': 'current',
823 'context': context,
824 }
825
826
765 def products_in_location(self, cr, uid, ids, context=None):827 def products_in_location(self, cr, uid, ids, context=None):
766 '''828 '''
767 Returns a list of products in the location829 Returns a list of products in the location
768830
=== modified file 'bin/addons/msf_config_locations/stock_configuration_view.xml'
--- bin/addons/msf_config_locations/stock_configuration_view.xml 2018-08-10 15:54:25 +0000
+++ bin/addons/msf_config_locations/stock_configuration_view.xml 2018-11-06 16:35:55 +0000
@@ -50,9 +50,12 @@
50 <field name="arch" type="xml">50 <field name="arch" type="xml">
51 <form string="Remove an optional location">51 <form string="Remove an optional location">
52 <field name="error" invisible="1" />52 <field name="error" invisible="1" />
53 <field name="move_from_to" invisible="1" />53 <field name="move_from" invisible="1" />
54 <field name="move_to" invisible="1" />
54 <field name="not_empty" invisible="1" />55 <field name="not_empty" invisible="1" />
55 <field name="has_child" invisible="1" />56 <field name="has_child" invisible="1" />
57 <field name="related_ir" invisible="1" />
58 <field name="can_force" invisible="1" />
56 <separator string="Parameters" colspan="4" />59 <separator string="Parameters" colspan="4" />
57 <!--<field name="location_usage" string="Which is the usage of the location to remove ?" colspan="4" 60 <!--<field name="location_usage" string="Which is the usage of the location to remove ?" colspan="4"
58 on_change="location_usage_change(location_usage)" />61 on_change="location_usage_change(location_usage)" />
@@ -65,15 +68,16 @@
65 <group colspan="4" col="3" attrs="{'invisible': [('error', '=', False)]}">68 <group colspan="4" col="3" attrs="{'invisible': [('error', '=', False)]}">
66 <separator string="Message" colspan="4" />69 <separator string="Message" colspan="4" />
67 <field name="error_message" nolabel="1" colspan="4" />70 <field name="error_message" nolabel="1" colspan="4" />
68 <button type="object" name="see_moves" string="See moves" attrs="{'invisible': [('move_from_to', '=', False)]}" />71 <button type="object" name="see_moves" string="See moves" attrs="{'invisible': [('move_from', '=', False),('move_to', '=', False)]}" />
69 <button type="object" name="products_in_location" string="Products in location" attrs="{'invisible': [('not_empty', '=', False)]}" />72 <button type="object" name="products_in_location" string="Products in location" attrs="{'invisible': [('not_empty', '=', False)]}" />
70 <button type="object" name="children_location" string="Children locations" attrs="{'invisible': [('has_child', '=', False)]}" />73 <button type="object" name="children_location" string="Children locations" attrs="{'invisible': [('has_child', '=', False)]}" />
74 <button type="object" name="related_ir" string="See documents" attrs="{'invisible': [('related_ir', '=', False)]}" />
71 </group>75 </group>
72 <separator colspan="4" string="Actions" />76 <separator colspan="4" string="Actions" />
73 <button special="cancel" icon="gtk-cancel" string="Cancel" />77 <button special="cancel" icon="gtk-cancel" string="Cancel" />
74 <group colspan="3" col="2">78 <group colspan="3" col="2">
75 <button type="object" name="deactivate_location" icon="terp-camera_test" string="Inactivate the location" 79 <button type="object" name="deactivate_location" icon="terp-camera_test" string="Inactivate the location"
76 attrs="{'invisible': [('error', '=', True)]}" colspan="2" />80 attrs="{'invisible': [('error', '=', True), ('can_force', '=', False)]}" colspan="2" />
77 <button type="object" name="check_error" icon="gtk-execute" string="Check errors" 81 <button type="object" name="check_error" icon="gtk-execute" string="Check errors"
78 attrs="{'invisible': [('error', '=', False)]}" colspan="2" />82 attrs="{'invisible': [('error', '=', False)]}" colspan="2" />
79 </group>83 </group>
8084
=== modified file 'bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py'
--- bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py 2018-08-14 12:57:02 +0000
+++ bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py 2018-11-06 16:35:55 +0000
@@ -138,6 +138,32 @@
138 return res138 return res
139139
140140
141 def _get_location_dest_active_ok(self, cr, uid, ids, field_name, args, context=None):
142 '''
143 Returns True if there is draft moves on Picking Ticket
144 '''
145 if context is None:
146 context = {}
147 if isinstance(ids, (int,long)):
148 ids = [ids]
149
150 res = {}
151 for wiz in self.browse(cr, uid, ids, context=context):
152 res[wiz.id] = True
153 if not wiz.picking_id:
154 break
155 sys_int_moves = self.pool.get('stock.move').search(cr, uid, [
156 ('linked_incoming_move', 'in', [x.id for x in wiz.picking_id.move_lines]),
157 ('type', '=', 'internal'),
158 ], context=context)
159 for sys_move in self.pool.get('stock.move').browse(cr, uid, sys_int_moves, context=context):
160 if not sys_move.location_dest_id.active:
161 res[wiz.id] = False
162 break
163
164 return res
165
166
141 _columns = {167 _columns = {
142 'move_ids': fields.one2many(168 'move_ids': fields.one2many(
143 'stock.move.in.processor',169 'stock.move.in.processor',
@@ -198,6 +224,7 @@
198 string='Claim Description',224 string='Claim Description',
199 ),225 ),
200 'display_process_to_ship_button': fields.function(_get_display_process_to_ship_button, method=True, type='boolean', string='Process to ship'),226 'display_process_to_ship_button': fields.function(_get_display_process_to_ship_button, method=True, type='boolean', string='Process to ship'),
227 'location_dest_active_ok': fields.function(_get_location_dest_active_ok, method=True, type='boolean', string='Dest location is inactive ?', store=False),
201 }228 }
202229
203 _defaults = {230 _defaults = {
@@ -359,6 +386,9 @@
359 _("You have to enter the quantities you want to process before processing the move")386 _("You have to enter the quantities you want to process before processing the move")
360 )387 )
361388
389 if proc.direct_incoming and not proc.location_dest_active_ok:
390 self.write(cr, uid, [proc.id], {'direct_incoming': False}, context=context)
391
362 if to_unlink:392 if to_unlink:
363 in_proc_obj.unlink(cr, uid, to_unlink, context=context)393 in_proc_obj.unlink(cr, uid, to_unlink, context=context)
364394
365395
=== modified file 'bin/addons/msf_outgoing/wizard/incoming_shipment_processor_view.xml'
--- bin/addons/msf_outgoing/wizard/incoming_shipment_processor_view.xml 2018-05-29 13:24:45 +0000
+++ bin/addons/msf_outgoing/wizard/incoming_shipment_processor_view.xml 2018-11-06 16:35:55 +0000
@@ -20,6 +20,7 @@
20 </group>20 </group>
21 <field name="contains_dg" invisible="1" />21 <field name="contains_dg" invisible="1" />
22 <field name="contains_kc" invisible="1" />22 <field name="contains_kc" invisible="1" />
23 <field name="location_dest_active_ok" invisible="1"/>
23 <field name="draft" invisible="1" />24 <field name="draft" invisible="1" />
24 <group colspan="4" attrs="{'invisible': ['|', ('contains_dg', '=', True), ('contains_kc', '=', False)]}">25 <group colspan="4" attrs="{'invisible': ['|', ('contains_dg', '=', True), ('contains_kc', '=', False)]}">
25 <html>26 <html>
@@ -84,7 +85,9 @@
84 <button name="do_reset" type="object" string="Reset" attrs="{'invisible':[('draft','!=',True)]}" icon="gtk-go-forward" />85 <button name="do_reset" type="object" string="Reset" attrs="{'invisible':[('draft','!=',True)]}" icon="gtk-go-forward" />
85 <button name="do_save_draft" type="object" string="Save as draft" icon="gtk-go-forward" />86 <button name="do_save_draft" type="object" string="Save as draft" icon="gtk-go-forward" />
86 <button special="cancel" string="Cancel" icon="gtk-cancel" />87 <button special="cancel" string="Cancel" icon="gtk-cancel" />
87 <button name="do_incoming_shipment" type="object" string="Process" icon="gtk-go-forward" />88 <button name="do_incoming_shipment" type="object" string="Process" icon="gtk-go-forward" attrs="{'invisible': [('location_dest_active_ok', '!=', True)]}" />
89 <button name="do_incoming_shipment" type="object" string="Process" icon="gtk-go-forward" attrs="{'invisible': [('location_dest_active_ok', '!=', False)]}"
90 confirm="Warning the final destination location of these goods is no longer active, IN will be processed as normal but please check and process the Internal move created after manually. Continue ?" />
88 <button name="process_to_ship" attrs="{'invisible': [('display_process_to_ship_button', '!=', True)]}" type="object" string="Process to ship" icon="gtk-goto-last" />91 <button name="process_to_ship" attrs="{'invisible': [('display_process_to_ship_button', '!=', True)]}" type="object" string="Process to ship" icon="gtk-goto-last" />
89 </group>92 </group>
90 </form>93 </form>
9194
=== modified file 'bin/addons/msf_outgoing/wizard/internal_move_processor.py'
--- bin/addons/msf_outgoing/wizard/internal_move_processor.py 2018-08-10 12:46:33 +0000
+++ bin/addons/msf_outgoing/wizard/internal_move_processor.py 2018-11-06 16:35:55 +0000
@@ -131,6 +131,21 @@
131131
132 return super(internal_picking_processor, self).create(cr, uid, vals, context=context)132 return super(internal_picking_processor, self).create(cr, uid, vals, context=context)
133133
134
135 def check_destination_location(self, cr, uid, ids, context=None):
136 if context is None:
137 context = {}
138 if isinstance(ids, (int,long)):
139 ids = [ids]
140
141 for wizard in self.browse(cr, uid, ids, context=context):
142 for line in wizard.move_ids:
143 if line.move_id and not line.move_id.location_dest_id.active:
144 raise osv.except_osv(_('Error'), _('Warning, destination location is no longer active, please select an active location'))
145
146 return True
147
148
134 def do_partial(self, cr, uid, ids, context=None):149 def do_partial(self, cr, uid, ids, context=None):
135 """150 """
136 Made some integrity check on lines and run the do_incoming_shipment of stock.picking151 Made some integrity check on lines and run the do_incoming_shipment of stock.picking
@@ -163,6 +178,7 @@
163178
164 self.integrity_check_quantity(cr, uid, wizard_brw_list, context)179 self.integrity_check_quantity(cr, uid, wizard_brw_list, context)
165 self.integrity_check_prodlot(cr, uid, wizard_brw_list, context=context)180 self.integrity_check_prodlot(cr, uid, wizard_brw_list, context=context)
181 self.check_destination_location(cr, uid, ids, context=context)
166 # call stock_picking method which returns action call182 # call stock_picking method which returns action call
167 res = picking_obj.do_partial(cr, uid, ids, context=context)183 res = picking_obj.do_partial(cr, uid, ids, context=context)
168 return self.return_hook_do_partial(cr, uid, ids, context=context, res=res)184 return self.return_hook_do_partial(cr, uid, ids, context=context, res=res)
169185
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2018-10-30 10:56:14 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-11-06 16:35:55 +0000
@@ -101868,11 +101868,59 @@
101868msgid " goods products, please refer to the appropriate procedures"101868msgid " goods products, please refer to the appropriate procedures"
101869msgstr " veuillez vous référer aux procédures adéquates."101869msgstr " veuillez vous référer aux procédures adéquates."
101870101870
101871<<<<<<< TREE
101871#. module: specific_rules101872#. module: specific_rules
101872#: view:export.report.stock.inventory:0101873#: view:export.report.stock.inventory:0
101873msgid "Generate report (product list)"101874msgid "Generate report (product list)"
101874msgstr "Générer le rapport (liste de produits)"101875msgstr "Générer le rapport (liste de produits)"
101875101876
101877=======
101878#. module: msf_outgoing
101879#: view:stock.incoming.processor:0
101880msgid "Warning the final destination location of these goods is no longer active, IN will be processed as normal but please check and process the Internal move created after manually."
101881msgstr "Attention la location de stock finale pour ces biens n'est plus active, le IN va être executé normalement mais merci de vérifier et d'executer les mouvements internes résultants manuellement."
101882
101883#. module: msf_outgoing
101884#: code:addons/msf_outgoing/wizard/internal_move_processor.py:144
101885#, python-format
101886msgid "Warning, destination location is no longer active, please select an active location"
101887msgstr "Attention, la location de stock finale n'est plus active, merci de selectionner une location active"
101888
101889#. module: stock
101890#: code:addons/stock/stock.py:493
101891#, python-format
101892msgid "You cannot deactivate location %s because of the following products currently in stock:\n"
101893" %s %s"
101894msgstr "Vous ne pouvez pas desactiver la location %s car elle contient les produits suivants en stock:\n"
101895" %s %s"
101896
101897#. module: stock
101898#: code:addons/stock/stock.py:496
101899#, python-format
101900msgid "\n"
101901"... and %s more"
101902msgstr "\n"
101903"... et %s en plus"
101904
101905#. module: stock
101906#: code:addons/stock/stock.py:525
101907#, python-format
101908msgid "The location %s has open OUT stock moves:\n"
101909""
101910msgstr "La location %s a des mouvements de stock sortant ouverts:\n"
101911""
101912
101913#. module: stock
101914#: view:stock.location.confirm.deactivation:0
101915msgid "There are open documents relating to this location or stock movements into this location, would you like to deactivation it anyway ?"
101916msgstr "Des documents sont ouverts pour cette location ou il y a des mouvements de stock vers cette location, êtes-vous sûr de vouloir la désactiver ?"
101917
101918#. module: stock
101919#: view:stock.location.confirm.deactivation:0
101920msgid "Deactivate location"
101921msgstr "Désactiver la location"
101922
101923>>>>>>> MERGE-SOURCE
101876#. module: account_override101924#. module: account_override
101877#: code:addons/account_override/account.py:517101925#: code:addons/account_override/account.py:517
101878#, python-format101926#, python-format
@@ -101958,6 +102006,7 @@
101958#: field:account.commitment.line,commit_number:0102006#: field:account.commitment.line,commit_number:0
101959msgid "Commitment Voucher Number"102007msgid "Commitment Voucher Number"
101960msgstr "Numéro du Bon d'Engagement"102008msgstr "Numéro du Bon d'Engagement"
102009<<<<<<< TREE
101961102010
101962#. module: account_mcdb102011#. module: account_mcdb
101963#: code:addons/account_mcdb/account_mcdb.py:1494102012#: code:addons/account_mcdb/account_mcdb.py:1494
@@ -102085,3 +102134,92 @@
102085#, python-format102134#, python-format
102086msgid "%s months"102135msgid "%s months"
102087msgstr "%s mois"102136msgstr "%s mois"
102137=======
102138
102139#. module: msf_config_locations
102140#: code:addons/msf_config_locations/stock_configuration.py:641
102141#, python-format
102142msgid "* You have at least one move to the location '%s' which is not 'Done'.\n"
102143"Please click on the 'See moves' button to see which moves are still in progress to this location."
102144msgstr "* Il y a au moins un mouvement de stock dans l'emplacement '%s' qui n'est pas clos.\n"
102145"Merci de cliquer sur le bouton 'Voir les mouvements' pour voir les mouvements non clos."
102146
102147#. module: msf_config_locations
102148#: code:addons/msf_config_locations/stock_configuration.py:652
102149#, python-format
102150msgid "* You have at least one move from or to the location '%s' which is not 'Done'.\n"
102151"Please click on the 'See moves' button to see which moves are still in progress from/to this location."
102152msgstr "* Il y a au moins un mouvement de stock dans l'emplacement '%s' qui n'est pas clos.\n"
102153"Merci de cliquer sur le bouton 'Voir les mouvements' pour voir les mouvements non clos."
102154
102155#. module: msf_config_locations
102156#: code:addons/msf_config_locations/stock_configuration.py:660
102157#, python-format
102158msgid "* The location '%s' is not empty of products.\n"
102159"Please click on the 'Products in location' button to see which products are still in the location."
102160msgstr "* L'emplacement '%s' n'est pas vide.\n"
102161"Merci de cliquer sur le bouton 'Produits dans l'emplacement' pour voir les produits contenus dans cet emplacement."
102162
102163#. module: msf_config_locations
102164#: code:addons/msf_config_locations/stock_configuration.py:667
102165#, python-format
102166msgid "* The location '%s' has children locations.\n"
102167"Please remove all children locations before remove it.\n"
102168"Please click on the 'Children locations' button to see all children locations."
102169msgstr "* L'emplacement '%s' a des emplacements enfants\n"
102170"Merci de d'abord supprimer ces emplacements enfants.\n"
102171"Merci de cliquer sur le bouton 'Emplacements enfants' pour voir les emplacements enfants."
102172
102173#. module: msf_config_locations
102174#: code:addons/msf_config_locations/stock_configuration.py:679
102175#, python-format
102176msgid "* Warning there are open IR with location '%s'.\n"
102177" Please click on the 'See documents' button to see all children locations.\n"
102178"\n"
102179""
102180msgstr "* Attention, il y a des demandes internes en cours pour l'emplacement '%s'.\n"
102181"Merci de cliquer sur le bouton 'Voir les doucements' pour voir les emplacements enfants.\n"
102182"\n"
102183""
102184
102185#. module: msf_config_locations
102186#: code:addons/msf_config_locations/stock_configuration.py:683
102187#, python-format
102188msgid "You have a problem with this location − Please see the message in the form for more information."
102189msgstr "Il y a un problème avec cet emplacement de stock - Merci de lire le message dans le formulaire pour plus d'informations"
102190
102191#. module: msf_config_locations
102192#: code:addons/msf_config_locations/stock_configuration.py:682
102193#, python-format
102194msgid "Be careful !"
102195msgstr "Attention !"
102196
102197#. module: msf_config_locations
102198#: view:stock.remove.location.wizard:0
102199msgid "See moves"
102200msgstr "Voir les mouvements"
102201
102202#. module: msf_config_locations
102203#: view:stock.remove.location.wizard:0
102204msgid "Products in location"
102205msgstr "Produits dans l'emplacement"
102206
102207#. module: msf_config_locations
102208#: view:stock.remove.location.wizard:0
102209msgid "Children locations"
102210msgstr "Emplacements enfants"
102211
102212#. module: msf_config_locations
102213#: view:stock.remove.location.wizard:0
102214msgid "See documents"
102215msgstr "Voir les documents"
102216
102217#. module: msf_config_locations
102218#: view:stock.remove.location.wizard:0
102219msgid "Inactivate the location"
102220msgstr "Desactiver l'emplacement"
102221
102222#. module: msf_config_locations
102223#: view:stock.remove.location.wizard:0
102224msgid "Check errors"
102225msgstr "Tester les erreurs">>>>>>> MERGE-SOURCE
102088102226
=== modified file 'bin/addons/stock/__openerp__.py'
--- bin/addons/stock/__openerp__.py 2018-06-28 11:55:57 +0000
+++ bin/addons/stock/__openerp__.py 2018-11-06 16:35:55 +0000
@@ -60,6 +60,7 @@
60 "wizard/stock_inventory_line_split_view.xml",60 "wizard/stock_inventory_line_split_view.xml",
61 "wizard/stock_change_standard_price_view.xml",61 "wizard/stock_change_standard_price_view.xml",
62 'wizard/stock_return_picking_view.xml',62 'wizard/stock_return_picking_view.xml',
63 'wizard/stock_location_confirm_deactivation.xml',
63 "stock_workflow.xml",64 "stock_workflow.xml",
64 "stock_incoterms.xml",65 "stock_incoterms.xml",
65 "stock_view.xml",66 "stock_view.xml",
6667
=== modified file 'bin/addons/stock/stock.py'
--- bin/addons/stock/stock.py 2018-09-17 16:16:37 +0000
+++ bin/addons/stock/stock.py 2018-11-06 16:35:55 +0000
@@ -455,6 +455,8 @@
455455
456 return False456 return False
457457
458
459
458stock_location()460stock_location()
459461
460462
@@ -612,6 +614,27 @@
612 new_id = super(stock_picking, self).create(cr, user, vals, context)614 new_id = super(stock_picking, self).create(cr, user, vals, context)
613 return new_id615 return new_id
614616
617
618 def _get_location_dest_active_ok(self, cr, uid, ids, field_name, args, context=None):
619 '''
620 Returns True if there is draft moves on Picking Ticket
621 '''
622 if context is None:
623 context = {}
624 if isinstance(ids, (int,long)):
625 ids = [ids]
626
627 res = {}
628 for pick in self.browse(cr, uid, ids, fields_to_fetch=['move_lines'], context=context):
629 res[pick.id] = True
630 for int_move in self.pool.get('stock.move').browse(cr, uid, [x.id for x in pick.move_lines], fields_to_fetch=['location_dest_id'], context=context):
631 if not int_move.location_dest_id.active:
632 res[pick.id] = False
633 break
634
635 return res
636
637
615 _columns = {638 _columns = {
616 'name': fields.char('Reference', size=64, select=True),639 'name': fields.char('Reference', size=64, select=True),
617 'origin': fields.char('Origin', size=512, help="Reference of the document that produced this picking.", select=True),640 'origin': fields.char('Origin', size=512, help="Reference of the document that produced this picking.", select=True),
@@ -657,6 +680,7 @@
657 'claim': fields.boolean('Claim'),680 'claim': fields.boolean('Claim'),
658 'claim_name': fields.char(string='Claim name', size=512),681 'claim_name': fields.char(string='Claim name', size=512),
659 'physical_reception_date': fields.datetime('Physical Reception Date', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),682 'physical_reception_date': fields.datetime('Physical Reception Date', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
683 'location_dest_active_ok': fields.function(_get_location_dest_active_ok, method=True, type='boolean', string='Dest location is inactive ?', store=False),
660 }684 }
661 _defaults = {685 _defaults = {
662 'name': lambda self, cr, uid, context: '/',686 'name': lambda self, cr, uid, context: '/',
663687
=== modified file 'bin/addons/stock/stock_view.xml'
--- bin/addons/stock/stock_view.xml 2018-09-17 16:16:37 +0000
+++ bin/addons/stock/stock_view.xml 2018-11-06 16:35:55 +0000
@@ -510,7 +510,7 @@
510 <field name="company_id" groups="base.group_multi_company" widget="selection" colspan="4"/>510 <field name="company_id" groups="base.group_multi_company" widget="selection" colspan="4"/>
511 <field name="icon" groups="base.group_extended" colspan="4"/>511 <field name="icon" groups="base.group_extended" colspan="4"/>
512 <field name="scrap_location" groups="base.group_extended"/>512 <field name="scrap_location" groups="base.group_extended"/>
513 <field name="active" groups="base.group_extended"/>513 <field name="active" groups="base.group_extended" readonly="1" />
514 </group>514 </group>
515 <group col="2" colspan="2" groups="base.group_extended">515 <group col="2" colspan="2" groups="base.group_extended">
516 <separator string="Chained Locations" colspan="2"/>516 <separator string="Chained Locations" colspan="2"/>
517517
=== modified file 'bin/addons/stock/wizard/__init__.py'
--- bin/addons/stock/wizard/__init__.py 2018-06-28 11:55:57 +0000
+++ bin/addons/stock/wizard/__init__.py 2018-11-06 16:35:55 +0000
@@ -38,5 +38,6 @@
38import physical_inventory_generate_counting_sheet38import physical_inventory_generate_counting_sheet
39import physical_inventory_import39import physical_inventory_import
40import manage_expired_stock40import manage_expired_stock
41import stock_location_confirm_deactivation
41# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4243
4344
=== added file 'bin/addons/stock/wizard/stock_location_confirm_deactivation.py'
--- bin/addons/stock/wizard/stock_location_confirm_deactivation.py 1970-01-01 00:00:00 +0000
+++ bin/addons/stock/wizard/stock_location_confirm_deactivation.py 2018-11-06 16:35:55 +0000
@@ -0,0 +1,55 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import osv, fields
23
24class stock_location_confirm_deactivation(osv.osv_memory):
25 _name = 'stock.location.confirm.deactivation'
26
27 _columns = {
28 'location_id': fields.many2one('stock.location', string='Stock location to deactive'),
29 'message': fields.text('Message'),
30 }
31
32 def confirm_deactivation(self, cr, uid, ids, context=None):
33 if context is None:
34 context = {}
35 if isinstance(ids, (int, long)):
36 ids = [ids]
37
38 for wiz in self.browse(cr, uid, ids, context=context):
39 self.pool.get('stock.location').write(cr, uid, [wiz.location_id.id], {'active': False}, context=context)
40
41 return {'type': 'ir.actions.act_window_close'}
42
43
44 def close_wizard(self, cr, uid, ids, context=None):
45 '''
46 Just close the wizard
47 '''
48 if context is None:
49 context = {}
50 if isinstance(ids, (int,long)):
51 ids = [ids]
52 return {'type': 'ir.actions.act_window_close'}
53
54
55stock_location_confirm_deactivation()
056
=== added file 'bin/addons/stock/wizard/stock_location_confirm_deactivation.xml'
--- bin/addons/stock/wizard/stock_location_confirm_deactivation.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/stock/wizard/stock_location_confirm_deactivation.xml 2018-11-06 16:35:55 +0000
@@ -0,0 +1,25 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record id="stock_location_confirm_deactivation_form_view" model="ir.ui.view">
5 <field name="name">Confirm location deactivation</field>
6 <field name="model">stock.location.confirm.deactivation</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">
9 <form string="Confirm location deactivation">
10 <group colspan="4" col="1">
11 <html>
12 <h3 style="text-align: center; margin: 13px"><translate>There are open documents relating to this location or stock movements into this location, would you like to deactivation it anyway ?</translate></h3>
13 </html>
14 <field name="message" nolabel="1" readonly="1" />
15 </group>
16 <newline />
17 <separator string="Actions" />
18 <button name="confirm_deactivation" string="Deactivate location" type="object" icon="terp-camera_test" colspan="2" />
19 <button name="close_wizard" string="Close the wizard" type="object" icon="gtk-close" colspan="2" />
20 </form>
21 </field>
22 </record>
23 </data>
24</openerp>
25
026
=== modified file 'bin/addons/stock_override/stock_view.xml'
--- bin/addons/stock_override/stock_view.xml 2018-10-25 14:44:55 +0000
+++ bin/addons/stock_override/stock_view.xml 2018-11-06 16:35:55 +0000
@@ -342,7 +342,7 @@
342 on_change="onchange_move()"342 on_change="onchange_move()"
343 attrs="{'readonly': [('from_manage_expired', '=', True)]}"343 attrs="{'readonly': [('from_manage_expired', '=', True)]}"
344 >344 >
345 <tree colors="grey:scrapped == True; red: inactive_product or to_correct_ok or expired_lot" string="Stock Moves" noteditable="fake_state=='assigned' or linked_incoming_move != False" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">345 <tree colors="grey:scrapped == True; red: inactive_product or to_correct_ok or expired_lot" string="Stock Moves" noteditable="linked_incoming_move != False" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')">
346 <field name="line_number"/>346 <field name="line_number"/>
347 <field name="product_id" />347 <field name="product_id" />
348 <field name="comment" />348 <field name="comment" />

Subscribers

People subscribed via source and target branches