summaryrefslogtreecommitdiff
path: root/addons/payment
diff options
context:
space:
mode:
authorAnkita Raval <anr@odoo.com>2019-10-30 06:11:02 +0000
committerJigar Vaghela <jva@odoo.com>2020-02-19 09:09:20 +0000
commitd675dbaa4c7174591e0e7c1a3caf3e76877312ce (patch)
tree40840df0a36cb9a6ba3b918835da2a40a07e3a3b /addons/payment
parent8f6bf2087e50020bfad4e336b1d4c5a98a4fa84f (diff)
[IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
Diffstat (limited to 'addons/payment')
-rw-r--r--addons/payment/models/payment_acquirer.py2
-rw-r--r--addons/payment/views/account_invoice_views.xml6
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py
index 80192008613..ae90f89fa92 100644
--- a/addons/payment/models/payment_acquirer.py
+++ b/addons/payment/models/payment_acquirer.py
@@ -625,7 +625,7 @@ class PaymentTransaction(models.Model):
payment_id = fields.Many2one('account.payment', string='Payment', readonly=True)
invoice_ids = fields.Many2many('account.move', 'account_invoice_transaction_rel', 'transaction_id', 'invoice_id',
string='Invoices', copy=False, readonly=True,
- domain=[('type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))])
+ domain=[('move_type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))])
invoice_ids_nbr = fields.Integer(compute='_compute_invoice_ids_nbr', string='# of Invoices')
_sql_constraints = [
diff --git a/addons/payment/views/account_invoice_views.xml b/addons/payment/views/account_invoice_views.xml
index 1253e0382a7..8e57cda00a6 100644
--- a/addons/payment/views/account_invoice_views.xml
+++ b/addons/payment/views/account_invoice_views.xml
@@ -10,17 +10,17 @@
The user must capture/void the authorized transactions before registering a new payment.
-->
<xpath expr="//button[@id='account_invoice_payment_btn']" position="attributes">
- <attribute name="attrs">{'invisible': ['|', '|', '|', ('state', '!=', 'posted'), ('payment_state', 'not in', ('partial', 'not_paid')), ('type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')), ('authorized_transaction_ids', '!=', [])]}</attribute>
+ <attribute name="attrs">{'invisible': ['|', '|', '|', ('state', '!=', 'posted'), ('payment_state', 'not in', ('partial', 'not_paid')), ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')), ('authorized_transaction_ids', '!=', [])]}</attribute>
</xpath>
<xpath expr="//button[@id='account_invoice_payment_btn']" position="after">
<field name="authorized_transaction_ids" invisible="1"/>
<button name="payment_action_capture" type="object"
string="Capture Transaction" class="oe_highlight"
- attrs="{'invisible': ['|', '|', ('type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('state', '!=', 'posted'), ('authorized_transaction_ids', '=', [])]}"/>
+ attrs="{'invisible': ['|', '|', ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('state', '!=', 'posted'), ('authorized_transaction_ids', '=', [])]}"/>
<button name="payment_action_void" type="object"
string="Void Transaction"
confirm="Are you sure you want to void the authorized transaction? This action can't be undone."
- attrs="{'invisible': ['|', '|', ('type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('state', '!=', 'posted'), ('authorized_transaction_ids', '=', [])]}"/>
+ attrs="{'invisible': ['|', '|', ('move_type', 'not in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')), ('state', '!=', 'posted'), ('authorized_transaction_ids', '=', [])]}"/>
</xpath>
</field>
</record>