Skip to content

Commit

Permalink
Add support for field 'summary' to manifest wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
katyukha committed Dec 3, 2023
1 parent d7c87a4 commit c3d1694
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions subpackages/cli/source/odood/cli/commands/addons.d
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ class CommandAddonsList: OdoodCommand {
case "name":
row ~= [addon.manifest.name];
break;
case "summary":
row ~= [addon.manifest.summary];
break;
case "version":
row ~= [addon.manifest.module_version.toString];
break;
Expand Down
5 changes: 4 additions & 1 deletion subpackages/utils/source/odood/utils/addons/addon_manifest.d
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ struct OdooAddonManifest {
}

string name;
string summary;
OdooAddonVersion module_version = OdooAddonVersion("1.0");
string author;
string category;
string description;
string license;
string license="LGPL-3";
string maintainer;

bool auto_install=false;
Expand Down Expand Up @@ -78,6 +79,8 @@ auto parseOdooManifest(in string manifest_content) {
// thus there is no need to call Py_DecRef from our side
if (auto val = PyDict_GetItemString(parsed, "name".toStringz))
manifest.name = val.convertPyToD!string;
if (auto val = PyDict_GetItemString(parsed, "summary".toStringz))
manifest.summary = val.convertPyToD!string;
if (auto val = PyDict_GetItemString(parsed, "version".toStringz))
manifest.module_version = OdooAddonVersion(val.convertPyToD!string);
if (auto val = PyDict_GetItemString(parsed, "author".toStringz))
Expand Down

0 comments on commit c3d1694

Please sign in to comment.