← Back to team overview

c2c-oerpscenario team mailing list archive

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

 

** Attachment added: "Bogus dialog box screenshot"
   https://bugs.launchpad.net/openobject-addons/+bug/781814/+attachment/2126022/+files/Search_Payment_lines_empty.png

-- 
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