Tryton - Issues

 

Message45191

Author semarie
Recipients ced
Date 2018-12-07.14:14:23
Content
> Usually we have getter method with the same name as the function field, so get_payments_info would be named get_amount.

I used this name because the same function was used for getter of count, amount, amount_succeeded, complete. I renamed it.

> I think the getter should use SQL query with grouping because it is not efficient to read all the lines out of the database just aggregate them in Python.

I have redone it using SQL.

> I think it will be more extension friendly to get the states list from a common private function.

Yes, I agree, but should I do it properly ? Is it just adding a classmethod in Payment ? Do you have an example of such case in a module ?

> The new fields should be added at least to the list view to allow searching on them.

ah yes. it was an error on my side: I didn't included the files in the commit.
Files
File name Uploaded
account_payment-2.patch semarie, 2018-12-07.14:14:23
History
Date User Action Args
2018-12-07 14:14:24semariesetmessageid: <1544188464.47.0.726710788836.issue7890@tryton.org>
2018-12-07 14:14:24semariesetrecipients: + ced
2018-12-07 14:14:24semarielinkissue7890 messages
2018-12-07 14:14:24semariecreate

Showing 10 items. Show all history (warning: this could be VERY long)