Re: [tryton] Proteus

2018-01-11 Thread Cato Nano
Il giorno giovedì 11 gennaio 2018 16:41:36 UTC+1, Sergi Almacellas Abellana ha 
scritto:
> El 11/01/18 a les 16:23, Cato Nano ha escrit:
> > 
> > I think Mathis is referring to my own Tryton module
> > 
> > He saw the path to my module in the stacktrace
> > 
> > Now I' m not sure I understand
> > 
> > Can't the Debian provided Proteus be used for developing your own Tryton 
> > modules? 
> > 
> > Does it only work with Debian provided modules ?
> 
> As far as your module is importable from the debian python interpreter
> it will work without problems.
> 
> How do you installed your module?
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

Sergi

thank you so much for your concern

I changed solution

I installed all with viertualenv and pip

For the server pip3, python3 and for the client pip2, python2 and a virtualenv 
that can access the pygtk provided by the local operating system (pygtk doesn' 
t install plainly so the one provided by the system is preferable)

I opened a python console and imported proteus a second ago and it works like a 
charm

I had stuck to the apt provided packages because I had assumed that they were 
reliable

I was wrong (to say at least)

Starting tomorrow I' ll try to debug my calculated field

Ugh !

Thank you so much to all of you for your help
Starting tomorrow I' ll try

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/e0f69a21-83f5-42c8-9916-81716b4eba3e%40googlegroups.com.


Re: [tryton] Proteus

2018-01-11 Thread Sergi Almacellas Abellana
El 11/01/18 a les 16:23, Cato Nano ha escrit:
> 
> I think Mathis is referring to my own Tryton module
> 
> He saw the path to my module in the stacktrace
> 
> Now I' m not sure I understand
> 
> Can't the Debian provided Proteus be used for developing your own Tryton 
> modules? 
> 
> Does it only work with Debian provided modules ?

As far as your module is importable from the debian python interpreter
it will work without problems.

How do you installed your module?

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

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/79744f7b-9c0f-485a-bd0f-d7104a4e539a%40koolpi.com.


Re: [tryton] Proteus

2018-01-11 Thread Cato Nano
Il giorno giovedì 11 gennaio 2018 15:00:06 UTC+1, Cédric Krier ha scritto:
> On 2018-01-11 13:38, Mathias Behrle wrote:
> > * Cédric Krier: " Re: [tryton] Proteus" (Thu, 11 Jan 2018 01:07:32 +0100):
> > 
> > > On 2018-01-10 11:52, Cato Nano wrote:
> > > > When called from within a python3 prompt, Proteus gets found
> > > > 
> > > > But this time xmlrpclib is missing
> > > > 
> > > > Also, xmlrpclib is not declared as a dependency in the Proteus setup.py
> > > > file  
> > > 
> > > xmlrpclib is a standard library of Python so it should not be declared
> > > as dependency.
> > > But indeed xmlrpclib is the name for Python2, in Python3 it should be
> > > xmlrpc.
> > > Normally, when installing proteus with Python3, the code is transformed
> > > and xmlrpclib is changed for xmlrpc. So it seems the installation is
> > > wrong. I guess it should be reported to the distribution you are using.
> > 
> > Wrong guess. 
> > 
> > JFTR: It was explained on the Debian mailing list to Cato Nano that he has 
> > to
> > take care himself for 2to3 conversion when not using distribution packages 
> > and
> > running instead from a downloaded package.
> 
> I do not see where it is a wrong guess. In previous email, Cato Nano
> said: "Of course Proteus is installed with apt-get".
> 
> -- 


I think Mathis is referring to my own Tryton module

He saw the path to my module in the stacktrace

Now I' m not sure I understand

Can't the Debian provided Proteus be used for developing your own Tryton 
modules? 

Does it only work with Debian provided modules ? 


-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/e97f4fab-6e8f-4163-ac1f-d30312924016%40googlegroups.com.


Re: [tryton] Proteus

