mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-21 21:22:05 +00:00
Automatic Update form OCA2FC Migrator
This commit is contained in:
parent
e21ade35cd
commit
a20c7b8dcd
@ -12,7 +12,7 @@ addon | version | summary
|
|||||||
[account_payment_order_return](account_payment_order_return/) | 2.0.1.0.1| Account Payment Order Return
|
[account_payment_order_return](account_payment_order_return/) | 2.0.1.0.1| Account Payment Order Return
|
||||||
[account_payment_purchase_stock](account_payment_purchase_stock/) | 2.0.1.0.0| Integrate Account Payment Purchase with Stock
|
[account_payment_purchase_stock](account_payment_purchase_stock/) | 2.0.1.0.0| Integrate Account Payment Purchase with Stock
|
||||||
[account_payment_partner](account_payment_partner/) | 2.0.1.1.2| Adds payment mode on partners and invoices
|
[account_payment_partner](account_payment_partner/) | 2.0.1.1.2| Adds payment mode on partners and invoices
|
||||||
[account_payment_order](account_payment_order/) | 2.0.1.0.4| Account Payment Order
|
[account_payment_order](account_payment_order/) | 2.0.1.2.0| Account Payment Order
|
||||||
[account_payment_purchase](account_payment_purchase/) | 2.0.1.0.0| Adds Bank Account and Payment Mode on Purchase Orders
|
[account_payment_purchase](account_payment_purchase/) | 2.0.1.0.0| Adds Bank Account and Payment Mode on Purchase Orders
|
||||||
[account_payment_mode](account_payment_mode/) | 2.0.1.0.1| Account Payment Mode
|
[account_payment_mode](account_payment_mode/) | 2.0.1.0.1| Account Payment Mode
|
||||||
[account_banking_sepa_direct_debit](account_banking_sepa_direct_debit/) | 2.0.1.1.0| Create SEPA files for Direct Debit
|
[account_banking_sepa_direct_debit](account_banking_sepa_direct_debit/) | 2.0.1.1.0| Create SEPA files for Direct Debit
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Account Payment Order",
|
"name": "Account Payment Order",
|
||||||
"version": "2.0.1.0.4",
|
"version": "2.0.1.2.0",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "ACSONE SA/NV, "
|
"author": "ACSONE SA/NV, "
|
||||||
"Therp BV, "
|
"Therp BV, "
|
||||||
|
@ -420,6 +420,7 @@ class AccountPaymentOrder(models.Model):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def _prepare_move(self, bank_lines=None):
|
def _prepare_move(self, bank_lines=None):
|
||||||
|
move_date = False
|
||||||
if self.payment_type == "outbound":
|
if self.payment_type == "outbound":
|
||||||
ref = _("Payment order %s") % self.name
|
ref = _("Payment order %s") % self.name
|
||||||
else:
|
else:
|
||||||
@ -428,6 +429,8 @@ class AccountPaymentOrder(models.Model):
|
|||||||
ref += " - " + bank_lines.name
|
ref += " - " + bank_lines.name
|
||||||
if self.payment_mode_id.offsetting_account == "bank_account":
|
if self.payment_mode_id.offsetting_account == "bank_account":
|
||||||
journal_id = self.journal_id.id
|
journal_id = self.journal_id.id
|
||||||
|
if bank_lines:
|
||||||
|
move_date = bank_lines[0].date
|
||||||
elif self.payment_mode_id.offsetting_account == "transfer_account":
|
elif self.payment_mode_id.offsetting_account == "transfer_account":
|
||||||
journal_id = self.payment_mode_id.transfer_journal_id.id
|
journal_id = self.payment_mode_id.transfer_journal_id.id
|
||||||
vals = {
|
vals = {
|
||||||
@ -436,6 +439,8 @@ class AccountPaymentOrder(models.Model):
|
|||||||
"payment_order_id": self.id,
|
"payment_order_id": self.id,
|
||||||
"line_ids": [],
|
"line_ids": [],
|
||||||
}
|
}
|
||||||
|
if move_date:
|
||||||
|
vals.update({"date": move_date})
|
||||||
total_company_currency = total_payment_currency = 0
|
total_company_currency = total_payment_currency = 0
|
||||||
for bline in bank_lines:
|
for bline in bank_lines:
|
||||||
total_company_currency += bline.amount_company_currency
|
total_company_currency += bline.amount_company_currency
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
name="users"
|
name="users"
|
||||||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||||
/>
|
/>
|
||||||
<field name="category_id" ref="base.module_category_extra" />
|
<field name="category_id" ref="base.module_category_usability" />
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
<data noupdate="1">
|
<data noupdate="1">
|
||||||
|
@ -140,6 +140,7 @@ class TestPaymentOrderOutbound(TransactionCase):
|
|||||||
order.draft2open()
|
order.draft2open()
|
||||||
order.open2generated()
|
order.open2generated()
|
||||||
order.generated2uploaded()
|
order.generated2uploaded()
|
||||||
|
self.assertEqual(order.move_ids[0].date, order.bank_line_ids[0].date)
|
||||||
order.action_done()
|
order.action_done()
|
||||||
self.assertEqual(order.state, "done")
|
self.assertEqual(order.state, "done")
|
||||||
|
|
||||||
|
@ -42,11 +42,10 @@
|
|||||||
<field name="payment_mode_id" position="after">
|
<field name="payment_mode_id" position="after">
|
||||||
<field name="payment_order_ok" invisible="1" />
|
<field name="payment_order_ok" invisible="1" />
|
||||||
</field>
|
</field>
|
||||||
<field name="ref" position="before">
|
<field name="ref" position="after">
|
||||||
<field
|
<field
|
||||||
name="reference_type"
|
name="reference_type"
|
||||||
required="1"
|
required="1"
|
||||||
nolabel="1"
|
|
||||||
attrs="{'readonly':[('state','!=','draft')],
|
attrs="{'readonly':[('state','!=','draft')],
|
||||||
'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
||||||
/>
|
/>
|
||||||
|
@ -57,7 +57,10 @@
|
|||||||
name="move_option"
|
name="move_option"
|
||||||
attrs="{'invisible': [('generate_move', '=', False)], 'required': [('generate_move', '=', True)]}"
|
attrs="{'invisible': [('generate_move', '=', False)], 'required': [('generate_move', '=', True)]}"
|
||||||
/>
|
/>
|
||||||
<field name="post_move" />
|
<field
|
||||||
|
name="post_move"
|
||||||
|
attrs="{'invisible': [('generate_move', '=', False)]}"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</field>
|
</field>
|
||||||
|
Loading…
Reference in New Issue
Block a user