Skip to content

Instantly share code, notes, and snippets.

@ray-odoo
Created August 24, 2023 14:08
Show Gist options
  • Save ray-odoo/25b1af480e397b4bb73c1a56e7cf1b67 to your computer and use it in GitHub Desktop.
Save ray-odoo/25b1af480e397b4bb73c1a56e7cf1b67 to your computer and use it in GitHub Desktop.
Odoo 16 - Bank Reconciliation - Simplify CC rec
1) Setup two CC Journals with related accounts - via Add Bank Account
- one is for a single card holder
- one is for a corporate card with many card holders - modeled as payment methods with the top being "Select a Card"
2) Create a custom field x_payment_method_line_id on account.move.line
It is a many2one to account.payment.method.line
Related: move_id.payment_id.payment_method_line_id
3) Inherit the account.move.line List View used on the Bank rec screen:
<data>
<field name="account_id" position="attributes">
<attribute name="optional">hide</attribute>
</field>
<field name="partner_id" position="attributes">
<attribute name="optional">hide</attribute>
</field>
<field name="name" position="after">
<field name="x_payment_method_line_id" attrs="{'invisible': [('x_payment_method_line_id','=',VAR)]}"/>
</field>
</data>
* VAR is the ID of the "Select a Card" payment method, make a separate Menu to find this.
Remember the enter the Card# of each Employee in the Expense/Expense Report
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment