Giter VIP home page Giter VIP logo

hexya's People

Contributors

npiganeau avatar rayman520 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hexya's Issues

Support Casbin as the authorization backend

Hi, Casbin is an authorization library that supports models like ACL, RBAC, ABAC.

Related to RBAC, Casbin has several advantages:

  1. roles can be cascaded, aka roles can have roles.
  2. support resource roles, so users have their roles and resource have their roles too. role = group here.
  3. the permission assignments (or policy in Casbin's language) can be persisted in files or database (MySQL and Cassandra).

And you can even customize your own access control model, for example, mix RBAC and ABAC together by using roles and attributes at the same time. It's very flexible.

Casbin can provide more flexibility and security than the current ACL. I can make PR if needed. Let me know if there's any question:) Thanks.

Some enhancement

-Support JSON data type as PostgreSQL (native support),
-Support PostgreSQL extensions (I want to use some extensions like timeseridb ...)
-Modules Pre_Init function:
Some modules need to setup some params before hexya start, but after read configuration.
If module call setup code inside module-init functions, it can not read/parse config. If call in module-Post_Init function, the server already started, so modules can not register new route (for gin).
For exam: I want to register an OAuth handler (http://host:post/auth/:provider), using params(path/ClientID/SecrectID) from config file.

hexya updatedb failed

I'm trying to install hexya demo project, with follwoing step
hexya installed fine
less installed fine
git clone https://github.com/hexya-erp/hexya-demo.git
cd hexya-demo
hexya generate . -c ./hexya.toml

All work fine until "hexya updatedb -c ./hexya.toml"
I got following errors :

Please wait, Hexya is starting ...
#github.com/hexya-erp/pool/q/account_account_tag
pool/q/account_account_tag/account_account_tag.go:118:28: undefined: models.NewFieldName
pool/q/account_account_tag/account_account_tag.go:125:28: undefined: models.NewFieldName
.... many similar error about models.NewFieldName

the postgres db is up and running, here are my hexya.toml configuration,

Modules = [
    "github.com/hexya-addons/account"
]
LogStdout = true
#LogFile = ""
LogLevel = "info"
Debug = true
Demo = true
DataDir = "./hexya-datadir"

[DB]
Driver = "postgres"
Host = "localhost"
Port = 5432
User = "dbuser"
Password = "dbuserpass"
Name = "hexya"
SSLMode = false
#SSLCert = ""
#SSLKey = ""
#SSLCA = ""

[Server]
Languages = ["all"]
#Interface = ""
Port = 8080
Domain = "localhost"
#Certificate = ""
#PrivateKey = ""

It seems models.NewFieldName not imported correctly ?

import error

Fetching https://golang.org/x/text/transform?go-get=1
https fetch failed: Get https://golang.org/x/text/transform?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/text/transform: unrecognized import path "golang.org/x/text/transform" (https fetch: Get https://golang.org/x/text/transform?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Fetching https://golang.org/x/text/unicode/norm?go-get=1
https fetch failed: Get https://golang.org/x/text/unicode/norm?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/text/unicode/norm: unrecognized import path "golang.org/x/text/unicode/norm" (https fetch: Get https://golang.org/x/text/unicode/norm?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Fetching https://golang.org/x/tools/go/loader?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/loader?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/loader: unrecognized import path "golang.org/x/tools/go/loader" (https fetch: Get https://golang.org/x/tools/go/loader?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

cant get past online demo and hexya updatedb for local demo is failing for me

i'm trying to get hexya-demo going in a windows 10 desktop environment but i've failed 4 times already.

i'm basically following what was discussed in #112,
except that i noticed that hexya-demo was updated dec 22, 2019 (the issue was posted november), and according to the go.mod file, it seems i have to use github.com/hexya-erp/hexya v0.0.43

of the 4 times i've tried, my first try reported errors similar to those reported in #112.
but i was using hexya v0.0.41 then.

after i switched to hexya v0.0.43, hexya updatedb -o -c ./hexya.toml always fails silently. (nothing printed in console)

before i start again, i make sure i start in a CLEAN environment (uninstall golang, delete various folders) but to no avail.

i notice that even the online demo is not working (i cant get past the login process).

any suggestion on what to do next?

should i just wait until perhaps a future update?

thanks!

Missing bigint data type.

In some case, we need bigint data type:

  • Store epoch time in milliseconds.
  • Store file size (use integer, we can only store max 2GB for file size)
    ...
    P/S:
    -I vote for change field type Integer, Many2One, One2One to "bigint"
    -DateTime to "timestamp with time zone"

Undefined: strutils.IsInStringSlice

Windows 10x64, PostgreSQL 11
on updatedb on hexya-demo got this errors:

$ hexya updatedb -o
Please wait, Hexya is starting ...
# github.com/hexya-addons/web/scripts
C:\Go\workspace\pkg\mod\github.com\hexya-addons\[email protected]\scripts\i18nUpdate.go:146:7: undefined: strutils.IsInStringSlice
# github.com/hexya-erp/pool/m
pool\m\account_account_tag.go:234:31: undefined: h
pool\m\account_tax.go:281:22: undefined: h
pool\m\account_tax.go:283:43: undefined: h
pool\m\account_tax.go:309:31: undefined: h
pool\m\account_tax.go:317:18: undefined: h
pool\m\account_tax.go:347:22: undefined: h
pool\m\account_tax.go:349:21: undefined: h
pool\m\account_tax.go:351:27: undefined: h
pool\m\account_tax.go:379:31: undefined: h
pool\m\account_tax_group.go:225:31: undefined: h
pool\m\account_tax.go:379:31: too many errors

You must call hexya module new from a project directory

Hi,

I'm getting the following error "You must call hexya module new from a project directory" when running the "hexya module new openacademy" from the tutorial. Windows 10, Go 1.15.6

Issue is in cmd/module.go:78
c := exec.Command("go", "list", "-f", "'{{ .Name }}")

Fixing the .Name like this works for me
c := exec.Command("go", "list", "-f", "'{{.Name}}'")

Which is equivalent to this
go list -f '{{.Name}}'

Config File "hexya" Not Found

hexya server -o
Config File "hexya" Not Found in "[/etc/hexya /home/gleke/.hexya /home/gleke/hexya]"

the configuration file needs to be created by yourself?

Underlying called using nil *Condition pointer

Can not change user's company:
Steps:

  1. Create company A
  2. Create new user, try to set 'Current Company' to company A. A popup warning appears:

value method github.com/hexya-erp/hexya/hexya/models.Condition.Underlying called using nil *Condition pointer

We can't write/update record.

Error while creating CSS assets file

When I run hexya server -o
Please wait, Hexya is starting ...

If I visit loclahost:8080
I got errors

2020/06/05 18:56:58 [Recovery] 2020/06/05 - 18:56:58 panic recovered:
Error while creating CSS assets file
error : unable to read input: write |1: broken pipe

.......

Demo site

Hi.
It is not bad if Hexya has a demo site for evaluation.

browser access error

1.when access the server at http://172.16.16.17:8080, browser having error...information

SyntaxError: expected expression, got '<'

http://172.16.16.17:8080/web/webclient/locale/en_US:4
Traceback:

2、using login and password loging web ,will having information
Traceback:
TypeError: Cannot read property 'getBoundingClientRect' of undefined
at computeFloatOuterWidthWithMargins (http://172.16.16.17:8080/static/web/src/js/core/dom.js:551:27)
at _adapt (http://172.16.16.17:8080/static/web/src/js/core/dom.js:540:35)
at Object.initAutoMoreMenu (http://172.16.16.17:8080/static/web/src/js/core/dom.js:474:9)
at http://172.16.16.17:8080/static/web/src/js/chrome/menu.js:72:17
at async Promise.all (index 2)
at async Promise.all (index 0)

Generate error, pool killed

I try install the hexya on ubuntu vps. The hexya command "hexya generate" returns a error:

Generating pool...Killed

Someone know why this error show up and the hexya don't complete the generating process?

Binary executable deploy?

We can not deploy hexya as binary executable when invoke hexya server (because of calling cleanModuleSymlinks/createModuleSymlinks ).
IMHO, cleanModuleSymlinks/createModuleSymlinks should be call when invoke hexya generate

Config file was not read correctly.

Run hexya -c config_file_name not work.
Reason: Corbra parses command line args when call Execute() method.
How to fix:
Modify cmd/hexya.go

  1. In func init(), add cobra.OnInitialize(initConfig)
  2. Add function
func initConfig() {
	cfgFile := viper.GetString("ConfigFileName")
	// Read config either from cfgFile or from home directory!
	viper.AddConfigPath("/etc/hexya/")
	viper.AddConfigPath("$HOME/.hexya")
	viper.AddConfigPath(".")
	if cfgFile == "" {
		cfgFile = "hexya"
	}
	viper.SetConfigFile(cfgFile)
	viper.ReadInConfig()
}

Make Hexya deployable through an executable bundle, can not found hexya/pool

I run hexya updatedb -o, but report error:

hexya updatedb -o
Please wait, Hexya is starting ...
../hexya-base/base/000hexya.go:22:2: cannot find package "github.com/hexya-erp/hexya/pool/h" in any of:
/opt/go/src/github.com/hexya-erp/hexya/pool/h (from $GOROOT)
/opt/work/go/src/github.com/hexya-erp/hexya/pool/h (from $GOPATH)
../hexya-base/base/attachment.go:23:2: cannot find package "github.com/hexya-erp/hexya/pool/q" in any of:
/opt/go/src/github.com/hexya-erp/hexya/pool/q (from $GOROOT)
/opt/work/go/src/github.com/hexya-erp/hexya/pool/q (from $GOPATH)

Hexya community

Hello Nicolas,

First of all I would like to congratulate you on your effort and your approach on Hexya.
I couldn't agree more on the latter and your choices with regards to the licenses.

I was a bit taken aback you seem to be doing this alone. Kudos to you!

Would you consider letting the community help?
Should you want to do so, would you consider documenting the project or a wiki a bit more?
We'd probably need guidelines and a bit more in-depth guidance and a channel to discuss topics.

I personally have no experience in Go but do have a few years of enterprise programming in my backpack. Provided there are units of work that I could work on, I'm ready to commit a bit of code every once in a while.

Thank you for your time and good luck with this endeavour.

Soriyath

hexya generate did not work completely in ubuntu, but windows and mac is ok.

hexya generate did not work completely. go mod is correct (in particular the 'replace' directive), but the pool package is not generated as it should.

hexya generate .

module github.com/myusername/myhexyaproject

go 1.14

replace github.com/hexya-erp/pool v1.0.2 => /home/gleke/hexya/myproject/pool

require (
        github.com/hexya-addons/web v0.1.7
        github.com/hexya-erp/hexya v0.1.7
        github.com/spf13/cobra v0.0.5
)

pool

gleke@gleke-QTJ5:~/hexya/myproject$ cd pool
gleke@gleke-QTJ5:~/hexya/myproject/pool$ ls
go.mod  h  m  q
gleke@gleke-QTJ5:~/hexya/myproject/pool$ 
go.mod

// This file is autogenerated by hexya-generate
// DO NOT MODIFY THIS FILE - ANY CHANGES WILL BE OVERWRITTEN

module github.com/hexya-erp/pool
gleke@gleke-QTJ5:~/hexya/myproject/pool$ cd h
gleke@gleke-QTJ5:~/hexya/myproject/pool/h$ ls
temp.go
gleke@gleke-QTJ5:~/hexya/myproject/pool/h$ cd m
temp.go

// This file is autogenerated by hexya-generate
// DO NOT MODIFY THIS FILE - ANY CHANGES WILL BE OVERWRITTEN

package h

hexya generate did not work completely in ubuntu, but windows and mac is ok.

func loadProgram(targetPaths []string) ([]*packages.Package, error) {
	conf := packages.Config{
		Mode: packages.LoadAllSyntax,
	}
	fmt.Println("loadProgram()------------")
	fmt.Println(targetPaths)
	fmt.Println(conf)
	packs, err := packages.Load(&conf, targetPaths...)
	fmt.Println(packs)
	return packs, err
}

log in windows

c:\hexya-demo>hexya generate .
Hexya Generate
        --------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...loadProgram()------------
[github.com/hexya-addons/web]
{991 <nil> <nil>  [] [] <nil> <nil> false map[]}
[github.com/hexya-addons/web]
[github.com/hexya-addons/web]

log in ubuntu

gleke@meet:~/mytest$ hexya generate .
Hexya Generate
	--------------
Modules paths:
 - github.com/hexya-addons/web
1/5 - Loading program...loadProgram()------------
[github.com/hexya-addons/web]
{991 <nil> <nil>  [] [] <nil> <nil> false map[]}
[command-line-arguments]
[command-line-arguments]
Ok

packages.Load return is [command-line-arguments] in ubuntu,why?

Project still active?

Hi there. Is the project still active? Last commit was a year ago and the demo link in the repo is broken.

Make Hexya deployable through an executable bundle

Hi,
Hexya can not run with user other than build user.
I build hexya with user A, then run with user B, or user root (for AutoTLS using port 80), hexya crash with error:
panic: Error while getting Hexya root path: cannot find package "github.com/hexya-erp/hexya"

Docker Demo doesn't work

hexya_1  | Config File "hexya" Not Found in "[/etc/hexya /root/.hexya /go]"
hexya_1  | Hexya Generate
hexya_1  | --------------
hexya_1  | Detected Hexya root directory at /go/src/github.com/hexya-erp/hexya.
hexya_1  | Modules paths:
hexya_1  |  - github.com/hexya-erp/hexya-addons/sale
hexya_1  | Loading program...Ok
hexya_1  | Generating symlinks...Ok
hexya_1  | Generating pool...Ok
hexya_1  | Checking the generated code...FAIL
hexya_1  | couldn't load packages due to errors: net, os/user
hexya_1  |
hexya_1  | 2 - Updating db...
hexya_1  | Config File "hexya" Not Found in "[/etc/hexya /root/.hexya /go]"
hexya_1  | Please wait, Hexya is starting ...
hexya_1  | go build github.com/hexya-erp/hexya/pool/h: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed
hexya_1  |
hexya_1  | 3 - Starting server...
hexya_1  | Config File "hexya" Not Found in "[/etc/hexya /root/.hexya /go]"
hexya_1  | Please wait, Hexya is starting ...
hexya_1  | go build github.com/hexya-erp/hexya/pool/h: /usr/local/go/pkg/tool/linux_amd64/compile: signal: killed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.