-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
> > Co-authored-by: Bernat Puig <[email protected]>
- Loading branch information
1 parent
f3339ba
commit 9449701
Showing
36 changed files
with
344 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 12 additions & 15 deletions
27
sign_oca/static/src/components/sign_oca_pdf/sign_oca_pdf_action.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,37 @@ | ||
/** @odoo-module **/ | ||
|
||
import AbstractAction from "web.AbstractAction"; | ||
import {ComponentWrapper} from "web.OwlCompatibility"; | ||
import {Component} from "@odoo/owl"; | ||
import {FormRenderer} from "@web/views/form/form_renderer"; | ||
import SignOcaPdf from "./sign_oca_pdf.esm.js"; | ||
import core from "web.core"; | ||
import {registry} from "@web/core/registry"; | ||
|
||
const SignOcaPdfAction = AbstractAction.extend({ | ||
className: "o_sign_oca_content", | ||
hasControlPanel: true, | ||
init: function (parent, action) { | ||
export class SignOcaPdfAction extends Component { | ||
init(parent, action) { | ||
this._super.apply(this, arguments); | ||
this.model = | ||
(action.params.res_model !== undefined && action.params.res_model) || | ||
action.context.params.res_model; | ||
this.res_id = | ||
(action.params.res_id !== undefined && action.params.res_id) || | ||
action.context.params.id; | ||
}, | ||
} | ||
async start() { | ||
await this._super(...arguments); | ||
this.component = new ComponentWrapper(this, SignOcaPdf, { | ||
this.component = new FormRenderer(this, SignOcaPdf, { | ||
model: this.model, | ||
res_id: this.res_id, | ||
updateControlPanel: this.updateControlPanel.bind(this), | ||
trigger: this.trigger_up.bind(this), | ||
}); | ||
return this.component.mount(this.$(".o_content")[0]); | ||
}, | ||
getState: function () { | ||
} | ||
getState() { | ||
var result = this._super(...arguments); | ||
result = _.extend({}, result, { | ||
res_model: this.model, | ||
res_id: this.res_id, | ||
}); | ||
return result; | ||
}, | ||
}); | ||
core.action_registry.add("sign_oca", SignOcaPdfAction); | ||
export default SignOcaPdfAction; | ||
} | ||
} | ||
registry.category("actions").add("sign_oca", SignOcaPdfAction); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sign_oca/static/src/components/sign_oca_pdf_common/sign_oca_pdf_common.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.