Merge lp:~jfb-tempo-consulting/unifield-server/us-5912 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5436
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/us-5912
Merge into: lp:unifield-server
Diff against target: 96 lines (+50/-3) (has conflicts)
3 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+14/-0)
bin/addons/msf_supply_doc_export/wizard/po_follow_up.py (+18/-2)
bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py (+18/-1)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/us-5912
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+370755@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
1=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
2--- bin/addons/msf_profile/i18n/fr_MF.po 2019-07-26 15:23:04 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2019-07-30 10:04:55 +0000
4@@ -107371,6 +107371,7 @@
5 msgid "Stop report"
6 msgstr "Arrêter le rapport"
7
8+<<<<<<< TREE
9 #. module: stock
10 #: code:addons/stock/stock.py:1780
11 #, python-format
12@@ -107481,3 +107482,16 @@
13 #: report:addons/sale/report/sale_loan_stock_moves_report_xls.mako:175
14 msgid "Line State"
15 msgstr "État de la Ligne"
16+=======
17+#. module: sales_followup
18+#: code:sales_followup/wizard/sale_followup_multi_wizard.py:190
19+#, python-format
20+msgid "The requested report is too heavy to generate: requested %d lines, maximum allowed %d. Please apply further filters so that report can be generated."
21+msgstr "Le rapport demandé est trop volumineux pour être généré, %d lignes demandées, %d autorisées. Veuillez utiliser plus de filtres pour que ce rapport puisse être généré"
22+
23+#. module: msf_supply_doc_export
24+#: code:addons/msf_supply_doc_export/wizard/po_follow_up.py:297
25+#, python-format
26+msgid "The requested report is too heavy to generate. Please apply further filters so that report can be generated."
27+msgstr "Le rapport demandé est trop volumineux pour être généré. Veuillez utiliser plus de filtres pour que ce rapport puisse être généré"
28+>>>>>>> MERGE-SOURCE
29
30=== modified file 'bin/addons/msf_supply_doc_export/wizard/po_follow_up.py'
31--- bin/addons/msf_supply_doc_export/wizard/po_follow_up.py 2019-07-22 12:08:20 +0000
32+++ bin/addons/msf_supply_doc_export/wizard/po_follow_up.py 2019-07-30 10:04:55 +0000
33@@ -298,8 +298,24 @@
34 po_ids = po_obj.search(cr, uid, domain)
35
36 if not po_ids:
37- raise osv.except_osv(_('Error'), _('No Purchase Orders match the specified criteria.'))
38- return True
39+ raise osv.except_osv(_('Warning'), _('No Purchase Orders match the specified criteria.'))
40+
41+ cr.execute("""SELECT COUNT(id) FROM purchase_order_line WHERE order_id IN %s""", (tuple(po_ids),))
42+ nb_lines = 0
43+ for x in cr.fetchall():
44+ nb_lines = x[0]
45+
46+ # Parameter to define the maximum number of lines. For a custom number:
47+ # "INSERT INTO ir_config_parameter (key, value) VALUES ('FOLLOWUP_MAX_LINE', 'chosen_number');"
48+ # Or update the existing one
49+ config_line = self.pool.get('ir.config_parameter').get_param(cr, 1, 'FOLLOWUP_MAX_LINE')
50+ if config_line:
51+ max_line = int(config_line)
52+ else:
53+ max_line = 20000
54+
55+ if nb_lines > max_line:
56+ raise osv.except_osv(_('Error'), _('The requested report is too heavy to generate. Please apply further filters so that report can be generated.'))
57
58 if wiz.pending_only_ok and report_name == 'po.follow.up_rml':
59 filtered_po_ids = []
60
61=== modified file 'bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py'
62--- bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py 2018-04-05 08:43:22 +0000
63+++ bin/addons/sales_followup/wizard/sale_followup_multi_wizard.py 2019-07-30 10:04:55 +0000
64@@ -178,6 +178,23 @@
65 _('No data found with these parameters'),
66 )
67
68+ cr.execute("""SELECT COUNT(id) FROM sale_order_line WHERE order_id IN %s""", (tuple(fo_ids),))
69+ nb_lines = 0
70+ for x in cr.fetchall():
71+ nb_lines = x[0]
72+
73+ # Parameter to define the maximum number of lines. For a custom number:
74+ # "INSERT INTO ir_config_parameter (key, value) VALUES ('FOLLOWUP_MAX_LINE', 'chosen_number');"
75+ # Or update the existing one
76+ config_line = self.pool.get('ir.config_parameter').get_param(cr, 1, 'FO_FOLLOWUP_MAX_LINE')
77+ if config_line:
78+ max_line = int(config_line)
79+ else:
80+ max_line = 5000
81+
82+ if nb_lines > max_line:
83+ raise osv.except_osv(_('Error'), _('The requested report is too heavy to generate: requested %d lines, maximum allowed %d. Please apply further filters so that report can be generated.') % (nb_lines, max_line))
84+
85 self.write(cr, uid, [wizard.id], {'order_ids': fo_ids}, context=context)
86
87 return True
88@@ -228,7 +245,7 @@
89 'report_name': 'sales.follow.up.multi.report_pdf',
90 }, context=context)
91 context['background_id'] = background_id
92- context['background_time'] = 20
93+ context['background_time'] = 3
94
95 data = {'ids': ids, 'context': context}
96 return {

Subscribers

People subscribed via source and target branches