Skip to content

Commit

Permalink
Merge PR #18 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 5, 2024
2 parents dc2fdee + 3a807ee commit 7c7a030
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sign_oca/models/sign_oca_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ 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 max([int(key) for key in record.signatory_data.keys()])
or 0
) + 1

@api.depends_context("uid")
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 7c7a030

Please sign in to comment.