Merge lp:~savoirfairelinux-openerp/openupgrade-addons/account_journal_active into lp:openupgrade-addons

Status: Merged
Merged at revision: 8166
Proposed branch: lp:~savoirfairelinux-openerp/openupgrade-addons/account_journal_active
Merge into: lp:openupgrade-addons
Diff against target: 32 lines (+3/-1)
2 files modified
account/account.py (+2/-1)
account/account_view.xml (+1/-0)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openupgrade-addons/account_journal_active
Reviewer Review Type Date Requested Status
Sandy Carter (http://www.savoirfairelinux.com) (community) Abstain
Maxime Chambreuil (http://www.savoirfairelinux.com) (community) Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+234131@code.launchpad.net

Description of the change

Backport of addition of active field which prevents errors when updating after openupgrade

https://github.com/odoo/odoo/commit/3468c2655b40925133e248c4f4fcd9104f27093b

The field was added to Odoo 7.0 and without this commit, the migration succeeds but subsequent updates when running odoo run into errors related to the missing active field.

This is a case of OpenUpgrade not being up to date with Odoo

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

Might need to edit migration

review: Needs Fixing
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

I just tested and it fixes the issues

review: Needs Fixing
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) :
review: Abstain
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Hi Sandy,

Not sure to understand. You add that because your database is based on OCB and not Odoo.
Right ?

review: Needs Information
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

Database is Odoo, not OCB.

The field was added to Odoo 7.0 and without this commit, the migration succeeds but subsequent updates when running odoo run into errors related to the missing active field.

This is a case of OpenUpgrade not being up to date with Odoo

Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

All right.
Thanks for the explanation.

review: Approve
Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

No worries. I probably should have written that in the description to begin with.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2013-04-23 12:57:31 +0000
3+++ account/account.py 2014-09-10 14:48:23 +0000
4@@ -725,7 +725,7 @@
5 'entry_posted': fields.boolean('Skip \'Draft\' State for Manual Entries', help='Check this box if you don\'t want new journal entries to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation. \nNote that journal entries that are automatically created by the system are always skipping that state.'),
6 'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
7 'allow_date':fields.boolean('Check Date in Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
8-
9+ 'active': fields.boolean('Active', select=True),
10 'profit_account_id' : fields.many2one('account.account', 'Profit Account'),
11 'loss_account_id' : fields.many2one('account.account', 'Loss Account'),
12 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1),
13@@ -737,6 +737,7 @@
14 'with_last_closing_balance' : False,
15 'user_id': lambda self, cr, uid, context: uid,
16 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
17+ 'active': True,
18 }
19 _sql_constraints = [
20 ('code_company_uniq', 'unique (code, company_id)', 'The code of the journal must be unique per company !'),
21
22=== modified file 'account/account_view.xml'
23--- account/account_view.xml 2013-04-25 12:06:04 +0000
24+++ account/account_view.xml 2014-09-10 14:48:23 +0000
25@@ -407,6 +407,7 @@
26 <field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
27 <field name="currency" groups="base.group_multi_currency"/>
28 <field name="company_id" groups="base.group_multi_company"/>
29+ <field name="active"/>
30 </group>
31 </group>
32 <notebook>

Subscribers

People subscribed via source and target branches