2018-01-11 Thread Cédric Krier
On 2018-01-11 13:38, Mathias Behrle wrote:
> * Cédric Krier: " Re: [tryton] Proteus" (Thu, 11 Jan 2018 01:07:32 +0100):
> 
> > On 2018-01-10 11:52, Cato Nano wrote:
> > > When called from within a python3 prompt, Proteus gets found
> > > 
> > > But this time xmlrpclib is missing
> > > 
> > > Also, xmlrpclib is not declared as a dependency in the Proteus setup.py
> > > file  
> > 
> > xmlrpclib is a standard library of Python so it should not be declared
> > as dependency.
> > But indeed xmlrpclib is the name for Python2, in Python3 it should be
> > xmlrpc.
> > Normally, when installing proteus with Python3, the code is transformed
> > and xmlrpclib is changed for xmlrpc. So it seems the installation is
> > wrong. I guess it should be reported to the distribution you are using.
> 
> Wrong guess. 
> 
> JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
> take care himself for 2to3 conversion when not using distribution packages and
> running instead from a downloaded package.

I do not see where it is a wrong guess. In previous email, Cato Nano
said: "Of course Proteus is installed with apt-get".

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/2018035717.GN3972%40kei.


signature.asc
Description: Digital signature


Re: [tryton] Proteus

2018-01-11 Thread Mathias Behrle
* Cédric Krier: " Re: [tryton] Proteus" (Thu, 11 Jan 2018 01:07:32 +0100):

> On 2018-01-10 11:52, Cato Nano wrote:
> > When called from within a python3 prompt, Proteus gets found
> > 
> > But this time xmlrpclib is missing
> > 
> > Also, xmlrpclib is not declared as a dependency in the Proteus setup.py
> > file  
> 
> xmlrpclib is a standard library of Python so it should not be declared
> as dependency.
> But indeed xmlrpclib is the name for Python2, in Python3 it should be
> xmlrpc.
> Normally, when installing proteus with Python3, the code is transformed
> and xmlrpclib is changed for xmlrpc. So it seems the installation is
> wrong. I guess it should be reported to the distribution you are using.

Wrong guess. 

JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
take care himself for 2to3 conversion when not using distribution packages and
running instead from a downloaded package.

-- 

Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://www.m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71  7681 D6D0 9BE4 8405 BBF6

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/2018033847.19cfc542%40monsterix.mbehrle.de.


pgpaxZT9Gz3AW.pgp
Description: Digitale Signatur von OpenPGP


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Cédric Krier
On 2018-01-11 16:43, Khurram Shahzad wrote:
> On Thu, Jan 11, 2018 at 4:06 PM, Cédric Krier  wrote:
> 
> > On 2018-01-11 02:11, Khurram Shahzad wrote:
> > > How can we create moves from supplier to the warehouse?
> >
> > As Stock Administrator under the "Inventory & Stock>Moves" menu.
> >
> > I am able to save new Stock Move, but it always remains in 'draft' state.
> The only button available on the form is 'Cancel'. There is no 'Receive' or
> 'Done' button as appearing in Shipment form. I have given 'Stock
> Administration' access to the user. Is there some other configuration to
> make the 'Done' button visible?

The "Do" button was added by https://bugs.tryton.org/issue5042

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/2018022916.GM3972%40kei.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Khurram Shahzad
On Thu, Jan 11, 2018 at 4:06 PM, Cédric Krier  wrote:

> On 2018-01-11 02:11, Khurram Shahzad wrote:
> > How can we create moves from supplier to the warehouse?
>
> As Stock Administrator under the "Inventory & Stock>Moves" menu.
>
> I am able to save new Stock Move, but it always remains in 'draft' state.
The only button available on the form is 'Cancel'. There is no 'Receive' or
'Done' button as appearing in Shipment form. I have given 'Stock
Administration' access to the user. Is there some other configuration to
make the 'Done' button visible?
-- 

