← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 781814] Re: account_payment Select Invoices to Pay shows an empty dialog box

 

Hello Vishal Parmar,

Thank you for your answer.

I'm not sure I understand completely. In my understanding, the purpose
of the "Select Invoices to pay" on the Payment Order is to select unpaid
invoice to add them to the payment order. Therefore, at this stage, one
does not have a related bank/cash statement yet, because it is not paid
yet.

Moreover, if you look at my screenshot, the list is completely absent
from the dialog box, where I would expect it to be at lease present but
empty if there are no invoices to pay.

Thanks in advance for any additional clarification you could provide.

Best regards,

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/781814

Title:
  account_payment Select Invoices to Pay shows an empty dialog box

Status in OpenERP Modules (addons):
  New

Bug description:
  Steps to reproduce:
  - install OpenErp 6.0 series with demo data, account_payment module
  - goto  Accounting > Payment > Payment Orders
  - Open the demo payment order or create a new one
  - click "Select Invoices to pay"
  - The "Search Payment lines" that appears is bogus in the sense that there is no list in the screen (see screenshot)

  I traced it to account_payment/wizard/account_payment_order.py:

   def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
          res = super(payment_order_create, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
          if context and 'line_ids' in context:
              view_obj = etree.XML(res['arch'])
              child = view_obj.getchildren()[0]
              #domain = '[("id", "in", '+ str(context['line_ids'])+')]'
              domain = ''
              field = etree.Element('field', attrib={'domain': domain, 'name':'entries', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
              child.addprevious(field)
              res['arch'] = etree.tostring(view_obj)
          return res

  Where 'line_ids' is never present in context and therefore the
  'entries' field is never created.

  Best regards,

  -sbi


References