Skip to content

Commit

Permalink
[FIX] sign_oca: Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PauBForgeFlow committed Feb 27, 2024
1 parent 8272680 commit 8d7729d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sign_oca/models/sign_oca_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class SignOcaRequest(models.Model):
def _compute_next_item_id(self):
for record in self:
record.next_item_id = (
record.signatory_data and max(record.signatory_data.keys()) or 0
record.signatory_data and int(max(record.signatory_data.keys())) or 0
) + 1

def get_info(self):
Expand Down Expand Up @@ -102,7 +102,7 @@ def _ensure_draft(self):

def configure(self):
self._ensure_draft()
self._set_action_log("configure")
self._set_action_log("view")

Check warning on line 105 in sign_oca/models/sign_oca_request.py

View check run for this annotation

Codecov / codecov/patch

sign_oca/models/sign_oca_request.py#L105

Added line #L105 was not covered by tests
return {
"type": "ir.actions.client",
"tag": "sign_oca_configure",
Expand Down
8 changes: 8 additions & 0 deletions sign_oca/views/sign_oca_request.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<field name="arch" type="xml">
<form create="0">
<header>
<button
name="sign"
class="btn btn-primary"
type="object"
string="Sign"
attrs="{'invisible': [('to_sign', '=', False)]}"
/>
<field name="to_sign" invisible="1" />
<button
string="Send"
type="object"
Expand Down

0 comments on commit 8d7729d

Please sign in to comment.