Commit 4a001f45 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

accounting: fix wrong mirror node displayed in grouping dialog

When account number method is set to account reference and the
transaction line has a node acquired from the invoice source or
destination organisation or person and when this node has a reference,
then this was displayed as an account reference.

We set a reference on Client 1 organisation to reproduce the problem.
parent b629feaa
mirror_node_formatted_title = ''
if context.mirror_node_uid:
brain_list = context.getPortalObject().portal_catalog(uid=context.mirror_node_uid, limit=2)
brain_list = context.getPortalObject().portal_catalog(
uid=context.mirror_node_uid,
portal_type='Account',
limit=2,
)
if brain_list:
brain, = brain_list
mirror_node_formatted_title = brain.getObject().Account_getFormattedTitle()
......
......@@ -80,6 +80,10 @@
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>O-CLI1</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
......
......@@ -123,6 +123,71 @@ Grouping Dialog show mirror account
<td>7 - Goods Sales</td>
</tr>
<!-- This also works when using "Account Reference" for account number method -->
<tr>
<td>open</td>
<td>${base_url}/PreferenceTool_setAccountingTestAccountReferencePreference</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Preference Set</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>select_module</td>
<td>Organisations</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Folder_show:method</td>
<td></td>
</tr>
<tr>
<td>type</td>
<!-- title -->
<td>//tr[@class='listbox-search-line']/th[2]/input</td>
<td>Client 1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@class="listbox-select-action"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Client 1</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//img[@alt='Grouping Reference Fast Input']</td>
<td></td>
</tr>
<tr>
<td>verifySelected</td>
<td>field_your_node</td>
<td>label=A-REC - Receivable</td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-0 DataA']/td[11]</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>//tr[@class='listbox-data-line-1 DataB']/td[11]</td>
<td>A-PAY - Payable</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment