mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-12-23 04:41:44 +00:00
Automatic Update form OCA2FC Migrator
This commit is contained in:
parent
9fe6153f46
commit
11ffe54da3
@ -9,18 +9,18 @@ Available addons
|
||||
|
||||
addon | version | summary
|
||||
--- | --- | ---
|
||||
[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.1| Adds Bank Account and Payment Mode on Purchase Orders
|
||||
[account_banking_sepa_direct_debit](account_banking_sepa_direct_debit/) | 2.0.1.1.1| Create SEPA files for Direct Debit
|
||||
[account_invoice_select_for_payment](account_invoice_select_for_payment/) | 2.0.1.0.0| Account Invoice Select for Payment
|
||||
[account_payment_sale](account_payment_sale/) | 2.0.1.0.0| Adds payment mode on sale orders
|
||||
[account_banking_pain_base](account_banking_pain_base/) | 2.0.1.0.1| Base module for PAIN file generation
|
||||
[account_banking_mandate](account_banking_mandate/) | 2.0.1.1.1| Banking mandates
|
||||
[account_payment_order](account_payment_order/) | 2.0.1.4.0| Account Payment Order
|
||||
[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.1| Integrate Account Payment Purchase with Stock
|
||||
[account_banking_sepa_credit_transfer](account_banking_sepa_credit_transfer/) | 2.0.1.0.1| Create SEPA XML files for Credit Transfers
|
||||
[account_payment_mode](account_payment_mode/) | 2.0.1.0.2| Account Payment Mode
|
||||
[account_banking_mandate_sale](account_banking_mandate_sale/) | 2.0.1.0.0| Adds mandates on sale orders
|
||||
[account_payment_partner](account_payment_partner/) | 2.0.1.3.2| Adds payment mode on partners and invoices
|
||||
[account_payment_partner](account_payment_partner/) | 2.0.1.3.3| Adds payment mode on partners and invoices
|
||||
[account_payment_order_return](account_payment_order_return/) | 2.0.1.0.1| Account Payment Order Return
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Payment Partner",
|
||||
"version": "2.0.1.3.2",
|
||||
"version": "2.0.1.3.3",
|
||||
"category": "Banking addons",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Adds payment mode on partners and invoices",
|
||||
|
@ -11,12 +11,14 @@ class ResPartner(models.Model):
|
||||
supplier_payment_mode_id = fields.Many2one(
|
||||
comodel_name="account.payment.mode",
|
||||
company_dependent=True,
|
||||
check_company=True,
|
||||
domain="[('payment_type', '=', 'outbound')]",
|
||||
help="Select the default payment mode for this supplier.",
|
||||
)
|
||||
customer_payment_mode_id = fields.Many2one(
|
||||
comodel_name="account.payment.mode",
|
||||
company_dependent=True,
|
||||
check_company=True,
|
||||
domain="[('payment_type', '=', 'inbound')]",
|
||||
help="Select the default payment mode for this customer.",
|
||||
)
|
||||
|
@ -10,7 +10,7 @@
|
||||
<span t-field="o.payment_mode_id.note" />
|
||||
</p>
|
||||
<t t-if="o.payment_mode_id and o.payment_mode_id.show_bank_account != 'no'">
|
||||
<p t-foreach="o.partner_banks_to_show()" t-as="partner_bank">
|
||||
<p t-foreach="o.sudo().partner_banks_to_show()" t-as="partner_bank">
|
||||
<strong>Bank Account:</strong>
|
||||
<t t-if="partner_bank.bank_id">
|
||||
<t
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Payment Purchase",
|
||||
"version": "2.0.1.0.0",
|
||||
"version": "2.0.1.0.1",
|
||||
"category": "Banking addons",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Adds Bank Account and Payment Mode on Purchase Orders",
|
||||
|
@ -13,14 +13,14 @@ class AccountMove(models.Model):
|
||||
new_mode = self.purchase_id.payment_mode_id.id or False
|
||||
new_bank = self.purchase_id.supplier_partner_bank_id.id or False
|
||||
res = super()._onchange_purchase_auto_complete() or {}
|
||||
if self.payment_mode_id and self.payment_mode_id.id != new_mode:
|
||||
if self.payment_mode_id and new_mode and self.payment_mode_id.id != new_mode:
|
||||
res["warning"] = {
|
||||
"title": _("Warning"),
|
||||
"message": _("Selected purchase order have different payment mode."),
|
||||
}
|
||||
return res
|
||||
self.payment_mode_id = new_mode
|
||||
if self.partner_bank_id and self.partner_bank_id.id != new_bank:
|
||||
if self.partner_bank_id and new_bank and self.partner_bank_id.id != new_bank:
|
||||
res["warning"] = {
|
||||
"title": _("Warning"),
|
||||
"message": _("Selected purchase order have different supplier bank."),
|
||||
|
@ -13,14 +13,20 @@ class TestAccountPaymentPurchase(SavepointCase):
|
||||
cls.journal = cls.env["account.journal"].create(
|
||||
{"name": "Test journal", "code": "TEST", "type": "general"}
|
||||
)
|
||||
cls.payment_method_out = cls.env["account.payment.method"].create(
|
||||
{
|
||||
"name": "Test payment method",
|
||||
"code": "test",
|
||||
"payment_type": "outbound",
|
||||
"bank_account_required": True,
|
||||
}
|
||||
)
|
||||
cls.payment_mode = cls.env["account.payment.mode"].create(
|
||||
{
|
||||
"name": "Test payment mode",
|
||||
"fixed_journal_id": cls.journal.id,
|
||||
"bank_account_link": "variable",
|
||||
"payment_method_id": cls.env.ref(
|
||||
"account.account_payment_method_manual_in"
|
||||
).id,
|
||||
"payment_method_id": cls.payment_method_out.id,
|
||||
}
|
||||
)
|
||||
cls.partner = cls.env["res.partner"].create(
|
||||
@ -75,6 +81,7 @@ class TestAccountPaymentPurchase(SavepointCase):
|
||||
self.assertEqual(self.purchase.payment_mode_id, self.payment_mode)
|
||||
|
||||
def test_purchase_order_invoicing(self):
|
||||
self.purchase.onchange_partner_id()
|
||||
self.purchase.button_confirm()
|
||||
|
||||
invoice = self.env["account.move"].create(
|
||||
@ -113,10 +120,8 @@ class TestAccountPaymentPurchase(SavepointCase):
|
||||
# Test partner_bank
|
||||
product = self.env["product.product"].create({"name": "Test product"})
|
||||
self.purchase.order_line[0].product_id = product
|
||||
self.purchase.payment_mode_id = False
|
||||
self.purchase.supplier_partner_bank_id = self.bank
|
||||
self.purchase.button_confirm()
|
||||
|
||||
invoice = self.env["account.move"].create(
|
||||
{"partner_id": self.partner.id, "move_type": "in_invoice"}
|
||||
)
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
{
|
||||
"name": "Account Payment Purchase Stock",
|
||||
"version": "2.0.1.0.0",
|
||||
"version": "2.0.1.0.1",
|
||||
"category": "Banking addons",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Integrate Account Payment Purchase with Stock",
|
||||
|
@ -12,6 +12,7 @@ from flectra.addons.account_payment_purchase.tests.test_account_payment_purchase
|
||||
|
||||
class TestAccountPaymentPurchaseStock(TestAccountPaymentPurchase):
|
||||
def test_purchase_stock_order_invoicing(self):
|
||||
self.purchase.onchange_partner_id()
|
||||
self.purchase.button_confirm()
|
||||
picking = self.purchase.picking_ids[0]
|
||||
picking.action_confirm()
|
||||
@ -65,7 +66,6 @@ class TestAccountPaymentPurchaseStock(TestAccountPaymentPurchase):
|
||||
{"name": "Test stockable product", "type": "product"}
|
||||
)
|
||||
self.purchase.order_line[0].product_id = stockable_product
|
||||
self.purchase.payment_mode_id = False
|
||||
self.purchase.supplier_partner_bank_id = self.bank
|
||||
self.purchase.button_confirm()
|
||||
picking = self.purchase.picking_ids[0]
|
||||
|
Loading…
Reference in New Issue
Block a user