Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] sign_oca: Some fixes #18

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading