Skip to content

Commit

Permalink
[MIG] mig-account_payment_order: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
absal-smile committed Feb 7, 2025
1 parent 15ff039 commit 99c4600
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 39 deletions.
4 changes: 2 additions & 2 deletions account_payment_order/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ def create_account_payment_line(self):
if len(result_payorder_ids) == 1:
action.update(
{
"view_mode": "form,tree,pivot,graph",
"view_mode": "form,list,pivot,graph",
"res_id": payorder.id,
"views": False,
}
)
else:
action.update(
{
"view_mode": "tree,form,pivot,graph",
"view_mode": "list,form,pivot,graph",
"domain": _("[('id', 'in', %s)]") % list(result_payorder_ids),
"views": False,
}
Expand Down
2 changes: 1 addition & 1 deletion account_payment_order/models/account_payment_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def action_move_journal_line(self):
if self.move_count == 1:
action.update(
{
"view_mode": "form,tree,kanban",
"view_mode": "form,list,kanban",
"views": False,
"view_id": False,
"res_id": self.move_ids[0].id,
Expand Down
4 changes: 1 addition & 3 deletions account_payment_order/views/account_invoice_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@
/>
</button>
</div>
<field name="payment_mode_id" position="after">
<field name="payment_order_ok" invisible="1" />
</field>
<field name="payment_mode_id" position="after" />
<!-- First we place the rest of the elements for the new reference distribution -->
<field name="payment_reference" position="before">
<label for="payment_reference" />
Expand Down
20 changes: 4 additions & 16 deletions account_payment_order/views/account_payment_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<form string="Payment Lines">
<group name="main" col="2">
<group name="left">
<field name="state" invisible="1" />
<field name="company_id" invisible="1" />
<field
name="order_id"
invisible="not context.get('account_payment_line_main_view')"
Expand All @@ -31,7 +29,6 @@
domain="[('partner_id', '=', partner_id)]"
required="bank_account_required"
/>
<field name="bank_account_required" invisible="1" />
<field name="communication_type" />
<field name="communication" required="1" />
</group>
Expand All @@ -42,8 +39,6 @@
groups="base.group_multi_company"
/>
<field name="amount_company_currency" />
<field name="company_currency_id" invisible="1" />
<field name="payment_type" invisible="1" />
</group>
</group>
<group col="12" string="Payment Transaction">
Expand Down Expand Up @@ -73,7 +68,7 @@
<field name="name">account.payment.line.tree</field>
<field name="model">account.payment.line</field>
<field name="arch" type="xml">
<tree>
<list>
<field
name="order_id"
invisible="not context.get('account_payment_line_main_view')"
Expand All @@ -86,29 +81,22 @@
<field name="ml_maturity_date" optional="show" />
<field name="date" />
<field name="amount_currency" string="Amount" />
<field name="currency_id" invisible="1" />
<field name="name" optional="show" />
<field name="company_currency_id" invisible="1" />
<field
name="amount_company_currency"
sum="Total in Company Currency"
invisible="1"
/>
<field name="payment_type" invisible="1" />

<button
name="action_open_business_doc"
type="object"
string="View"
class="btn btn-secondary"
invisible="not move_line_id"
/>
</tree>
</list>
</field>
</record>
<record id="account_payment_line_action" model="ir.actions.act_window">
<field name="name">Payment Lines</field>
<field name="res_model">account.payment.line</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field name="context">{'account_payment_line_main_view': True}</field>
</record>
</odoo>
17 changes: 5 additions & 12 deletions account_payment_order/views/account_payment_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,11 @@
readonly="state != 'draft'"
domain="[('payment_order_ok', '=', True), ('payment_type', '=', payment_type)]"
/>
<field name="allowed_journal_ids" invisible="1" />
<field
name="journal_id"
readonly="state != 'draft'"
domain="[('id', 'in', allowed_journal_ids)]"
/>
<field name="bank_account_link" invisible="1" />
<field name="company_partner_bank_id" />
<field
name="company_id"
Expand Down Expand Up @@ -140,19 +138,15 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" />
<field name="activity_ids" widget="mail_activity" />
<field name="message_ids" widget="mail_thread" />
</div>
<chatter />
</form>
</field>
</record>
<record id="account_payment_order_tree" model="ir.ui.view">
<field name="name">account.payment.order.tree</field>
<field name="model">account.payment.order</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" decoration-bf="1" />
<field name="payment_mode_id" />
<field name="journal_id" />
Expand All @@ -165,7 +159,6 @@
string="Payment Transactions"
/>
<field name="total_company_currency" sum="Total Company Currency" />
<field name="company_currency_id" invisible="1" />
<field
name="state"
decoration-info="state == 'draft'"
Expand All @@ -175,7 +168,7 @@
decoration-muted="state == 'cancel'"
widget="badge"
/>
</tree>
</list>
</field>
</record>
<record id="account_payment_order_search" model="ir.ui.view">
Expand Down Expand Up @@ -262,14 +255,14 @@
<record id="account_payment_order_outbound_action" model="ir.actions.act_window">
<field name="name">Payment Orders</field>
<field name="res_model">account.payment.order</field>
<field name="view_mode">tree,form,pivot,graph</field>
<field name="view_mode">list,form,pivot,graph</field>
<field name="domain">[('payment_type', '=', 'outbound')]</field>
<field name="context">{'default_payment_type': 'outbound'}</field>
</record>
<record id="account_payment_order_inbound_action" model="ir.actions.act_window">
<field name="name">Debit Orders</field>
<field name="res_model">account.payment.order</field>
<field name="view_mode">tree,form,pivot,graph</field>
<field name="view_mode">list,form,pivot,graph</field>
<field name="domain">[('payment_type', '=', 'inbound')]</field>
<field name="context">{'default_payment_type': 'inbound'}</field>
</record>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<field name="arch" type="xml">
<form string="Choose Move Lines Filter Options">
<group name="main">
<field name="order_id" invisible="1" />
<field name="date_type" />
<field
name="move_date"
Expand Down Expand Up @@ -53,7 +52,6 @@
name="move_lines"
string="Selected Move Lines to Create Transactions"
>
<field name="move_line_domain" invisible="1" />
<field
name="move_line_ids"
nolabel="1"
Expand All @@ -62,7 +60,7 @@
domain="move_line_domain"
colspan="2"
>
<tree>
<list>
<field name="date" />
<field name="move_id" required="0" />
<field name="journal_id" />
Expand All @@ -74,8 +72,7 @@
<field name="amount_residual" sum="Total Residual" />
<field name="amount_currency" />
<field name="amount_residual_currency" />
<field name="company_currency_id" invisible="1" />
</tree>
</list>
</field>
</group>
<footer>
Expand Down

0 comments on commit 99c4600

Please sign in to comment.