Skip to content

Commit a95fae8

Browse files
authored
Merge pull request #493 from itpp-labs/17.0-cleanup2
commit is created by 👷‍♂️ Merge Bot: https://odoo-devops.readthedocs.io/en/latest/git/github-merge-bot.html
2 parents 5f06013 + 4591e6e commit a95fae8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

sync/models/sync_order.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class SyncOrder(models.Model):
1717
required=True,
1818
)
1919
sync_job_id = fields.Many2one("sync.job")
20+
sync_job_state = fields.Selection(
21+
related="sync_job_id.state", string="Sync Job State"
22+
)
2023
description = fields.Html(related="sync_task_id.sync_order_description")
2124
line_ids = fields.One2many(
2225
"sync.order.line", "sync_order_id", string="Linked Records"

sync/views/sync_order_views.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
string="Refresh"
3232
name="action_refresh"
3333
type="object"
34-
invisible="state != 'open'"
34+
invisible="state == 'draft'"
3535
/>
3636
<button
3737
string="Cancel"
@@ -59,6 +59,7 @@
5959
</group>
6060
<group>
6161
<field name="sync_job_id" readonly="1" />
62+
<field name="sync_job_state" readonly="1" />
6263
</group>
6364
</group>
6465
<notebook>

0 commit comments

Comments
 (0)