Skip to content

Commit b1b002e

Browse files
[MIG] export_async_schedule: Migration to 17.0
1 parent 8250263 commit b1b002e

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

export_async_schedule/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Scheduled Asynchronous Export",
66
"summary": "Generate and send exports by emails on a schedule",
7-
"version": "14.0.1.0.1",
7+
"version": "17.0.1.0.0",
88
"author": "Camptocamp, Odoo Community Association (OCA)",
99
"license": "AGPL-3",
1010
"website": "https://github.com/OCA/queue",

export_async_schedule/models/export_async_schedule.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ class ExportAsyncSchedule(models.Model):
6262
)
6363
end_of_month = fields.Boolean()
6464

65-
def name_get(self):
66-
result = []
65+
@api.depends("model_id", "ir_export_id")
66+
def _compute_display_name(self):
6767
for record in self:
68-
name = f"{record.model_id.name}: {record.ir_export_id.name}"
69-
result.append((record.id, name))
70-
return result
68+
record.display_name = f"{record.model_id.name}: {record.ir_export_id.name}"
7169

7270
def run_schedule(self):
7371
for record in self:

export_async_schedule/tests/test_export_async_schedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from odoo.addons.queue_job.tests.common import mock_with_delay
1111

1212

13-
class TestExportAsyncSchedule(common.SavepointCase):
13+
class TestExportAsyncSchedule(common.TransactionCase):
1414
@classmethod
1515
def setUpClass(cls):
1616
super().setUpClass()

export_async_schedule/views/export_async_schedule_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<field name="interval_unit" />
6969
<field
7070
name="end_of_month"
71-
attrs="{'invisible': [('interval_unit', '!=', 'months')]}"
71+
invisible="interval_unit != 'months'"
7272
/>
7373
</group>
7474
</group>

0 commit comments

Comments
 (0)