← Back to team overview

openerp-india team mailing list archive

[Bug 886736] Re: Pay Invoice screen does not find supplier invoice for payment information

 

I dived into the code, and managed to work out what the problem was:

The "Pay Invoice" screen uses the onchange_partner_id() function in
addons/account_voucher/account_voucher.py to update the details in the
screen.

The way this function finds pending invoices to pay involves searching
for accounts of type 'payable', but this is *internal type* payable, not
the payable you can use when you define the internal type as 'regular'.
This is one of the domain criteria for the line:

ids = move_line_pool.search(cr, uid, domain, context=context)

I had changed my Account Payable account (which records pending payments
due from invoices, as per standard accounting practice) from internal
type "payable" to type "regular" and subtype "payable", which meant it
wasn't getting found as part of the domain filter for the search used by
onchange_partner_id(), and move_line_pool.search() was returning an
empty set.

Changing the account type back to internal type 'payable' fixed the
problem.

I'm not sure if you'd want to include the Regular->payable account type
in this domain filter or not, as I don't really understand the
distinction between internal account types and the Regular subtypes, and
when each are to be used. I'd love a pointer to an explanation of the
difference between internal types and user types. The tooltip for the
field suggests that types receivable and payable are for use only with
Partner default accounts, not the rest of the chart of accounts. And
some behaviour within the payroll module further confused this issue for
me recently.

Happy to close this bug as invalid, though.

Thanks for the prompt response.

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/886736

Title:
  Pay Invoice screen does not find supplier invoice for payment
  information

Status in OpenERP Server:
  Incomplete

Bug description:
  After upgrading to openerp-server-6.0.3 and -web-6.0.3, payment of
  supplier invoices no longer seems to work.

  Creation of supplier invoice works fine.

  After selecting a supplier invoice, and clicking on "Pay Invoice", the
  Pay Invoice screen does not automatically populate with values from
  the invoice as it used to.

  I also cannot add payment information, as the Journal Item field does
  not find the outstanding invoice, either through typing, or bringing
  up the search screen.

  Have attempted the same workflow with GUI client and web client, with same results.
  Also attempted upgrading to latest build of 6.0.3 of both server and web client (5 Nov 2011 openerp-server-6.0.3-20111105-r3530 and openerp-web-6.0.3-20111105-r4725), with same results.

  Appreciate any advice on where to look further for possible issues
  created during upgrade.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/886736/+subscriptions


References