Regards,
Khurram.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CAM3N3Cwq3hvtjPNj2Kf2%3DcRJ6aZgFbtSa1K7ofrpd_izNMuSbA%40mail.gmail.com.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Cédric Krier
On 2018-01-11 02:11, Khurram Shahzad wrote:
> How can we create moves from supplier to the warehouse?

As Stock Administrator under the "Inventory & Stock>Moves" menu.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/2018010626.GK3972%40kei.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Khurram Shahzad
On Thursday, January 11, 2018 at 2:05:07 PM UTC+5, Cédric Krier wrote:
> On 2018-01-10 20:10, Khurram Shahzad wrote:
> > On Tuesday, September 26, 2017 at 3:29:22 PM UTC+5, Sergi Almacellas 
> > Abellana wrote:
> > > El 26/09/17 a les 11:25, Khurram Shahzad ha escrit:
> > > > Dear All,
> > > > 
> > > > Our purchases and stocks were managed manually before installation of 
> > > > Tryton (GNU Health).
> > > > After installation of GNU Health, now we want to set up the opening 
> > > > inventory for the warehouse. Can anybody please guide me on how to set 
> > > > the opening inventory for a warehouse using Tryton?
> > > 
> > > You may enter an Inventory (from Invetories & Stock -> Inventories menú) 
> > > that for each storage location specified the list of product with their 
> > > real quantities. Once the inventory is confirmed the needed moves are 
> > > created to reflect the stock quantities.
> > > 
> > > This has a drawback as only the quantity is defined on inventory but not 
> > > the unit_price (which is specially relevant when using a non fixed 
> > > cost_price). Here is a recent issue that improved the situation:
> > > 
> > > https://bugs.tryton.org/issue6764
> > > 
> > > Which is only available on tryton trunk.
> > 
> > I could not find update for this issue on trunk 
> > (https://github.com/tryton/stock/blob/develop/inventory.py).
> > 
> > So, I updated the inventory.py to input unit_price and updated get_move() 
> > method of stock.inventory.line as following:
> > 
> > origin=self,
> > +unit_price = unit_price,
> > +cost_price = unit_price,
> > 
> > Now, when I confirm inventory after this update, the Account Move is fine 
> > and it is using the passed cost_price, but the product's cost_price (cost 
> > method is Average) is not updated.
> > 
> > To resolve this issue, I updated following method of stock.move class in 
> > move.py file and added 'lost_found' location type:
> > 
> > def _do(self):
> > if (self.from_location.type in ('supplier', 'production', 
> > 'lost_found')
> > 
> > Now the average cost price of the product is updated but it is not 
> > correctly calculated.
> > 
> > Kindly guide me where to get the latest code for resolving this issue, if 
> > it is fixed or kindly help me writing the code to resolve this issue.
> 
> Indeed making an inventory for the initial stock was a wrong advise.
> The proper way is to create moves from supplier to the warehouse
> location for each product with the initial quantity and a proper unit
> price.

How can we create moves from supplier to the warehouse?

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/4a57c712-8885-4358-838b-fb52653d2a47%40googlegroups.com.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Cédric Krier
On 2018-01-11 10:01, Cédric Krier wrote:
> Indeed making an inventory for the initial stock was a wrong advise.
> The proper way is to create moves from supplier to the warehouse
> location for each product with the initial quantity and a proper unit
> price.

And we have added a warning about that in the documentation:
http://doc.tryton.org/4.6/modules/stock/doc/index.html#inventory

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20180111095819.GI3972%40kei.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Cédric Krier
On 2018-01-10 20:10, Khurram Shahzad wrote:
> On Tuesday, September 26, 2017 at 3:29:22 PM UTC+5, Sergi Almacellas Abellana 
> wrote:
> > El 26/09/17 a les 11:25, Khurram Shahzad ha escrit:
> > > Dear All,
> > > 
> > > Our purchases and stocks were managed manually before installation of 
> > > Tryton (GNU Health).
> > > After installation of GNU Health, now we want to set up the opening 
> > > inventory for the warehouse. Can anybody please guide me on how to set 
> > > the opening inventory for a warehouse using Tryton?
> > 
> > You may enter an Inventory (from Invetories & Stock -> Inventories menú) 
> > that for each storage location specified the list of product with their 
> > real quantities. Once the inventory is confirmed the needed moves are 
> > created to reflect the stock quantities.
> > 
> > This has a drawback as only the quantity is defined on inventory but not 
> > the unit_price (which is specially relevant when using a non fixed 
> > cost_price). Here is a recent issue that improved the situation:
> > 
> > https://bugs.tryton.org/issue6764
> > 
> > Which is only available on tryton trunk.
> 
> I could not find update for this issue on trunk 
> (https://github.com/tryton/stock/blob/develop/inventory.py).
> 
> So, I updated the inventory.py to input unit_price and updated get_move() 
> method of stock.inventory.line as following:
> 
> origin=self,
> +unit_price = unit_price,
> +cost_price = unit_price,
> 
> Now, when I confirm inventory after this update, the Account Move is fine and 
> it is using the passed cost_price, but the product's cost_price (cost method 
> is Average) is not updated.
> 
> To resolve this issue, I updated following method of stock.move class in 
> move.py file and added 'lost_found' location type:
> 
> def _do(self):
> if (self.from_location.type in ('supplier', 'production', 
> 'lost_found')
> 
> Now the average cost price of the product is updated but it is not correctly 
> calculated.
> 
> Kindly guide me where to get the latest code for resolving this issue, if it 
> is fixed or kindly help me writing the code to resolve this issue.

Indeed making an inventory for the initial stock was a wrong advise.
The proper way is to create moves from supplier to the warehouse
location for each product with the initial quantity and a proper unit
price.

The question was raised at the TUL2017 and here is the answer:
https://youtu.be/Gw6kAXkOmMg?list=PL4ydsflJkP9XSsx1wAjke3EjF6setZoGY&t=3988

PS: The sound was not very good on the first day.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20180111090148.GH3972%40kei.


Re: [tryton] Setting Opening Inventory for the warehouse

2018-01-11 Thread Khurram Shahzad
On Tuesday, September 26, 2017 at 3:29:22 PM UTC+5, Sergi Almacellas Abellana 
wrote:
> El 26/09/17 a les 11:25, Khurram Shahzad ha escrit:
> > Dear All,
> > 
> > Our purchases and stocks were managed manually before installation of 
> > Tryton (GNU Health).
> > After installation of GNU Health, now we want to set up the opening 
> > inventory for the warehouse. Can anybody please guide me on how to set 
> > the opening inventory for a warehouse using Tryton?
> 
> You may enter an Inventory (from Invetories & Stock -> Inventories menú) 
> that for each storage location specified the list of product with their 
> real quantities. Once the inventory is confirmed the needed moves are 
> created to reflect the stock quantities.
> 
> This has a drawback as only the quantity is defined on inventory but not 
> the unit_price (which is specially relevant when using a non fixed 
> cost_price). Here is a recent issue that improved the situation:
> 
> https://bugs.tryton.org/issue6764
> 
> Which is only available on tryton trunk.

I could not find update for this issue on trunk 
(https://github.com/tryton/stock/blob/develop/inventory.py).

So, I updated the inventory.py to input unit_price and updated get_move() 
method of stock.inventory.line as following:

origin=self,
+unit_price = unit_price,
+cost_price = unit_price,

Now, when I confirm inventory after this update, the Account Move is fine and 
it is using the passed cost_price, but the product's cost_price (cost method is 
Average) is not updated.

To resolve this issue, I updated following method of stock.move class in 
move.py file and added 'lost_found' location type:

def _do(self):
if (self.from_location.type in ('supplier', 'production', 'lost_found')

Now the average cost price of the product is updated but it is not correctly 
calculated.

Kindly guide me where to get the latest code for resolving this issue, if it is 
fixed or kindly help me writing the code to resolve this issue.


> 
> Hope it helps.
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/39ce3086-85e3-480c-93a1-5440c80654c6%40googlegroups.com.