Browse Source

Merge PR #777 into 14.0

Signed-off-by pedrobaeza
pull/780/head
OCA-git-bot 4 years ago
parent
commit
f83315ce00
  1. 1
      account_financial_report/report/open_items.py
  2. 28
      account_financial_report/report/templates/open_items.xml
  3. 1
      account_financial_report/tests/test_journal_ledger.py
  4. 2
      account_financial_report/wizard/open_items_wizard_view.xml

1
account_financial_report/report/open_items.py

@ -278,6 +278,7 @@ class OpenItemsReport(models.AbstractModel):
"ref_label": ref_label, "ref_label": ref_label,
"journal_id": move_line["journal_id"][0], "journal_id": move_line["journal_id"][0],
"move_name": move_line["move_id"][1], "move_name": move_line["move_id"][1],
"entry_id": move_line["move_id"][0],
"currency_id": move_line["currency_id"][0] "currency_id": move_line["currency_id"][0]
if move_line["currency_id"] if move_line["currency_id"]
else False, else False,

28
account_financial_report/report/templates/open_items.xml

@ -179,7 +179,7 @@
<!--## move--> <!--## move-->
<div class="act_as_cell left"> <div class="act_as_cell left">
<span <span
t-att-res-id="line['move_id']"
t-att-res-id="line['entry_id']"
res-model="account.move" res-model="account.move"
view-type="form" view-type="form"
> >
@ -188,16 +188,34 @@
</div> </div>
<!--## journal--> <!--## journal-->
<div class="act_as_cell left"> <div class="act_as_cell left">
<span t-esc="journals_data[line['journal_id']]['code']" />
<span
t-att-res-id="journals_data[line['journal_id']]['id']"
res-model="account.journal"
view-type="form"
>
<t t-esc="journals_data[line['journal_id']]['code']" />
</span>
</div> </div>
<!--## account code--> <!--## account code-->
<div class="act_as_cell left"> <div class="act_as_cell left">
<span t-esc="accounts_data[account_id]['code']" />
<span
t-att-res-id="accounts_data[account_id]['id']"
res-model="account.account"
view-type="form"
>
<t t-esc="accounts_data[account_id]['code']" />
</span>
</div> </div>
<!--## partner--> <!--## partner-->
<div class="act_as_cell left"> <div class="act_as_cell left">
<!-- <span t-if="line.get('partner_id', False)" t-esc="line['partner_id']"/>-->
<span t-esc="line['partner_name']" />
<span
t-if="line.get('partner_id', False)"
t-att-res-id="line['partner_id']"
res-model="res.partner"
view-type="form"
>
<t t-esc="line['partner_name']" />
</span>
</div> </div>
<!--## ref - label--> <!--## ref - label-->
<div class="act_as_cell left"> <div class="act_as_cell left">

1
account_financial_report/tests/test_journal_ledger.py

@ -237,6 +237,7 @@ class TestJournalReport(AccountTestInvoicingCommon):
) )
move_form.partner_id = self.partner_2 move_form.partner_id = self.partner_2
move_form.journal_id = self.journal_purchase move_form.journal_id = self.journal_purchase
move_form.invoice_date = Date.today()
with move_form.invoice_line_ids.new() as line_form: with move_form.invoice_line_ids.new() as line_form:
line_form.name = "test" line_form.name = "test"
line_form.quantity = 1.0 line_form.quantity = 1.0

2
account_financial_report/wizard/open_items_wizard_view.xml

@ -88,7 +88,7 @@
</field> </field>
</record> </record>
<record id="action_open_items_wizard" model="ir.actions.act_window"> <record id="action_open_items_wizard" model="ir.actions.act_window">
<field name="name">Open Itemsr</field>
<field name="name">Open Items</field>
<field name="res_model">open.items.report.wizard</field> <field name="res_model">open.items.report.wizard</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="view_id" ref="open_items_wizard" /> <field name="view_id" ref="open_items_wizard" />

Loading…
Cancel
Save