Skip to content

Commit

Permalink
[MIG] internal_transfer_with_agreed_amount: Migrate module from v12.0…
Browse files Browse the repository at this point in the history
… to v16.0

- Update module version
- Update button name in the account payment views
- Remove update_posted field from account journal references in test
- Update act_window to field
  • Loading branch information
CLaurelB committed Aug 10, 2023
1 parent 473a7aa commit 8af7e4b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion internal_transfer_with_agreed_amount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Internal transfers with an agreed amount",
"version": "12.0.1.0.0",
"version": "16.0.1.0.0",
"author": "Vauxoo",
"website": "http://www.vauxoo.com/",
"license": "OPL-1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ def setUpClass(cls):
cls.currency_usd = cls.env.ref("base.USD")
cls.currency_eur = cls.env.ref("base.EUR")
cls.bank_journal_usd = cls.env["account.journal"].create(
{"name": "Bank US", "type": "bank", "code": "BNK68", "update_posted": True}
{"name": "Bank US", "type": "bank", "code": "BNK68"}
)
cls.bank_journal_eur = cls.env["account.journal"].create(
{
"name": "Bank EUR",
"type": "bank",
"code": "BNK67",
"currency_id": cls.currency_eur.id,
"update_posted": True,
}
)
cls.payment_method_manual = cls.env.ref("account.account_payment_method_manual_in")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form" />
<field name="arch" type="xml">
<xpath expr="//button[@name='post']" position="after">
<xpath expr="//button[@name='action_post']" position="after">
<button
name="%(action_internal_transfer_multicurrency)d"
type="action"
class="oe_highlight"
string="Confirm with an agreed amount"
groups="internal_transfer_with_agreed_amount.allow_confirm_internal_transfer_with_agreed_amount"
groups="internal_transfer_with_agreed_amount.module_category_usability"
attrs="{'invisible':['|', ('payment_type','!=','transfer'), ('state', '!=', 'draft')]}"
/>
<button
name="%(action_internal_transfer_multicurrency)d"
type="action"
class="oe_highlight"
string="Edit agreed amount"
groups="internal_transfer_with_agreed_amount.allow_confirm_internal_transfer_with_agreed_amount"
groups="internal_transfer_with_agreed_amount.module_category_usability"
attrs="{'invisible':['|', ('payment_type','!=','transfer'), ('state', 'in', ('draft', 'cancelled'))]}"
/>
</xpath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
</field>
</record>

<act_window
id="action_internal_transfer_multicurrency"
name="Specify the agreed amount"
res_model="internal.transfer.multicurrency"
view_mode="form"
target="new"
/>
<record id="action_internal_transfer_multicurrency" model="ir.actions.act_window">
<field name="name">Specify the agreed amount</field>
<field name="res_model">internal.transfer.multicurrency</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>

0 comments on commit 8af7e4b

Please sign in to comment.