account_voucher - class res_company must be defined first

Bug #908704 reported by Ferdinand
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Low
OpenERP R&D Addons Team 3

Bug Description

expense_currency_exchange_account_id never gets created , because module fails to install

Related branches

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Dr.Ferdinand,

I have checked your issue with trunk but I didn't face any problem as you have. would you please try again
with updated code and provide your end revision if you have still faced the problem.

Thanks and waiting for your reply.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Ferdinand (office-chricar) wrote :

well I could not load account_voucher because

this is at the end

class res_company(osv.osv):
    _inherit = "res.company"
    _columns = {
        'income_currency_exchange_account_id': fields.many2one(
            'account.account',
            string="Income Currency Rate",
            domain="[('type', '=', 'other')]",),
        'expense_currency_exchange_account_id': fields.many2one(
            'account.account',
            string="Expense Currency Rate",
            domain="[('type', '=', 'other')]",),
    }

res_company()

and

 921 if amount_residual > 0:
 922 account_id = line.voucher_id.company_id.expense_currency_exchange_account_id

fails

Changed in openobject-addons:
status: Incomplete → New
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello,

I did not face any trace back but a better coding convention I have
confirming this issue.

Thank you!

Changed in openobject-addons:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Ferdinand,

Thanks for reporting. The solution for this bug is proposed in the branch : https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-908704-mdi/

with following Revision ID and Number.

Revision ID : <email address hidden>
Revision Number : 6193

Thanks and Regards,

Divyesh Makwana(MDI)

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
Revision history for this message
qdp (OpenERP) (qdp) wrote :

for "a better coding convention"? seriously who decided that it was "a better coding convention" to redefine first the class res_company before any other? i do not like working for nothing and confirming this issue and making a merge proposal is pretending that it is really an issue whereas you (and i) didn't face any problem.

Worst, it can shadow a real problem Ferdinand found.

So, i'm rejecting this bug and the merge proposal. Ferdinand, can you try again with a latest version of trunk and let us know?

Thanks,
Quentin

Changed in openobject-addons:
status: Fix Committed → Invalid
Revision history for this message
Ferdinand (office-chricar) wrote :

loading of account_voucher works now

Revision history for this message
Ferdinand (office-chricar) wrote :

sorry I have tested this with "my" modification
have to get a trunk version to make a new test

Revision history for this message
Ferdinand (office-chricar) wrote :

loading of account_voucher works now - with code from today

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.