Eliminate Python dependency: embed frontend assets in odoo-go
- Copy all OWL frontend assets (JS/CSS/XML/fonts/images) into frontend/ directory (2925 files, 43MB) — no more runtime reads from Python Odoo - Replace OdooAddonsPath config with FrontendDir pointing to local frontend/ - Rewire bundle.go, static.go, templates.go, webclient.go to read from frontend/ instead of external Python Odoo addons directory - Auto-detect frontend/ and build/ dirs relative to binary in main.go - Delete obsolete Python helper scripts (tools/*.py) The Go server is now fully self-contained: single binary + frontend/ folder. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
99
frontend/sale/static/tests/tours/sale_signature.js
Normal file
99
frontend/sale/static/tests/tours/sale_signature.js
Normal file
@@ -0,0 +1,99 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
import { redirect } from "@web/core/utils/urls";
|
||||
|
||||
// This tour relies on data created on the Python test.
|
||||
registry.category("web_tour.tours").add('sale_signature', {
|
||||
url: '/my/quotes',
|
||||
steps: () => [
|
||||
{
|
||||
content: "open the test SO",
|
||||
trigger: 'a:text(test SO)',
|
||||
run: "click",
|
||||
expectUnloadPage: true,
|
||||
},
|
||||
{
|
||||
content: "click sign",
|
||||
trigger: 'a:contains("Sign")',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "clear the signature name",
|
||||
trigger: '.modal .o_web_sign_name_and_signature input',
|
||||
run: "clear",
|
||||
},
|
||||
{
|
||||
content: "check submit is disabled when name is empty",
|
||||
trigger: '.modal .o_portal_sign_submit:disabled',
|
||||
},
|
||||
{
|
||||
content: "reset signature name",
|
||||
trigger: '.modal .o_web_sign_name_and_signature input',
|
||||
run: "fill Joel Willis",
|
||||
},
|
||||
{
|
||||
content: "check submit is enabled",
|
||||
trigger: '.o_portal_sign_submit:enabled',
|
||||
},
|
||||
{
|
||||
trigger: ".modal .o_web_sign_name_and_signature input:value(Joel Willis)"
|
||||
},
|
||||
{
|
||||
trigger: ".modal canvas.o_web_sign_signature",
|
||||
run: "canvasNotEmpty",
|
||||
},
|
||||
{
|
||||
content: "click select style",
|
||||
trigger: '.modal .o_web_sign_auto_select_style button',
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "click style 4",
|
||||
trigger: ".o-dropdown-item:eq(3)",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "click submit",
|
||||
trigger: '.modal .o_portal_sign_submit:enabled',
|
||||
run: "click",
|
||||
expectUnloadPage: true,
|
||||
},
|
||||
{
|
||||
content: "check it's confirmed",
|
||||
trigger: '#quote_content:contains("Thank You")',
|
||||
run: "click",
|
||||
}, {
|
||||
trigger: '#quote_content',
|
||||
run: function () {
|
||||
redirect("/odoo");
|
||||
}, // Avoid race condition at the end of the tour by returning to the home page.
|
||||
expectUnloadPage: true,
|
||||
},
|
||||
{
|
||||
trigger: 'nav',
|
||||
}
|
||||
]});
|
||||
|
||||
registry.category("web_tour.tours").add("sale_signature_without_name", {
|
||||
steps: () => [
|
||||
{
|
||||
content: "Wait for interactions to load",
|
||||
trigger: `body[is-ready=true], :iframe body[is-ready=true]`,
|
||||
},
|
||||
{
|
||||
content: "Sign & Pay",
|
||||
trigger:
|
||||
".o_portal_sale_sidebar .btn-primary, :iframe .o_portal_sale_sidebar .btn-primary",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "click submit",
|
||||
trigger: ".o_portal_sign_submit:enabled, :iframe .o_portal_sign_submit:enabled",
|
||||
run: "click",
|
||||
},
|
||||
{
|
||||
content: "check error because no name",
|
||||
trigger:
|
||||
'.o_portal_sign_error_msg:contains("Signature is missing."), :iframe .o_portal_sign_error_msg:contains("Signature is missing.")',
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user