forked from OCA/account-payment
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] account_payment_return: Add return expenses functionality (OCA#156
- Loading branch information
1 parent
3c232af
commit 41ee867
Showing
8 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2017 luis M. Ontalba <luis.martinez@tecnativa.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class AccountJournal(models.Model): | ||
_inherit = "account.journal" | ||
|
||
default_expense_account_id = fields.Many2one( | ||
comodel_name='account.account', string='Default Expense Account', | ||
help='Default account for commission expenses') | ||
default_expense_partner_id = fields.Many2one( | ||
comodel_name="res.partner", string="Default Expense Partner", | ||
domain=[('supplier', '=', True)], help='Default partner for ' | ||
'commission expenses') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2017 Luis M. Ontalba <luis.martínez@tecnativa.com> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3). --> | ||
|
||
<odoo> | ||
|
||
<record id="view_account_journal_form" model="ir.ui.view"> | ||
<field name="name">account.journal.form</field> | ||
<field name="model">account.journal</field> | ||
<field name="inherit_id" ref="account.view_account_journal_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="default_debit_account_id" position="after"> | ||
<field name="default_expense_account_id"/> | ||
<field name="default_expense_partner_id"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters