Siwapp -> SAGA

148 views
Skip to first unread message

ytz chaim

unread,
Jun 11, 2014, 7:42:25 AM6/11/14
to siwap...@googlegroups.com
Hi There, 

Can anyone help me to add New Module  ?

What I have to do:

1. Add a new module to Siwapp called "Group". 

Reason: Add Group for the Customer Module.

2. Add a new module to Siwapp called "Company". 
Reason: Add Company for the Customer Module.

Example :
                    Group --
                          Company --
                                Customer --


Thank you very much in advanced also I could help back ($).

ytzchaim

 

Sergi Almacellas Abellana

unread,
Jun 11, 2014, 7:46:16 AM6/11/14
to siwap...@googlegroups.com
El 11/06/14 13:42, ytz chaim ha escrit:
Hi There, 

Can anyone help me to add New Module  ?

What I have to do:

1. Add a new module to Siwapp called "Group". 

Reason: Add Group for the Customer Module.

2. Add a new module to Siwapp called "Company". 
Reason: Add Company for the Customer Module.

Example :
                    Group --
                          Company --
                                Customer --
I have a fork that has similar structure. It adds the company model but not the Group.

It's available on github, so feel free to review and comment:

https://github.com/btactic/siwapp

Also PR are welcome :)

-- 
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

ytz chaim

unread,
Jun 11, 2014, 8:01:01 AM6/11/14
to siwap...@googlegroups.com
Thank you very much for you reply.

I appreciated that.

All best,

ytzchaim   

ytz chaim

unread,
Jun 12, 2014, 3:04:46 AM6/12/14
to siwap...@googlegroups.com
Hi Sergi,

I got some errors on database during the instalations. Have you got any idea ?

  • There were some sql errors creating the database.
  • Specified key was too long; max key length is 767 bytes :: CREATE TABLE item (id BIGINT AUTO_INCREMENT, company_id BIGINT, quantity DECIMAL(53, 15) DEFAULT 1 NOT NULL, discount DECIMAL(53, 2) DEFAULT 0 NOT NULL, common_id BIGINT, product_id BIGINT, expense_type_id BIGINT, description varchar(8000), unitary_cost DECIMAL(53, 15) DEFAULT 0 NOT NULL, INDEX desc_idx (company_id, description), INDEX company_id_idx (company_id), INDEX common_id_idx (common_id), INDEX product_id_idx (product_id), INDEX expense_type_id_idx (expense_type_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = INNODB
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_product_id_product_id FOREIGN KEY (product_id) REFERENCES product(id) ON DELETE SET NULL
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_expense_type_id_expense_type_id FOREIGN KEY (expense_type_id) REFERENCES expense_type(id) ON DELETE SET NULL
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_company_id_company_id FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE CASCADE
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_common_id_common_id FOREIGN KEY (common_id) REFERENCES common(id) ON DELETE CASCADE

It works fine but the Product - view goes to 500 error.

Thank you very much indeed. 

ytzchaim


On Wednesday, 11 June 2014 12:46:16 UTC+1, Sergi Almacellas Abellana wrote:

Sergi Almacellas Abellana

unread,
Jun 12, 2014, 3:59:02 AM6/12/14
to siwap...@googlegroups.com
El 12/06/14 09:04, ytz chaim ha escrit:
Hi Sergi,

I got some errors on database during the instalations. Have you got any idea ?

  • There were some sql errors creating the database.
  • Specified key was too long; max key length is 767 bytes :: CREATE TABLE item (id BIGINT AUTO_INCREMENT, company_id BIGINT, quantity DECIMAL(53, 15) DEFAULT 1 NOT NULL, discount DECIMAL(53, 2) DEFAULT 0 NOT NULL, common_id BIGINT, product_id BIGINT, expense_type_id BIGINT, description varchar(8000), unitary_cost DECIMAL(53, 15) DEFAULT 0 NOT NULL, INDEX desc_idx (company_id, description), INDEX company_id_idx (company_id), INDEX common_id_idx (common_id), INDEX product_id_idx (product_id), INDEX expense_type_id_idx (expense_type_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = INNODB
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_product_id_product_id FOREIGN KEY (product_id) REFERENCES product(id) ON DELETE SET NULL
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_expense_type_id_expense_type_id FOREIGN KEY (expense_type_id) REFERENCES expense_type(id) ON DELETE SET NULL
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_company_id_company_id FOREIGN KEY (company_id) REFERENCES company(id) ON DELETE CASCADE
  • Table 'system.item' doesn't exist :: ALTER TABLE item ADD CONSTRAINT item_common_id_common_id FOREIGN KEY (common_id) REFERENCES common(id) ON DELETE CASCADE


It seems that your mysql version doesn't support the 8000 chars on the description fields, so i will encourage you to manually reduce the size of the field and try again.
It works fine but the Product - view goes to 500 error.
Because the product table has not been created correctly :)

ytz chaim

unread,
Jun 12, 2014, 5:10:52 AM6/12/14
to siwap...@googlegroups.com
Gracias .. Boss

ytz chaim

unread,
Jul 4, 2014, 8:09:06 AM7/4/14
to siwap...@googlegroups.com
Hi Sergi, 

I hope you are well.
May ask you where Can I put new field in product (edit,index) 

I tried putted in :
BaseProduct.class.php 

Thank you very much indeed.

ytz

Sergi Almacellas Abellana

unread,
Jul 4, 2014, 10:51:19 AM7/4/14
to siwap...@googlegroups.com
El 04/07/14 14:09, ytz chaim ha escrit:
Hi Sergi, 

I hope you are well.
May ask you where Can I put new field in product (edit,index) 

I tried putted in :
BaseProduct.class.php 

You must add in the schema.yml file and generate all the classes (Models, Forms, Filters) with the symfony command:
php symfony doctrine:build-all

Have a look at:
http://symfony.com/legacy/doc/gentle-introduction/1_4/en/08-Inside-the-Model-Layer-Doctrine

Thank you very much indeed.
You're welcome!

ytz chaim

unread,
Jul 24, 2014, 7:03:40 AM7/24/14
to siwap...@googlegroups.com
Hi Sergi,

All fine ? Let me ask you, as did as you told me :

insert at schema.yml 

    rice: {type: decimal(53), scale: 2, notnull: true, default: 0}

after i ruined command -> php symphony build --all ( done!)

Later l cleaned the cache but I can't have access the system.
I tried put the login and password and doesn't work..

Do you mind give some suggests ?

Gracias Sergi 

ytz

Sergi Almacellas Abellana

unread,
Jul 24, 2014, 7:05:49 AM7/24/14
to siwap...@googlegroups.com
El 24/07/14 13:03, ytz chaim ha escrit:
> Hi Sergi,
>
> All fine ? Let me ask you, as did as you told me :
>
> insert at schema.yml
>
> rice: {type: decimal(53), scale: 2, notnull: true, default: 0}
>
> after i ruined command -> php symphony build --all ( done!)
>
> Later l cleaned the cache but I can't have access the system.
> I tried put the login and password and doesn't work..
>
> Do you mind give some suggests ?
>
Just recreate the database and that will do the trick!

ytz chaim

unread,
Jul 24, 2014, 8:40:59 AM7/24/14
to siwap...@googlegroups.com
Thank you very much for your answer ..

Unfortunately I am not able to login on  as admin , I tried all ( exclude database, reinstall the siwapp, put the new field manually but until now i didn't reach successful.  Any mistake in my process ? Thank you very much indeed.

ytz
Reply all
Reply to author
Forward
0 new messages