Merge lp:~robertolizana/ocb-addons/6.1-fix-unknow_field_reconcil_partial_id into lp:ocb-addons/6.1

Proposed by Roberto Lizana (trey.es)
Status: Superseded
Proposed branch: lp:~robertolizana/ocb-addons/6.1-fix-unknow_field_reconcil_partial_id
Merge into: lp:ocb-addons/6.1
Diff against target: 114 lines (+14/-14)
1 file modified
account/account.py (+14/-14)
To merge this branch: bzr merge lp:~robertolizana/ocb-addons/6.1-fix-unknow_field_reconcil_partial_id
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Fixing
Review via email: mp+176835@code.launchpad.net

This proposal supersedes a proposal from 2013-07-23.

This proposal has been superseded by a proposal from 2013-07-25.

Description of the change

[FIX] When create an account.move with line_id value don't reset information of partial conciliation, the field name reconcil_partial_id is incorrect

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote : Posted in a previous version of this proposal

Thanks Roberto! That is a very useful fix.

One thing: if I am correct, the only line that has actually changed is line 36. But the diff shows some whitespace changes. Could you please revert these changes?

review: Needs Fixing
Revision history for this message
Roberto Lizana (trey.es) (robertolizana) wrote : Posted in a previous version of this proposal

Stefan, fixed whitespace changes.

I resubmit proposal to merge for update diff.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Sorry Roberto, it didn't work :-(.

You could try getting a version of this file from a fresh branch of ocb-addons/6.1 and reapply the changes. Commit that file on top of this branch.

review: Needs Fixing

Unmerged revisions

6764. By Roberto Lizana (trey.es)

FIX. Unknow field reconcil_partial_id to create account.move

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-07-15 13:14:07 +0000
3+++ account/account.py 2013-07-25 02:00:41 +0000
4@@ -134,7 +134,7 @@
5
6 def _get_current_report_type(self, cr, uid, ids, name, arg, context=None):
7 obj_data = self.pool.get('ir.model.data')
8- obj_financial_report = self.pool.get('account.financial.report')
9+ obj_financial_report = self.pool.get('account.financial.report')
10 res = {}
11 financial_report_ref = {
12 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context),
13@@ -152,7 +152,7 @@
14
15 def _save_report_type(self, cr, uid, account_type_id, field_name, field_value, arg, context=None):
16 obj_data = self.pool.get('ir.model.data')
17- obj_financial_report = self.pool.get('account.financial.report')
18+ obj_financial_report = self.pool.get('account.financial.report')
19 #unlink if it exists somewhere in the financial reports related to BS or PL
20 financial_report_ref = {
21 'asset': obj_financial_report.browse(cr, uid, obj_data.get_object_reference(cr, uid, 'account','account_financial_report_assets0')[1], context=context),
22@@ -177,7 +177,7 @@
23 'Balance' will generally be used for cash accounts.
24 'Detail' will copy each existing journal item of the previous year, even the reconciled ones.
25 'Unreconciled' will copy only the journal items that were unreconciled on the first day of the new fiscal year."""),
26- 'report_type': fields.function(_get_current_report_type, fnct_inv=_save_report_type, type='selection', string='P&L / BS Category',
27+ 'report_type': fields.function(_get_current_report_type, fnct_inv=_save_report_type, type='selection', string='P&L / BS Category',
28 selection= [('none','/'),
29 ('income', _('Profit & Loss (Income account)')),
30 ('expense', _('Profit & Loss (Expense account)')),
31@@ -1397,7 +1397,7 @@
32 if not l[0]:
33 l[2].update({
34 'reconcile_id':False,
35- 'reconcil_partial_id':False,
36+ 'reconcile_partial_id':False,
37 'analytic_lines':False,
38 'invoice':False,
39 'ref':False,
40@@ -1862,14 +1862,14 @@
41 return result in the context
42 Ex: result=round(price_unit*0.21,4)
43 """
44-
45+
46 def copy_data(self, cr, uid, id, default=None, context=None):
47 if default is None:
48- default = {}
49+ default = {}
50 name = self.read(cr, uid, id, ['name'], context=context)['name']
51 default = default.copy()
52 default.update({'name': name + _(' (Copy)')})
53- return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
54+ return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
55
56 def get_precision_tax():
57 def change_digit_tax(cr):
58@@ -2776,7 +2776,7 @@
59 _columns={
60 'name': fields.char('Name', size=64, required=True),
61 'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
62- 'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
63+ 'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
64 'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."),
65 'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sale and purchase rates or choose from list of taxes. This last choice assumes that the set of tax defined on this template is complete'),
66 'account_root_id': fields.many2one('account.account.template', 'Root Account', domain=[('parent_id','=',False)]),
67@@ -3060,7 +3060,7 @@
68 return res
69
70 def default_get(self, cr, uid, fields, context=None):
71- res = super(wizard_multi_charts_accounts, self).default_get(cr, uid, fields, context=context)
72+ res = super(wizard_multi_charts_accounts, self).default_get(cr, uid, fields, context=context)
73 tax_templ_obj = self.pool.get('account.tax.template')
74
75 if 'bank_accounts_id' in fields:
76@@ -3137,7 +3137,7 @@
77 # Get the analytic journal
78 data = False
79 if journal_type in ('sale', 'sale_refund'):
80- data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale')
81+ data = obj_data.get_object_reference(cr, uid, 'account', 'analytic_journal_sale')
82 elif journal_type in ('purchase', 'purchase_refund'):
83 pass
84 elif journal_type == 'general':
85@@ -3163,7 +3163,7 @@
86 if journal_type in ('general', 'situation'):
87 data = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_view')
88 elif journal_type in ('sale_refund', 'purchase_refund'):
89- data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view')
90+ data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_refund_journal_view')
91 else:
92 data = obj_data.get_object_reference(cr, uid, 'account', 'account_sp_journal_view')
93 return data and data[1] or False
94@@ -3400,7 +3400,7 @@
95
96 def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None):
97 '''
98- This function prepares the value to use for the creation of a bank journal created through the wizard of
99+ This function prepares the value to use for the creation of a bank journal created through the wizard of
100 generating COA from templates.
101
102 :param line: dictionary containing the values encoded by the user related to his bank account
103@@ -3418,9 +3418,9 @@
104 tmp = obj_data.get_object_reference(cr, uid, 'account', 'account_journal_bank_view')
105 view_id_cash = tmp and tmp[1] or False
106
107- # we need to loop again to find next number for journal code
108+ # we need to loop again to find next number for journal code
109 # because we can't rely on the value current_num as,
110- # its possible that we already have bank journals created (e.g. by the creation of res.partner.bank)
111+ # its possible that we already have bank journals created (e.g. by the creation of res.partner.bank)
112 # and the next number for account code might have been already used before for journal
113 for num in xrange(current_num, 100):
114 # journal_code has a maximal size of 5, hence we can enforce the boundary num < 100

Subscribers

People subscribed via source and target branches