From 1a258584f010b0961aea3b6257c6c5f7b3ee2bc2 Mon Sep 17 00:00:00 2001 From: Pierre Lafievre Date: Fri, 8 Sep 2023 11:17:16 +0200 Subject: [PATCH] F #6311: GOCA - add method to enable market Signed-off-by: Pierre Lafievre --- src/oca/go/src/goca/marketplace.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/oca/go/src/goca/marketplace.go b/src/oca/go/src/goca/marketplace.go index 6fbb26a4961..0943688f0c7 100644 --- a/src/oca/go/src/goca/marketplace.go +++ b/src/oca/go/src/goca/marketplace.go @@ -123,10 +123,17 @@ func (mc *MarketPlaceController) Delete() error { return err } +// Enable enables or disables a marketplace. +// * enable: True for enabling, False for disabling +func (mc *MarketPlaceController) Enable(enable bool) error { + _, err := mc.c.Client.Call("one.market.enable", mc.ID, enable) + return err +} + // Update adds marketplace content. -// * tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML. -// * uType: Update type: Replace: Replace the whole template. -// Merge: Merge new template with the existing one. +// - tpl: The new marketplace contents. Syntax can be the usual attribute=value or XML. +// - uType: Update type: Replace: Replace the whole template. +// Merge: Merge new template with the existing one. func (mc *MarketPlaceController) Update(tpl string, uType parameters.UpdateType) error { _, err := mc.c.Client.Call("one.market.update", mc.ID, tpl, uType) return err