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

Proposed by jftempo
Status: Merged
Merged at revision: 6270
Proposed branch: lp:~mukunde/unifield-server/US-10090
Merge into: lp:unifield-server
Diff against target: 167 lines (+61/-4) (has conflicts)
9 files modified
bin/addons/account/account.py (+1/-1)
bin/addons/account/account_view.xml (+1/-1)
bin/addons/account_journal/project/project.py (+1/-0)
bin/addons/account_override/__init__.py (+4/-1)
bin/addons/account_subscription/account_model_view.xml (+1/-1)
bin/addons/msf_profile/data/patches.xml (+8/-0)
bin/addons/msf_profile/msf_profile.py (+43/-0)
bin/addons/msf_sync_data_post_synchro/data/account.analytic.journal.csv (+1/-0)
bin/addons/msf_sync_data_post_synchro/data/account.journal.csv (+1/-0)
Text conflict in bin/addons/msf_profile/data/patches.xml
Text conflict in bin/addons/msf_profile/msf_profile.py
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-10090
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+424887@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/account/account.py'
2--- bin/addons/account/account.py 2022-06-22 13:46:44 +0000
3+++ bin/addons/account/account.py 2022-07-08 13:04:36 +0000
4@@ -2583,7 +2583,7 @@
5
6 _columns = {
7 'name': fields.char('Name', size=64, required=True),
8- 'ref': fields.char('Reference', size=16),
9+ 'ref': fields.char('Reference', size=64),
10 'model_id': fields.many2one('account.model', 'Model', required=True),
11
12 'date_start': fields.date('Start Date', required=True),
13
14=== modified file 'bin/addons/account/account_view.xml'
15--- bin/addons/account/account_view.xml 2022-03-22 12:59:02 +0000
16+++ bin/addons/account/account_view.xml 2022-07-08 13:04:36 +0000
17@@ -1897,7 +1897,7 @@
18 <filter icon="terp-dialog-close" string="Done" name="done" domain="[('state', '=', 'done')]" />
19 <field name="name"/>
20 <field name="journal_id"
21- domain="[('type', '=', 'purchase'), ('code', '!=', 'ISI'), ('is_current_instance', '=', True)]"
22+ domain="[('type', 'in', ('purchase', 'depreciation')), ('code', '!=', 'ISI'), ('is_current_instance', '=', True)]"
23 context="{'search_default_filter_is_active': 1}"
24 />
25 </group>
26
27=== modified file 'bin/addons/account_journal/project/project.py'
28--- bin/addons/account_journal/project/project.py 2022-05-04 12:46:50 +0000
29+++ bin/addons/account_journal/project/project.py 2022-07-08 13:04:36 +0000
30@@ -53,6 +53,7 @@
31 ('revaluation', 'Revaluation'),
32 ('sale','Sale'),
33 ('situation','Situation'),
34+ ('depreciation', 'Depreciation'),
35 ]
36
37 def _get_has_ajis(self, cr, uid, ids, field_name, arg, context=None):
38
39=== modified file 'bin/addons/account_override/__init__.py'
40--- bin/addons/account_override/__init__.py 2022-05-10 10:21:27 +0000
41+++ bin/addons/account_override/__init__.py 2022-07-08 13:04:36 +0000
42@@ -128,8 +128,11 @@
43 'recurring_lines': [
44 ('type', '!=', 'view'),
45 ('is_not_hq_correctible', '=', False),
46- '|', '&', ('user_type_code', '=', 'receivables'), ('type', '=', 'receivable'), '&', ('user_type_code', '=', 'expense'), ('user_type.report_type', '!=', 'none'), # Receivable/Receivable allowed + expense accounts (without extra-accounting) allowed
47+ '|',
48+ '|', '&', ('user_type_code', '=', 'receivables'), ('type', '=', 'receivable'), '&', ('user_type_code', '=', 'expense'), ('user_type.report_type', '!=', 'none'), # Receivable/Receivable allowed + expense accounts (without extra-accounting) allowed
49+ '&', ('user_type_code', '=', 'asset'), ('type', '=', 'other'), # US-10090 Allow Type "Asset" and Internal Type "Regular"
50 ],
51+
52 # ACCRUALS - expense lines
53 # WARNING: keep in mind that the AD button is always displayed in the Accrual Expense Lines, so if the following
54 # domain is modified, this may have to be adapted.
55
56=== modified file 'bin/addons/account_subscription/account_model_view.xml'
57--- bin/addons/account_subscription/account_model_view.xml 2022-01-14 13:57:33 +0000
58+++ bin/addons/account_subscription/account_model_view.xml 2022-07-08 13:04:36 +0000
59@@ -27,7 +27,7 @@
60 <group attrs="{'readonly': [('state', '=', 'done')]}" colspan="6" col="6">
61 <field name="name"/>
62 <field name="journal_id"
63- domain="[('type', '=', 'purchase'), ('code', '!=', 'ISI'), ('is_current_instance', '=', True), ('is_active', '=', True)]"/>
64+ domain="[('type', 'in', ('purchase', 'depreciation')), ('code', '!=', 'ISI'), ('is_current_instance', '=', True), ('is_active', '=', True)]"/>
65 <field name="currency_id"/>
66 </group>
67 <group colspan="6" col="6" attrs="{'invisible': [('analytic_distribution_id', '=', False)]}">
68
69=== modified file 'bin/addons/msf_profile/data/patches.xml'
70--- bin/addons/msf_profile/data/patches.xml 2022-05-30 15:32:49 +0000
71+++ bin/addons/msf_profile/data/patches.xml 2022-07-08 13:04:36 +0000
72@@ -787,9 +787,17 @@
73 <field name="method">us_5722_update_accruals</field>
74 </record>
75
76+<<<<<<< TREE
77 <record id="us_8259_remove_currency_table_wkf" model="patch.scripts">
78 <field name="method">us_8259_remove_currency_table_wkf</field>
79 </record>
80
81+=======
82+ <!-- UF27.0 -->
83+ <record id="us_10090_new_dep_journals" model="patch.scripts">
84+ <field name="method">us_10090_new_dep_journals</field>
85+ </record>
86+
87+>>>>>>> MERGE-SOURCE
88 </data>
89 </openerp>
90
91=== modified file 'bin/addons/msf_profile/msf_profile.py'
92--- bin/addons/msf_profile/msf_profile.py 2022-05-30 15:32:49 +0000
93+++ bin/addons/msf_profile/msf_profile.py 2022-07-08 13:04:36 +0000
94@@ -56,12 +56,55 @@
95 'model': lambda *a: 'patch.scripts',
96 }
97
98+<<<<<<< TREE
99 def us_8259_remove_currency_table_wkf(self, cr, uid, *a, **b):
100 cr.execute("delete from wkf_workitem where act_id in (select id from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table'))")
101 cr.execute("delete from wkf_activity where wkf_id = (select id from wkf where name='wkf.res.currency.table' and osv='res.currency.table')")
102 cr.execute("delete from wkf where name='wkf.res.currency.table' and osv='res.currency.table'")
103 return True
104
105+=======
106+ def us_10090_new_dep_journals(self, cr, uid, *a, **b):
107+ """
108+ Creates the DEP G/L journals in all OCB instances and DEP analytic journals in all existing instances.
109+ This is done in Python as the objects created must sync normally.
110+ """
111+ user_obj = self.pool.get('res.users')
112+ analytic_journal_obj = self.pool.get('account.analytic.journal')
113+ journal_obj = self.pool.get('account.journal')
114+ current_instance = user_obj.browse(cr, uid, uid, fields_to_fetch=['company_id']).company_id.instance_id
115+ if current_instance: # existing instances only
116+ # DEP analytic journal
117+ dep_analytic_journal_ids = analytic_journal_obj.search(cr, uid,
118+ [('code', '=', 'DEP'),
119+ ('type', '=', 'depreciation'),
120+ ('is_current_instance', '=', True)])
121+ if dep_analytic_journal_ids: # just in case the journal has been created before the release
122+ dep_analytic_journal_id = dep_analytic_journal_ids[0]
123+ else:
124+ dep_analytic_vals = {
125+ # Prop. Instance: by default the current one is used
126+ 'code': 'DEP',
127+ 'name': 'Depreciation',
128+ 'type': 'depreciation',
129+ }
130+ dep_analytic_journal_id = analytic_journal_obj.create(cr, uid, dep_analytic_vals)
131+ # DEP G/L journal in all OCB instances
132+ if current_instance.name.startswith('OCB')\
133+ and not journal_obj.search_exist(cr, uid, [('code', '=', 'DEP'), ('type', '=', 'depreciation'),
134+ ('is_current_instance', '=', True),
135+ ('analytic_journal_id', '=', dep_analytic_journal_id)]):
136+ dep_vals = {
137+ # Prop. Instance: by default the current one is used
138+ 'code': 'DEP',
139+ 'name': 'Depreciation',
140+ 'type': 'depreciation',
141+ 'analytic_journal_id': dep_analytic_journal_id,
142+ }
143+ journal_obj.create(cr, uid, dep_vals)
144+ return True
145+
146+>>>>>>> MERGE-SOURCE
147 # UF25.0
148 def us_8451_split_rr(self, cr, uid, *a, **b):
149 if not cr.column_exists('replenishment_segment_line', 'rr_fmc_1') or not cr.column_exists('replenishment_segment_line', 'rr_max_1'):
150
151=== modified file 'bin/addons/msf_sync_data_post_synchro/data/account.analytic.journal.csv'
152--- bin/addons/msf_sync_data_post_synchro/data/account.analytic.journal.csv 2022-02-22 15:30:02 +0000
153+++ bin/addons/msf_sync_data_post_synchro/data/account.analytic.journal.csv 2022-07-08 13:04:36 +0000
154@@ -20,3 +20,4 @@
155 TRUE,ENGI,International Engagement,engagement
156 TRUE,ISI,Intersection Supplier Invoice,purchase
157 TRUE,MIG,Migration,migration
158+TRUE,DEP,Depreciation,depreciation
159
160=== modified file 'bin/addons/msf_sync_data_post_synchro/data/account.journal.csv'
161--- bin/addons/msf_sync_data_post_synchro/data/account.journal.csv 2022-02-22 15:30:02 +0000
162+++ bin/addons/msf_sync_data_post_synchro/data/account.journal.csv 2022-07-08 13:04:36 +0000
163@@ -16,3 +16,4 @@
164 REV,,,,Revaluation,revaluation,Revaluation
165 ISI,,,,Intersection Supplier Invoice,purchase,Intersection Supplier Invoice
166 MIG,,,,Migration,migration,Migration
167+DEP,,,,Depreciation,depreciation,Depreciation

Subscribers

People subscribed via source and target branches