Merge lp:~julie-w/unifield-server/US-5425 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5198
Proposed branch: lp:~julie-w/unifield-server/US-5425
Merge into: lp:unifield-server
Diff against target: 68 lines (+24/-1)
4 files modified
bin/addons/msf_profile/data/patches.xml (+5/-0)
bin/addons/msf_profile/msf_profile.py (+17/-0)
bin/addons/res_currency_functional/account_move_line_compute_currency.py (+1/-1)
bin/addons/res_currency_functional/account_move_line_view.xml (+1/-0)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-5425
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+361129@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_profile/data/patches.xml'
--- bin/addons/msf_profile/data/patches.xml 2018-11-20 11:14:57 +0000
+++ bin/addons/msf_profile/data/patches.xml 2019-01-07 13:53:45 +0000
@@ -1,6 +1,11 @@
1<?xml version="1.0" encoding="utf-8" ?>1<?xml version="1.0" encoding="utf-8" ?>
2<openerp>2<openerp>
3 <data>3 <data>
4 <!-- UF11.1 -->
5 <record id="us_5425_reset_amount_currency" model="patch.scripts">
6 <field name="method">us_5425_reset_amount_currency</field>
7 </record>
8
4 <!-- UF11.0 -->9 <!-- UF11.0 -->
5 <record id="us_5356_reset_ud_prod" model="patch.scripts">10 <record id="us_5356_reset_ud_prod" model="patch.scripts">
6 <field name="method">us_5356_reset_ud_prod</field>11 <field name="method">us_5356_reset_ud_prod</field>
712
=== modified file 'bin/addons/msf_profile/msf_profile.py'
--- bin/addons/msf_profile/msf_profile.py 2018-11-20 11:14:57 +0000
+++ bin/addons/msf_profile/msf_profile.py 2019-01-07 13:53:45 +0000
@@ -51,6 +51,23 @@
51 'model': lambda *a: 'patch.scripts',51 'model': lambda *a: 'patch.scripts',
52 }52 }
5353
54 # UF11.1
55 def us_5425_reset_amount_currency(self, cr, uid, *a, **b):
56 """
57 Sets to zero the JI "amount_currency" which wrongly have a value
58 Note: it fixes only the reval and FX entries where we forced the booking values to be exactly 0.00
59 """
60 update_ji_booking = """
61 UPDATE account_move_line
62 SET amount_currency = 0.0
63 WHERE (debit_currency = 0.0 OR debit_currency IS NULL)
64 AND (credit_currency = 0.0 OR credit_currency IS NULL)
65 AND (amount_currency != 0.0 AND amount_currency IS NOT NULL)
66 AND journal_id IN (SELECT id FROM account_journal WHERE type IN ('cur_adj', 'revaluation'));
67 """
68 cr.execute(update_ji_booking)
69 self._logger.warn('amount_currency reset in %s JI.' % (cr.rowcount,))
70
54 # UF11.071 # UF11.0
55 def us_5356_reset_ud_prod(self, cr, uid, *a, **b):72 def us_5356_reset_ud_prod(self, cr, uid, *a, **b):
56 instance_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.instance_id73 instance_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.instance_id
5774
=== modified file 'bin/addons/res_currency_functional/account_move_line_compute_currency.py'
--- bin/addons/res_currency_functional/account_move_line_compute_currency.py 2018-09-19 09:18:26 +0000
+++ bin/addons/res_currency_functional/account_move_line_compute_currency.py 2019-01-07 13:53:45 +0000
@@ -601,7 +601,7 @@
601 # or if it's a revaluation line (US-1682)601 # or if it's a revaluation line (US-1682)
602 if vals.get('is_addendum_line', False) or \602 if vals.get('is_addendum_line', False) or \
603 (context.get('sync_update_execution', False) and 'is_revaluated_ok' in newvals and newvals['is_revaluated_ok']):603 (context.get('sync_update_execution', False) and 'is_revaluated_ok' in newvals and newvals['is_revaluated_ok']):
604 newvals.update({'debit_currency': 0.0, 'credit_currency': 0.0})604 newvals.update({'debit_currency': 0.0, 'credit_currency': 0.0, 'amount_currency': 0.0})
605 return newvals605 return newvals
606606
607 def create(self, cr, uid, vals, context=None, check=True):607 def create(self, cr, uid, vals, context=None, check=True):
608608
=== modified file 'bin/addons/res_currency_functional/account_move_line_view.xml'
--- bin/addons/res_currency_functional/account_move_line_view.xml 2018-09-20 07:55:18 +0000
+++ bin/addons/res_currency_functional/account_move_line_view.xml 2019-01-07 13:53:45 +0000
@@ -69,6 +69,7 @@
69 <field name="invoice" invisible="1"/>69 <field name="invoice" invisible="1"/>
70 <field name="purchase_order_id" invisible="1"/>70 <field name="purchase_order_id" invisible="1"/>
71 <field name="cheque_number" invisible="1"/>71 <field name="cheque_number" invisible="1"/>
72 <field name="amount_currency" invisible="1"/>
72 </group>73 </group>
7374
74 <group col="6" colspan="4">75 <group col="6" colspan="4">

Subscribers

People subscribed via source and target branches