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

Proposed by jftempo
Status: Merged
Merged at revision: 4020
Proposed branch: lp:~unifield-team/unifield-server/us-1559
Merge into: lp:unifield-server
Diff against target: 187 lines (+94/-0) (has conflicts)
5 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+30/-0)
bin/addons/procurement_request/procurement_request.py (+10/-0)
bin/addons/purchase_override/purchase.py (+27/-0)
bin/addons/sale_override/sale.py (+13/-0)
bin/addons/sourcing/sale_order_line.py (+14/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-1559
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+309205@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
1=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
2--- bin/addons/msf_profile/i18n/fr_MF.po 2016-10-21 15:36:56 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2016-10-25 08:45:55 +0000
4@@ -74611,6 +74611,7 @@
5 " Number of columns is not equal to %s"
6 msgstr "\n"
7 " Le nombre de colonnes n'est pas égal à %s"
8+<<<<<<< TREE
9
10 #. module: specific_rules
11 #: report:addons/specific_rules/report/report_stock_inventory_all_locations_xls.mako:143
12@@ -74683,3 +74684,32 @@
13 msgid "You can't search on this object without using at least one exact search term (precede your search with the character '=')."
14 msgstr "Vous ne pouvez pas exécuter de recherche sur cet objet sans utiliser au moins une recherche exacte (ajoutez le caractère = devant votre filtre)."
15
16+=======
17+
18+#. module: procurement_request
19+#: code:addons/procurement_request/procurement_request.py:553
20+#, python-format
21+msgid "You can not confirm internal request containing temporary product (line: %s)"
22+msgstr "Vous ne pouvez pas confirmer une demande interne qui contient des produits Temporaires (ligne : %s)"
23+
24+#. module: sourcing
25+#: code:addons/sourcing/sale_order_line.py:1205
26+#, python-format
27+msgid "You can not source lines with Temporary products. Details: \n"
28+" %s"
29+msgstr "Vous ne pouvez pas sourcer des lignes avec des produits temporaires. Détails : \n"
30+" %s"
31+
32+#. module: sale_override
33+#: code:addons/sale_override/sale.py:1347
34+#, python-format
35+msgid "You cannot confirm field order containing temporary product (line: %s)"
36+msgstr "Vous ne pouvez pas confirmer une commande terrain qui contient des produits temporaires (ligne : %s)"
37+
38+#. module: purchase_override
39+#: code:addons/purchase_override/purchase.py:1122
40+#: code:addons/purchase_override/purchase.py:1365
41+#, python-format
42+msgid "You cannot confirm purchase order containing temporary product (line: %s)"
43+msgstr "Vous ne pouvez pas confirmer un bon de commande qui contient des produits Temporaires (ligne : %s)"
44+>>>>>>> MERGE-SOURCE
45
46=== modified file 'bin/addons/procurement_request/procurement_request.py'
47--- bin/addons/procurement_request/procurement_request.py 2016-08-18 08:32:03 +0000
48+++ bin/addons/procurement_request/procurement_request.py 2016-10-25 08:45:55 +0000
49@@ -542,6 +542,16 @@
50 nb_lines += 1
51 if line.product_uom_qty <= 0.00:
52 raise osv.except_osv(_('Error'), _('A line must a have a quantity larger than 0.00'))
53+
54+ # 5/ Check if there is a temporary product in the sale order :
55+ temp_prod_ids = self.pool.get('product.product').search(cr, uid, [('international_status', '=', 5)], context=context)
56+ line_with_temp_ids = line_obj.search(cr, uid, [('order_id', '=', req.id), ('product_id', 'in', temp_prod_ids)], context=context)
57+ line_err = ' / '.join([str(line.line_number) for l in line_obj.browse(cr, uid, line_with_temp_ids, context=context)])
58+ if line_with_temp_ids:
59+ raise osv.except_osv(
60+ _("Warning"),
61+ _("You can not confirm internal request containing temporary product (line: %s)") % line_err,
62+ )
63 if nb_lines:
64 raise osv.except_osv(_('Error'), _('Please check the lines : you cannot have "To Be confirmed" for Nomenclature Level". You have %s lines to correct !') % nb_lines)
65 self.log(cr, uid, req.id, _("The internal request '%s' has been validated (nb lines: %s).") % (req.name, len(req.order_line)), context=context)
66
67=== modified file 'bin/addons/purchase_override/purchase.py'
68--- bin/addons/purchase_override/purchase.py 2016-10-16 10:55:55 +0000
69+++ bin/addons/purchase_override/purchase.py 2016-10-25 08:45:55 +0000
70@@ -1087,6 +1087,7 @@
71 '''
72 # Objects
73 po_line_obj = self.pool.get('purchase.order.line')
74+ product_obj = self.pool.get('product.product')
75
76 if context is None:
77 context = {}
78@@ -1110,6 +1111,18 @@
79 errors = ' / '.join(str(x) for x in line_error)
80 raise osv.except_osv(_('Error !'), _('You cannot have a purchase order line with a 0.00 Unit Price or 0.00 Subtotal. Lines in exception : %s') % errors)
81
82+ # Check if there is a temporary product in the purchase order :
83+ temp_prod_ids = product_obj.search(cr, uid, [('international_status', '=', 5)], context=context)
84+ line_with_temp_ids = po_line_obj.search(cr, uid, [('order_id', '=', po.id), ('product_id', 'in', temp_prod_ids)], context=context)
85+ line_err = " / ".join([str(l.line_number) for l in po_line_obj.browse(cr, uid, line_with_temp_ids, context=context)])
86+
87+ if line_with_temp_ids:
88+ raise osv.except_osv(
89+ _("Warning"),
90+ _("You cannot confirm purchase order containing temporary product (line: %s)") % line_err,
91+ )
92+
93+
94 # Check if the pricelist of the order is good according to currency of the partner
95 pricelist_ids = self.pool.get('product.pricelist').search(cr, uid,
96 [('in_search', '=', po.partner_id.partner_type)],
97@@ -1337,6 +1350,20 @@
98 sol_obj = self.pool.get('sale.order.line')
99 exp_sol_obj = self.pool.get('expected.sale.order.line')
100 so_obj = self.pool.get('sale.order')
101+ product_obj = self.pool.get('product.product')
102+ po_line_obj = self.pool.get('purchase.order.line')
103+
104+ # Check if there is a temporary product in the purchase order :
105+ for po in self.browse(cr, uid, ids, context=context):
106+ temp_prod_ids = product_obj.search(cr, uid, [('international_status', '=', 5)], context=context)
107+ line_with_temp_ids = po_line_obj.search(cr, uid, [('order_id', '=', po.id), ('product_id', 'in', temp_prod_ids)], context=context)
108+ line_err = " / ".join([str(l.line_number) for l in po_line_obj.browse(cr, uid, line_with_temp_ids, context=context)])
109+
110+ if line_with_temp_ids:
111+ raise osv.except_osv(
112+ _("Warning"),
113+ _("You cannot confirm purchase order containing temporary product (line: %s)") % line_err,
114+ )
115
116 # Create extra lines on the linked FO/IR
117 self.create_extra_lines_on_fo(cr, uid, ids, context=context)
118
119=== modified file 'bin/addons/sale_override/sale.py'
120--- bin/addons/sale_override/sale.py 2016-08-22 13:55:25 +0000
121+++ bin/addons/sale_override/sale.py 2016-10-25 08:45:55 +0000
122@@ -1266,6 +1266,7 @@
123 3/ Check of line procurement method in case of loan FO
124 4/ Check if the currency of the order is compatible with
125 the currency of the partner
126+ 5/ Check if there is temporary products
127
128 :param cr: Cursor to the database
129 :param uid: ID of the user that runs the method
130@@ -1278,6 +1279,7 @@
131 # Objects
132 line_obj = self.pool.get('sale.order.line')
133 pricelist_obj = self.pool.get('product.pricelist')
134+ product_obj = self.pool.get('product.product')
135
136 if context is None:
137 context = {}
138@@ -1335,6 +1337,17 @@
139 'Please change the currency to choose a compatible currency.'),
140 )
141
142+ # 5/ Check if there is a temporary product in the sale order :
143+ temp_prod_ids = product_obj.search(cr, uid, [('international_status', '=', 5)], context=context)
144+ line_with_temp_ids = line_obj.search(cr, uid, [('order_id', '=', order.id), ('product_id', 'in', temp_prod_ids)], context=context)
145+ line_err = ' / '.join([str(line.line_number) for l in line_obj.browse(cr, uid, line_with_temp_ids, context=context)])
146+ if line_with_temp_ids:
147+ raise osv.except_osv(
148+ _("Warning"),
149+ _("You cannot confirm field order containing temporary product (line: %s)") % line_err,
150+ )
151+
152+
153 if not order.procurement_request and order.split_type_sale_order == 'original_sale_order':
154 line_obj.update_supplier_on_line(cr, uid, line_ids, context=context)
155
156
157=== modified file 'bin/addons/sourcing/sale_order_line.py'
158--- bin/addons/sourcing/sale_order_line.py 2016-09-13 13:22:03 +0000
159+++ bin/addons/sourcing/sale_order_line.py 2016-10-25 08:45:55 +0000
160@@ -1203,6 +1203,8 @@
161 # Objects
162 order_obj = self.pool.get('sale.order')
163 po_auto_obj = self.pool.get('po.automation.config')
164+ data_obj = self.pool.get('ir.model.data')
165+ product_obj = self.pool.get('product.product')
166
167 if context is None:
168 context = {}
169@@ -1223,6 +1225,18 @@
170 Please select it within the lines of the associated Field Order (through the "Field Orders" menu).
171 """))
172
173+ temp_status = data_obj.get_object_reference(cr, uid, 'product_attributes', 'int_5')[1]
174+ temp_products = product_obj.search(cr, uid, [('international_status', '=', temp_status)], context=context)
175+ if temp_products:
176+ # checking for temporary products :
177+ line_ids = self.search(cr, uid, [('id', 'in', ids), ('product_id', 'in', temp_products),], context=context)
178+ err_msg = []
179+ for l in self.browse(cr, uid, line_ids, context=context):
180+ err_msg.append(_('Line %s of the order %s') % (l.line_number, l.order_id.name))
181+
182+ if err_msg:
183+ raise osv.except_osv(_('Warning'), _("You can not source lines with Temporary products. Details: \n %s") % '\n'.join(msg for msg in err_msg))
184+
185 loan_stock = self.search(cr, uid, [
186 ('id', 'in', ids),
187 ('type', '=', 'make_to_order'),

Subscribers

People subscribed via source and target branches

to all changes: