Skip to content

Commit

Permalink
[MIG] edi_voxel_account_invoice_oca: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoRomera committed Aug 6, 2024
1 parent 35f675b commit f607e23
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 66 deletions.
2 changes: 1 addition & 1 deletion edi_voxel_account_invoice_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Voxel account invoice oca",
"summary": "Sends account invoices to Voxel.",
"version": "15.0.1.0.2",
"version": "17.0.1.0.0",
"development_status": "Production/Stable",
"category": "Accounting & Finance",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class TestVoxelAccountInvoice(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestVoxelAccountInvoice, cls).setUpClass()
super().setUpClass()
cls.env = cls.env(
context=dict(
cls.env.context,
Expand Down Expand Up @@ -62,7 +62,7 @@ def setUpClass(cls):
)
cls.env["product.customerinfo"].create(
{
"name": partner.id,
"partner_id": partner.id,
"product_tmpl_id": product_1.product_tmpl_id.id,
"product_id": product_1.id,
"product_code": "1234567891234",
Expand Down
37 changes: 13 additions & 24 deletions edi_voxel_account_invoice_oca/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,29 @@
<field name="name">account.move.form.inherit</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field
name="groups_id"
eval="[(4, ref('edi_voxel_oca.group_voxel_manager'))]"
/>
<field name="arch" type="xml">
<header position="inside">
<button
name="action_send_to_voxel"
type="object"
string="Send to Voxel"
attrs="{'invisible': [
'|',
('move_type', 'not in', ['out_invoice', 'out_refund']),
('state', '!=', 'posted'),
]}"
invisible="move_type not in ['out_invoice', 'out_refund'] or state != 'posted'"
/>
</header>
<notebook position="inside">
<field name="voxel_enabled" invisible="1" />
<page
string="Voxel"
attrs="{'invisible': [('voxel_enabled', '!=', True)]}"
invisible="not voxel_enabled"
groups="edi_voxel_oca.group_voxel_manager"
>
<group>
<field name="voxel_state" />
</group>
<group
name="group_voxel_processing_error"
colspan="8"
attrs="{'invisible': [('processing_error', '=', False)]}"
invisible="not processing_error"
>
<field name="processing_error" />
</group>
Expand All @@ -56,23 +49,23 @@
name="voxel_requeue_sudo"
string="Requeue"
class="oe_highlight"
attrs="{'invisible': [('state', '!=', 'failed')]}"
invisible="state != 'failed'"
/>
<button
type="object"
name="voxel_cancel_now"
string="Cancel sending"
class="oe_highlight_cancel"
icon="fa-times-circle"
attrs="{'invisible': [('state', 'not in', ['pending','enqueued'])]}"
invisible="state not in ['pending','enqueued']"
/>
<button
type="object"
name="voxel_do_now"
string="Send now"
class="oe_highlight"
icon="fa-fighter-jet"
attrs="{'invisible': ['|', ('state', '!=', 'pending'), ('eta', '=', False)]}"
invisible="state != 'pending' or (not eta)"
/>
</tree>
</field>
Expand All @@ -81,13 +74,10 @@
<page
string="Voxel XML report"
name="page_voxel_report"
attrs="{'invisible': [('voxel_xml_report', '=', False)]}"
invisible="not voxel_xml_report"
>
<group name="group_voxel_report">
<group
colspan="8"
attrs="{'invisible': [('voxel_filename', '=', False)]}"
>
<group colspan="8" invisible="not voxel_filename">
<field name="voxel_filename" />
</group>
<group colspan="8">
Expand All @@ -109,13 +99,12 @@
<field name="name">account.invoice.select.inherit</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter" />
<field
name="groups_id"
eval="[(4, ref('edi_voxel_oca.group_voxel_manager'))]"
/>
<field name="arch" type="xml">
<filter name="late" position="before">
<group string="Voxel filters">
<group
string="Voxel filters"
groups="edi_voxel_oca.group_voxel_manager"
>
<separator />
<filter
name="voxel_not_sent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@
<field name="name">res.config.settings.view.form.voxel.invoice</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="edi_voxel_oca.res_config_settings_view_form" />
<field
name="groups_id"
eval="[(4, ref('edi_voxel_oca.group_voxel_manager'))]"
/>
<field name="arch" type="xml">
<xpath expr="//div[@name='voxel_login_config']" position="inside">
<div class="row mt16">
<div class="row mt16" groups="edi_voxel_oca.group_voxel_manager">
<label
for="voxel_invoice_login_id"
class="col-lg-3 o_light_label"
Expand Down

0 comments on commit f607e23

Please sign in to comment.