16 changed files with 284 additions and 97 deletions
@ -0,0 +1,36 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################# |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# |
|||
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
|||
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
|||
# |
|||
# You can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################# |
|||
|
|||
from odoo import fields, models |
|||
|
|||
|
|||
class PaymentApprover(models.Model): |
|||
_name = 'payment.approves' |
|||
|
|||
approve_user_id = fields.Many2one('res.users','Approver') |
|||
amount = fields.Float('Amount',help="If amount is 0.00, All the payments go through approval") |
|||
approval_currency_id = fields.Many2one('res.currency', string='Approval Currency', |
|||
help="Converts the payment amount to this currency if chosen.") |
|||
|
|||
|
|||
|
|||
|
|
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 114 KiB |
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="view_payment_approver_tree" model="ir.ui.view"> |
|||
<field name="name">PaymentApprover</field> |
|||
<field name="model">payment.approves</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="Approver" editable="bottom" create="true" delete="true"> |
|||
<field name="approve_user_id"/> |
|||
<field name="amount"/> |
|||
<field name="approval_currency_id"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<record model="ir.actions.act_window" id="action_payment_approver"> |
|||
<field name="name">Approvers</field> |
|||
<field name="res_model">payment.approves</field> |
|||
<field name="view_mode">tree</field> |
|||
<field name="view_id" ref="view_payment_approver_tree"/> |
|||
</record> |
|||
|
|||
</odoo> |
Loading…
Reference in new issue