Automatic Update form OCA2FC Migrator

This commit is contained in:
Flectra Community Bot 2021-12-12 03:12:37 +00:00 committed by OCA2FC Migrator Bot
parent 9fe6153f46
commit 11ffe54da3
9 changed files with 22 additions and 15 deletions

View File

@ -9,18 +9,18 @@ Available addons
addon | version | summary 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_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_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_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_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_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_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_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_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_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 [account_payment_order_return](account_payment_order_return/) | 2.0.1.0.1| Account Payment Order Return

View File

@ -6,7 +6,7 @@
{ {
"name": "Account Payment Partner", "name": "Account Payment Partner",
"version": "2.0.1.3.2", "version": "2.0.1.3.3",
"category": "Banking addons", "category": "Banking addons",
"license": "AGPL-3", "license": "AGPL-3",
"summary": "Adds payment mode on partners and invoices", "summary": "Adds payment mode on partners and invoices",

View File

@ -11,12 +11,14 @@ class ResPartner(models.Model):
supplier_payment_mode_id = fields.Many2one( supplier_payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode", comodel_name="account.payment.mode",
company_dependent=True, company_dependent=True,
check_company=True,
domain="[('payment_type', '=', 'outbound')]", domain="[('payment_type', '=', 'outbound')]",
help="Select the default payment mode for this supplier.", help="Select the default payment mode for this supplier.",
) )
customer_payment_mode_id = fields.Many2one( customer_payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode", comodel_name="account.payment.mode",
company_dependent=True, company_dependent=True,
check_company=True,
domain="[('payment_type', '=', 'inbound')]", domain="[('payment_type', '=', 'inbound')]",
help="Select the default payment mode for this customer.", help="Select the default payment mode for this customer.",
) )

View File

@ -10,7 +10,7 @@
<span t-field="o.payment_mode_id.note" /> <span t-field="o.payment_mode_id.note" />
</p> </p>
<t t-if="o.payment_mode_id and o.payment_mode_id.show_bank_account != 'no'"> <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> <strong>Bank Account:</strong>
<t t-if="partner_bank.bank_id"> <t t-if="partner_bank.bank_id">
<t <t

View File

@ -4,7 +4,7 @@
{ {
"name": "Account Payment Purchase", "name": "Account Payment Purchase",
"version": "2.0.1.0.0", "version": "2.0.1.0.1",
"category": "Banking addons", "category": "Banking addons",
"license": "AGPL-3", "license": "AGPL-3",
"summary": "Adds Bank Account and Payment Mode on Purchase Orders", "summary": "Adds Bank Account and Payment Mode on Purchase Orders",

View File

@ -13,14 +13,14 @@ class AccountMove(models.Model):
new_mode = self.purchase_id.payment_mode_id.id or False new_mode = self.purchase_id.payment_mode_id.id or False
new_bank = self.purchase_id.supplier_partner_bank_id.id or False new_bank = self.purchase_id.supplier_partner_bank_id.id or False
res = super()._onchange_purchase_auto_complete() or {} 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"] = { res["warning"] = {
"title": _("Warning"), "title": _("Warning"),
"message": _("Selected purchase order have different payment mode."), "message": _("Selected purchase order have different payment mode."),
} }
return res return res
self.payment_mode_id = new_mode 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"] = { res["warning"] = {
"title": _("Warning"), "title": _("Warning"),
"message": _("Selected purchase order have different supplier bank."), "message": _("Selected purchase order have different supplier bank."),

View File

@ -13,14 +13,20 @@ class TestAccountPaymentPurchase(SavepointCase):
cls.journal = cls.env["account.journal"].create( cls.journal = cls.env["account.journal"].create(
{"name": "Test journal", "code": "TEST", "type": "general"} {"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( cls.payment_mode = cls.env["account.payment.mode"].create(
{ {
"name": "Test payment mode", "name": "Test payment mode",
"fixed_journal_id": cls.journal.id, "fixed_journal_id": cls.journal.id,
"bank_account_link": "variable", "bank_account_link": "variable",
"payment_method_id": cls.env.ref( "payment_method_id": cls.payment_method_out.id,
"account.account_payment_method_manual_in"
).id,
} }
) )
cls.partner = cls.env["res.partner"].create( cls.partner = cls.env["res.partner"].create(
@ -75,6 +81,7 @@ class TestAccountPaymentPurchase(SavepointCase):
self.assertEqual(self.purchase.payment_mode_id, self.payment_mode) self.assertEqual(self.purchase.payment_mode_id, self.payment_mode)
def test_purchase_order_invoicing(self): def test_purchase_order_invoicing(self):
self.purchase.onchange_partner_id()
self.purchase.button_confirm() self.purchase.button_confirm()
invoice = self.env["account.move"].create( invoice = self.env["account.move"].create(
@ -113,10 +120,8 @@ class TestAccountPaymentPurchase(SavepointCase):
# Test partner_bank # Test partner_bank
product = self.env["product.product"].create({"name": "Test product"}) product = self.env["product.product"].create({"name": "Test product"})
self.purchase.order_line[0].product_id = 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.supplier_partner_bank_id = self.bank
self.purchase.button_confirm() self.purchase.button_confirm()
invoice = self.env["account.move"].create( invoice = self.env["account.move"].create(
{"partner_id": self.partner.id, "move_type": "in_invoice"} {"partner_id": self.partner.id, "move_type": "in_invoice"}
) )

View File

@ -4,7 +4,7 @@
{ {
"name": "Account Payment Purchase Stock", "name": "Account Payment Purchase Stock",
"version": "2.0.1.0.0", "version": "2.0.1.0.1",
"category": "Banking addons", "category": "Banking addons",
"license": "AGPL-3", "license": "AGPL-3",
"summary": "Integrate Account Payment Purchase with Stock", "summary": "Integrate Account Payment Purchase with Stock",

View File

@ -12,6 +12,7 @@ from flectra.addons.account_payment_purchase.tests.test_account_payment_purchase
class TestAccountPaymentPurchaseStock(TestAccountPaymentPurchase): class TestAccountPaymentPurchaseStock(TestAccountPaymentPurchase):
def test_purchase_stock_order_invoicing(self): def test_purchase_stock_order_invoicing(self):
self.purchase.onchange_partner_id()
self.purchase.button_confirm() self.purchase.button_confirm()
picking = self.purchase.picking_ids[0] picking = self.purchase.picking_ids[0]
picking.action_confirm() picking.action_confirm()
@ -65,7 +66,6 @@ class TestAccountPaymentPurchaseStock(TestAccountPaymentPurchase):
{"name": "Test stockable product", "type": "product"} {"name": "Test stockable product", "type": "product"}
) )
self.purchase.order_line[0].product_id = stockable_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.supplier_partner_bank_id = self.bank
self.purchase.button_confirm() self.purchase.button_confirm()
picking = self.purchase.picking_ids[0] picking = self.purchase.picking_ids[0]