[IMP] account: Be able to search on journal entries by account

This commit is contained in:
Yannick Tivisse
2015-10-02 16:02:44 +02:00
parent de8acb2569
commit 3631c962fe
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -91,6 +91,8 @@ class AccountMove(models.Model):
default=lambda self: self.env.user.company_id)
matched_percentage = fields.Float('Percentage Matched', compute='_compute_matched_percentage', digits=0, store=True, readonly=True, help="Technical field used in cash basis method")
statement_line_id = fields.Many2one('account.bank.statement.line', string='Bank statement line reconciled with this entry', copy=False, readonly=True)
# Dummy Account field to search on account.move by account_id
dummy_account_id = fields.Many2one('account.account', related='line_ids.account_id', string='Account', store=False)
@api.model
def create(self, vals):
+1
View File
@@ -1272,6 +1272,7 @@
<separator/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="dummy_account_id"/>
<group expand="0" string="Group By">
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" domain="[]" context="{'group_by':'journal_id'}"/>