Merge lp:~mukunde/unifield-server/US-11005 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~mukunde/unifield-server/US-11005
Merge into: lp:unifield-server
Diff against target: 105 lines (+29/-1) (has conflicts)
4 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+12/-0)
bin/addons/purchase/purchase_order.py (+8/-0)
bin/addons/purchase/purchase_workflow.py (+0/-1)
bin/addons/sale/sale_order.py (+9/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-11005
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+436945@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

6392. By Gaël Mukunde

US-11005 [IMP] Code fix to prevent also creation of draft PO/FO

6391. By Gaël Mukunde

US-11005 [IMP] Translation

6390. By Gaël Mukunde

US-11005 [IMP] Prevent FO / PO creation if 'Cost center picked for PO/FO reference' is empty

6389. By jftempo

US-11042 [FIX] Sync server: acl on signature.image

6388. By jftempo

US-9724 [FIX] Analytic Account inactive: do not change the term in the error msg

6387. By jftempo

 US-6710 [IMP] Tools/Import-Export: new CC import to link new CC to prop. instances

 lp:~jfb-tempo-consulting/unifield-server/US-6710

6386. By jftempo

US-10353 [IMP] Selectors (G/L and Combined): new option to exclude inactive journals

lp:~jfb-tempo-consulting/unifield-server/US-10353

6385. By jftempo

US-10725 [IMP] Advance return wizard: third party type and required must depend on account
  copy transfer journal from wizard to the new register line

lp:~mukunde/unifield-server/US-10725

6384. By jftempo

US-7955 [IMP] Invoice line: remove spaces in description, if the result is empty raise an error if not from workflow

lp:~jfb-tempo-consulting/unifield-server/US-7955

6383. By jftempo

US-9724 [FIX] AD error message: display the entry sequence or "FXA" if linked to FXA journal

lp:~jfb-tempo-consulting/unifield-server/US-9724

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 2023-02-06 10:44:22 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2023-02-07 11:28:16 +0000
4@@ -118120,6 +118120,7 @@
5
6 #. module: purchase
7 #: code:addons/purchase/purchase_order.py:2063
8+#: code:addons/purchase/purchase_order.py:2070
9 #, python-format
10 msgid "%s: You can not select this Order Type manually"
11 msgstr "%s: Vous ne pouvez pas sélectionner ce Type de Commande manuellement"
12@@ -118127,6 +118128,7 @@
13 #. modules: purchase, msf_custom_settings
14 #: code:addons/msf_custom_settings/sale.py:42
15 #: code:addons/purchase/purchase_order.py:2107
16+#: code:addons/purchase/purchase_order.py:2114
17 #, python-format
18 msgid "You can not select this Order Type manually"
19 msgstr "Vous ne pouvez pas sélectionner ce Type de Commande manuellement"
20@@ -118188,6 +118190,7 @@
21 #: field:account.mcdb,inactive_at:0
22 msgid "Journals Inactive at"
23 msgstr "Journaux inactifs le"
24+<<<<<<< TREE
25
26 #. module: purchase
27 #: view:purchase.order:0
28@@ -118211,3 +118214,12 @@
29 msgid "You cannot re-sync a line more than 2 times"
30 msgstr "Vous ne pouvez pas faire plus de 2 re-sync"
31
32+=======
33+
34+#. modules: purchase, sale
35+#: code:addons/purchase/purchase_workflow.py:964
36+#: code:addons/sale/sale_workflow.py:885
37+#, python-format
38+msgid "Add the cost center picked for PO/FO reference"
39+msgstr "Rajouter le centre de coût utilisé pour la reference PO/FO"
40+>>>>>>> MERGE-SOURCE
41
42=== modified file 'bin/addons/purchase/purchase_order.py'
43--- bin/addons/purchase/purchase_order.py 2023-01-17 15:21:33 +0000
44+++ bin/addons/purchase/purchase_order.py 2023-02-07 11:28:16 +0000
45@@ -1130,6 +1130,10 @@
46 partner = self.pool.get('res.partner').browse(cr, uid, vals['partner_id'], fields_to_fetch=['property_product_pricelist_purchase', 'partner_type'], context=context)
47 if partner.partner_type in ('internal', 'intermission', 'section'):
48 vals['pricelist_id'] = partner.property_product_pricelist_purchase.id
49+ if 'partner_id' in vals and vals.get('partner_id', False):
50+ # US-11005
51+ if not self.pool.get('res.partner').browse(cr, uid, vals['partner_id'], context=context).company_id.instance_id.po_fo_cost_center_id:
52+ raise osv.except_osv(_('Warning !'), _('Add the cost center picked for PO/FO reference'))
53
54 # common function for so and po
55 vals = common_create(self, cr, uid, vals, type=get_type(self), context=context)
56@@ -1234,6 +1238,10 @@
57
58 pol_obj = self.pool.get('purchase.order.line')
59
60+ # US-11005
61+ if not self.browse(cr, uid, ids[0], context=context).company_id.instance_id.po_fo_cost_center_id:
62+ raise osv.except_osv(_('Warning !'), _('Add the cost center picked for PO/FO reference'))
63+
64 if not 'date_order' in vals:
65 vals.update({'date_order': self.browse(cr, uid, ids[0]).date_order})
66
67
68=== modified file 'bin/addons/purchase/purchase_workflow.py'
69--- bin/addons/purchase/purchase_workflow.py 2023-02-06 10:44:22 +0000
70+++ bin/addons/purchase/purchase_workflow.py 2023-02-07 11:28:16 +0000
71@@ -960,7 +960,6 @@
72 context = {}
73 if isinstance(ids, (int, long)):
74 ids = [ids]
75-
76 po = self.browse(cr, uid, ids[0], fields_to_fetch=['order_line'], context=context)
77 return self.pool.get('purchase.order.line').validated(cr, uid, [pol.id for pol in po.order_line], context=context)
78
79
80=== modified file 'bin/addons/sale/sale_order.py'
81--- bin/addons/sale/sale_order.py 2023-02-06 10:44:22 +0000
82+++ bin/addons/sale/sale_order.py 2023-02-07 11:28:16 +0000
83@@ -942,6 +942,10 @@
84 if not obj['procurement_request']:
85 self._check_own_company(cr, uid, vals['partner_id'], context=context)
86
87+ # US-11005
88+ if not self.browse(cr, uid, ids[0], context=context).company_id.instance_id.po_fo_cost_center_id:
89+ raise osv.except_osv(_('Warning !'), _('Add the cost center picked for PO/FO reference'))
90+
91 if 'partner_id' in vals:
92 partner = self.pool.get('res.partner').browse(cr, uid, vals['partner_id'], fields_to_fetch=['property_product_pricelist', 'partner_type'], context=context)
93 if partner.partner_type in ('internal', 'intermission', 'section'):
94@@ -977,6 +981,11 @@
95 if 'partner_id' in vals and not context.get('procurement_request') and not vals.get('procurement_request'):
96 self._check_own_company(cr, uid, vals['partner_id'], context=context)
97
98+ if 'partner_id' in vals and vals.get('partner_id', False):
99+ # US-11005
100+ if not self.pool.get('res.partner').browse(cr, uid, vals['partner_id'], context=context).company_id.instance_id.po_fo_cost_center_id:
101+ raise osv.except_osv(_('Warning !'), _('Add the cost center picked for PO/FO reference'))
102+
103 if not 'pricelist_id' in vals and vals.get('partner_id'):
104 partner = self.pool.get('res.partner').browse(cr, uid, vals['partner_id'], fields_to_fetch=['property_product_pricelist', 'partner_type'], context=context)
105 if partner.partner_type in ('internal', 'intermission', 'section'):

Subscribers

People subscribed via source and target branches