mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-24 22:52: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_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_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_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
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Payment Order",
|
||||
"version": "2.0.1.0.4",
|
||||
"version": "2.0.1.2.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "ACSONE SA/NV, "
|
||||
"Therp BV, "
|
||||
|
@ -420,6 +420,7 @@ class AccountPaymentOrder(models.Model):
|
||||
return True
|
||||
|
||||
def _prepare_move(self, bank_lines=None):
|
||||
move_date = False
|
||||
if self.payment_type == "outbound":
|
||||
ref = _("Payment order %s") % self.name
|
||||
else:
|
||||
@ -428,6 +429,8 @@ class AccountPaymentOrder(models.Model):
|
||||
ref += " - " + bank_lines.name
|
||||
if self.payment_mode_id.offsetting_account == "bank_account":
|
||||
journal_id = self.journal_id.id
|
||||
if bank_lines:
|
||||
move_date = bank_lines[0].date
|
||||
elif self.payment_mode_id.offsetting_account == "transfer_account":
|
||||
journal_id = self.payment_mode_id.transfer_journal_id.id
|
||||
vals = {
|
||||
@ -436,6 +439,8 @@ class AccountPaymentOrder(models.Model):
|
||||
"payment_order_id": self.id,
|
||||
"line_ids": [],
|
||||
}
|
||||
if move_date:
|
||||
vals.update({"date": move_date})
|
||||
total_company_currency = total_payment_currency = 0
|
||||
for bline in bank_lines:
|
||||
total_company_currency += bline.amount_company_currency
|
||||
|
@ -7,7 +7,7 @@
|
||||
name="users"
|
||||
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>
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
|
@ -140,6 +140,7 @@ class TestPaymentOrderOutbound(TransactionCase):
|
||||
order.draft2open()
|
||||
order.open2generated()
|
||||
order.generated2uploaded()
|
||||
self.assertEqual(order.move_ids[0].date, order.bank_line_ids[0].date)
|
||||
order.action_done()
|
||||
self.assertEqual(order.state, "done")
|
||||
|
||||
|
@ -42,11 +42,10 @@
|
||||
<field name="payment_mode_id" position="after">
|
||||
<field name="payment_order_ok" invisible="1" />
|
||||
</field>
|
||||
<field name="ref" position="before">
|
||||
<field name="ref" position="after">
|
||||
<field
|
||||
name="reference_type"
|
||||
required="1"
|
||||
nolabel="1"
|
||||
attrs="{'readonly':[('state','!=','draft')],
|
||||
'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
||||
/>
|
||||
|
@ -57,7 +57,10 @@
|
||||
name="move_option"
|
||||
attrs="{'invisible': [('generate_move', '=', False)], 'required': [('generate_move', '=', True)]}"
|
||||
/>
|
||||
<field name="post_move" />
|
||||
<field
|
||||
name="post_move"
|
||||
attrs="{'invisible': [('generate_move', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
|
Loading…
Reference in New Issue
Block a user