[tryton-dev] Sort by function fields

2018-07-09 Thread Josias Pérez
Hi,

I was trying to find some documentation for sort by functional field (specially 
for selection, many2one). I have added searcher to the functional field but I 
think something more is needed. 

Thanks in advance! 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/c766e119-5009-4b91-846b-462c68b32398%40googlegroups.com.


[tryton-dev] Use of PYSONEncoder on printed reports

2018-06-29 Thread Josias Pérez
Hi,

I was using PYSONEncoder with Wizards to open custom actions with dates as 
context and it works well. 

But when I was use it with wizards but with reports this doesn't filter 
according to the context (dates).

I read the docs about PYSONENCODER [1] but I didn't find any recommendation to 
use it with printed reports. 

BTW, I am still working on a printed version of Balance Sheet, you can check 
the module here [2] and see the use of PYSONEncoder. 

Any help will be usefull. 

[1] 
http://doc.tryton.org/4.8/trytond/doc/ref/pyson.html?highlight=pysonencoder#encoder-and-decoder

[2] https://github.com/iehoshia/training_iesa/blob/master/account_report/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/97ce2df3-ebfa-4bb4-a35f-f3c34eed0443%40googlegroups.com.


Re: [tryton-dev] Generate General Balance Report and Income Statement

2018-06-27 Thread Josias Pérez
I want to create General Balance Reports like this [1]. 

Like I said, I have already created the report but I need ideas how to order 
the records. 

The logic is like this: 
1. Create a wizard to select fiscalyear and root account (similar when create a 
plan from template). 
2. Select the childs of these root account and display it in the correct order 
because the records are ordered by id or sequence or name, but not with the 
correct tree order (parent / child). 

I think this could be made recursive but I still working on that, any 
suggestion is welcome. 

You can see the module here [2]

[1] 
http://1.bp.blogspot.com/-ENe5ICLa_DM/Tcp42FzmpNI/AKM/LhRp0RUukbM/s1600/BALANCE+SHEET.png

[2] https://github.com/iehoshia/training_iesa/tree/master/account_report

El miércoles, 27 de junio de 2018, 8:03:04 (UTC-6), Sergi Almacellas Abellana 
escribió:
> El 27/06/18 a les 01:34, Josias Pérez ha escrit:
> > I have already created a report for account.account.type but I have doubts 
> > on how to order the data to print, I was thinking something like tree view 
> > but in a printed report, I will be perfect. 
> > 
> 
> Normally a report work with the selected records. So the user selects
> the records she wants to print and then the template is rendered for
> each one of.
> 
> In your case, you can include the type childs if interested.
> 
> BTW, Could you explain which report are you going to develop? Maybe it's
> interesting for other and can be included on account module.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/9e897912-c67c-435e-b7bb-e5b00e5d1943%40googlegroups.com.


Re: [tryton-dev] Generate General Balance Report and Income Statement

2018-06-27 Thread Josias Pérez
I have already created a report for account.account.type but I have doubts on 
how to order the data to print, I was thinking something like tree view but in 
a printed report, I will be perfect. 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/fa77cde9-3acd-4fe5-ab3a-c07845039402%40googlegroups.com.


[tryton-dev] Print from custom button

2018-06-26 Thread Josias Pérez
Hi, 

I have a custom module with transitions controlled by buttons. In the last 
transition I need that the active record is printed. I have already created a 
report and it appear in the actions menu, but I want to print it with the 
button. 

Thanks in advance! 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/5009cb2d-fa06-4b08-86ca-e7535291b4c5%40googlegroups.com.


[tryton-dev] Import data from CSV

2018-06-14 Thread Josias Pérez
Hi,

I was trying to import data with CSV with a multi-company stage and all the 
companies with the same accounting plan. 

I'm trying to import a file that require to import the a group of accounts but 
I found with an error that say that encounter many ocurrences. I dont know how 
to import that. 

At the same time, I need to import with a tree structure child / parent. 
Actually I do it manually one by one (first parent and after the child) because 
if I put all together I can not import that (the parent doesn't be found and 
can create the child). 

I was reading [1] but I think is a different case to import. 

Any help will be usefull.

[1] 
https://groups.google.com/forum/#!searchin/tryton-dev/import%7Csort:date/tryton-dev/l_OlrlD1f48/Vtm-kcrjAAAJ

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/5f23fc91-b895-45be-97b1-091114f1e5af%40googlegroups.com.


[tryton-dev] Generate General Balance Report and Income Statement

2018-06-07 Thread Josias Pérez
Hi,

I would like to generate report for General Balance and Income Statement.

The report is generated from account.account.type and I can have all the field, 
but I would to stylize the report with different font size for parent/childs.

Thanks in advance. 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/1a134279-1bd8-466e-8b6b-105395f21fbc%40googlegroups.com.


Re: [tryton-dev] Consolidated reports

2018-04-02 Thread Josias Pérez
Thanks for the info Cédric, and sorry for this [1]. 

How could we start to adapt the get_multivalue method and how this affect 
Access Rules?

I'm not sure if this in only a feature but if multi-company is supported, a 
user can have many companies assigned to this and in the Preferences screen an 
option to change company as needed. 

I know that that multi-company affect to sales, invoices, inventories and more, 
so, could you give us a guideline on which modules start to develop this? 

El domingo, 25 de marzo de 2018, 4:35:02 (UTC-6), Cédric Krier escribió:
> On 2018-03-24 21:26, Josias Pérez wrote:
> > I was reading discussion [1] and maybe we could know what is the status of 
> > the issues: 
> > 
> > - property field: it will not be possible to have correct 
> >   multi-company when we still have those shitty fields. 
> 
> This has been done in https://bugs.tryton.org/issue2349 which is linked
> to https://bugs.tryton.org/issue4080
> 
> > - context: in base we should never depend on context. 
> 
> This has not yet been done. It is about using get_multivalue method
> instead of using field attribute to get the value of the MultiValue
> field.
> I think the best way to process is to review module by module and create
> one issue per module for the patch.
> 
> > - user.company: in base we should never depend on this. 
> 
> I think it is almost gone but the source tree should be verified.
> 
> 
> 
> PS: Please do not top-post on this mailing list, see 
> http://groups.tryton.org/netiquette
> 
> -- 


[1] http://groups.tryton.org/netiquette
[2] 
https://github.com/tryton/company/blob/057e8b4749159c6bec255b712d45e50d2361646b/model.py#L11

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/44633b51-9efa-4c51-a8d7-9fb35ebbbce8%40googlegroups.com.


Re: [tryton-dev] Consolidated reports

2018-03-25 Thread Josias Pérez
Reading the issue history, the last update is 2016-04-25, so, IMHO, it's time 
to work on improving its functionality. I'm interesting in colaborate on that, 
as a developer or as a sponsor, maybe not the main, but, for start point.

I was reading discussion [1] and maybe we could know what is the status of the 
issues: 

- property field: it will not be possible to have correct 
  multi-company when we still have those shitty fields. 

- context: in base we should never depend on context. 

- user.company: in base we should never depend on this. 

Each comment will be welcome.

[1] https://groups.google.com/forum/#!topic/tryton-dev/prpZY4rGCug/discussion 

El viernes, 23 de marzo de 2018, 8:10:03 (UTC-6), Cédric Krier escribió:
> On 2018-03-21 11:28, Josias Pérez wrote:
> > Hi, 
> > 
> > I want to ask if someone has made some development to this post [1] ?
> > 
> > I'm interesting in start the development, if someone has already started I 
> > want to join forces to multi-company consolidated reports. Is there is a 
> > blueprint is good start point. 
> > 
> > I will wait for news. 
> 
> I think this can only be developed once this [1] multi-company issue is
> generally fixed. This will require to ensure that MultiValue in the code
> are properly called using the get_multivalue method instead of accessing
> the field with the global context.
> 
> 
> [1] https://bugs.tryton.org/issue4080
> 
> -- 
> 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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/baba7907-19f3-4d07-bba2-7abd98ba42c4%40googlegroups.com.


[tryton-dev] Consolidated reports

2018-03-21 Thread Josias Pérez
Hi, 

I want to ask if someone has made some development to this post [1] ?

I'm interesting in start the development, if someone has already started I want 
to join forces to multi-company consolidated reports. Is there is a blueprint 
is good start point. 

I will wait for news. 

[1] https://discuss.tryton.org/t/consolidation-reports/297

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/0d28a8f9-9046-42cf-8d72-6e97ace8a350%40googlegroups.com.


[tryton-dev] Add sum widget in SAO

2018-03-01 Thread Josias Pérez
Hi,

I was reading the docs about add the sum of a field on the bottom of list in 
tree view [1], but this only work on desktop client not in web. Is there a way 
to activate it, or how can I customize this to add the sum to tree view?

Thanks in advance! 

[1] http://doc.tryton.org/4.6/trytond/doc/topics/views/index.html#id2 
Sum

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/7eb95f5a-7d54-4074-94cf-18e4f639b38c%40googlegroups.com.


[tryton-dev] Re: Call a Functional Field from another module

2018-02-15 Thread Josias Pérez
With the code describe above I receive the follow error message: 
Traceback (most recent call last):
  File 
"/opt/cr/local/lib/python2.7/site-packages/trytond/protocols/dispatcher.py", 
line 165, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
  File "/opt/cr/local/lib/python2.7/site-packages/trytond/model/modelsql.py", 
line 780, in read
getter_result = getter_results[fname]
TypeError: 'Decimal' object has no attribute '__getitem__'

February 2018, 15:55:07 (UTC-6), Josias Pérez escribió:
> Hi, 
> 
> I would appreciate if could tell how I can call a functional field from 
> another module, in this case, I need to call the payable function field from 
> account module.
> 
> The code is the follow: 
> 
>   currency_digits = fields.Function(fields.Integer('Currency Digits'),
>   'get_currency_digits')
> 
>   receivable = fields.Function(
>   fields.Numeric('Por cobrar',
>   digits=(16, Eval('currency_digits', 2)),
>   depends=['currency_digits']),
>   'get_receivable_payable')
> 
>   @classmethod
>   def get_currency_digits(cls, parties, name):
>   pool = Pool()
>   Company = pool.get('company.company')
>   company_id = Transaction().context.get('company')
>   if company_id:
>   company = Company(company_id)
>   digits = company.currency.digits
>   else:
>   digits = 2
>   return {p.id: digits for p in parties}
> 
>   @classmethod
>   def get_receivable_payable(cls, subscriptions, names):
>   for subscription in subscriptions:
>   if subscription.party:
>   amount = subscription.party.receivable
>   return amount
>   else: 
>   return 0 
> 
> I'm trying to get the value of the payable field of account module. [1]
> 
> Thanks in advance! 
> 
> [1] https://github.com/tryton/account/blob/develop/party.py#L75

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/fbd895a3-a327-4497-a282-3e8d7f8f7914%40googlegroups.com.


[tryton-dev] Call a Functional Field from another module

2018-02-15 Thread Josias Pérez
Hi, 

I would appreciate if could tell how I can call a functional field from another 
module, in this case, I need to call the payable function field from account 
module.

The code is the follow: 

currency_digits = fields.Function(fields.Integer('Currency Digits'),
'get_currency_digits')

receivable = fields.Function(
fields.Numeric('Por cobrar',
digits=(16, Eval('currency_digits', 2)),
depends=['currency_digits']),
'get_receivable_payable')

@classmethod
def get_currency_digits(cls, parties, name):
pool = Pool()
Company = pool.get('company.company')
company_id = Transaction().context.get('company')
if company_id:
company = Company(company_id)
digits = company.currency.digits
else:
digits = 2
return {p.id: digits for p in parties}

@classmethod
def get_receivable_payable(cls, subscriptions, names):
for subscription in subscriptions:
if subscription.party:
amount = subscription.party.receivable
return amount
else: 
return 0 

I'm trying to get the value of the payable field of account module. [1]

Thanks in advance! 

[1] https://github.com/tryton/account/blob/develop/party.py#L75

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/103a12c0-6333-4294-9598-ac63e31ea937%40googlegroups.com.


Re: [tryton-dev] Search on One2Many field

2018-02-15 Thread Josias Pérez
El jueves, 8 de febrero de 2018, 9:55:45 (UTC-6), Sergi Almacellas Abellana 
escribió:
> El 07/02/18 a les 23:01, Josias Pérez ha escrit:
> > Hi,
> > 
> > I have a custom module with the a One2Many field:
> > 
> > 
> > class Agreement(ModelView, ModelSQL):
> > "Agreement"
> > __name__ = 'mod.agreement'
> > 
> > date = fields.Date('Date')
> > lines = fields.One2Many('disc.agreement.service',
> > 'agreement','Services',
> > )
> > 
> > class AgreementLine(ModelView, ModelSQL): 
> > "Agreement Line" 
> > __name___ = 'mod.agreement.line'
> > 
> > agreement = fields.Many2One('Agreement')
> > service = fields.Many2One('mod.service', 'Service') 
> > 
> > class Service(ModelView, ModelSQL):
> > "Service"
> > __name__ = 'mod.service'
> > 
> > name = fields.Char('Name')
> > 
> > Inside this class I have modified the search classmethod and I want to 
> > search Agreements by Service ('mod.service') in Agreement 
> > class('mod.agreement'), is this possible?
> 
> Yes, you can "jump" between relations using a dot to represent a
> relation. For example, the following example will allow you to return
> all the agreement which conaint a line of a service named service:
> 
> [('lines.service.name', '=', 'Service')]
> 
> Hope it helps.
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

Works perfect!

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/4a8cef2d-f26e-4bb0-8fdd-e7abe39c7412%40googlegroups.com.


[tryton-dev] Search on One2Many field

2018-02-07 Thread Josias Pérez
Hi,

I have a custom module with the a One2Many field:


class Agreement(ModelView, ModelSQL):
"Agreement"
__name__ = 'mod.agreement'

date = fields.Date('Date')
lines = fields.One2Many('disc.agreement.service',
'agreement','Services',
)

class AgreementLine(ModelView, ModelSQL): 
"Agreement Line" 
__name___ = 'mod.agreement.line'

agreement = fields.Many2One('Agreement')
service = fields.Many2One('mod.service', 'Service') 

class Service(ModelView, ModelSQL):
"Service"
__name__ = 'mod.service'

name = fields.Char('Name')

Inside this class I have modified the search classmethod and I want to search 
Agreements by Service ('mod.service') in Agreement class('mod.agreement'), is 
this possible?

Thanks for your help and comments! 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/23cc3ee4-523c-43a3-a1bc-9220905be050%40googlegroups.com.


Re: [tryton-dev] set_context to @table_query from Report

2018-01-31 Thread Josias Pérez
This works well for me. Thanks!

El 31/01/2018, 9:01:41 (UTC-6), Sergi Almacellas Abellana escribió:
> El 31/01/18 a les 15:33, Josias Pérez ha escrit:
> > I was thinking in something like the code below: 
> > 
> > In Report
> > 
> > with Transaction().set_context(_check_access=False):
> > date = data['date']
> > department = data['deparment']
> 
> Then you should have to surround the search with the set_context call:
> 
> with Transaction().set_context(
>   date=data['date'], department=data['department']):
>records = Model.search(domain)
> > 
> > In table_query
> > if Transaction().context.get('date'):
> > where &= report.date >= Transaction().context['date']
> > if Transaction().context.get('department'):
> > where &= report_line.department == 
> > Transaction().context['deparment']
> > 
> > But I dont know if it is possible or a good practice.
> 
> Indeed the table query can be directly searched so you be able to
> perform the following search on your get_records method:
> 
> records = Model.search([
>   ('date', '>=', data['date']),
>   ('department', '=', data['department']),
>   ])
> 
> For me this is the cleaner solution.
> 
> -- 
> Sergi Almacellas Abellana
> www.koolpi.com
> Twitter: @pokoli_srk

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/1395ce4d-2284-47b4-84f4-fb6841e35fa0%40googlegroups.com.


[tryton-dev] set_context to @table_query from Report

2018-01-31 Thread Josias Pérez
Hi,

I have a custom module with the follow definition:

DepartmentLine
Department (many2one to Deparment)
Product
Quantity

Department
Customer
Date 
Lines (one2many to DepartmentLine)


I have a custom report that call info from a table_query

class DepartmentReport(Report):

'Report'
__name__ = 'disc.report'

@classmethod
def _get_records(cls, ids, model, data):
Report = Pool().get('disc.report.department.table')

clause = ''
clause = clause[:]
date = data['date']

department = data['department']

if date: 
clause = [clause,   
('date','>=',date)
]
if department:
clause = [clause, 
('department','=',department)
]
query = Report.search(clause,
order=[('total', 'DESC')]) 
return query 

class ReportDepartmentTable(ModelSQL, ModelView):
'Report Department'
__name__ = 'disc.report.department.table'

group = fields.Many2One('disc.group',
'Group')
department = fields.Many2One('disc.department',
'Department')
total = fields.Numeric('Total')
date = fields.Date('Date')
 
@staticmethod
def table_query():
pool = Pool()
Report = pool.get('disc.report')
report = Report.__table__()
ReportLine = pool.get('disc.report.line')
report_line = ReportLine.__table__()

query = (report
.join(report_line,
condition=report_line.report == report.id)
.select(
Max(report_line.id * 1000).as_('id'),
Max(report.create_uid).as_('create_uid'),
Max(report.create_date).as_('create_date'),
Max(report.write_uid).as_('write_uid'),
Max(report.write_date).as_('write_date'),
Max(report.department).as_('department'),
report.date
report_line.group,
Sum(report_line.quantity).as_('total'),
where=where,
group_by=
(report_line.group,
report.date, 
)
)
)
return query 

The report works fine, with some detail, in different dates, I receive the 
following data

Group 1   10#10/01
Group 1   15#15/01
Group 1   20#20/01

So, I want to group these result to show only 

Group 1   45 (which is the expected behavior), dates are not required in the 
report.

I was thinking in add the method set_context to the report and send it to the 
table_query. In a table_query, without report, using an aditional class 
'deparment.context' it works fine and give the expected results. 

Any help will be appreciated. 

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/89acabf4-2c07-4ce9-aac9-7b77cfe9f266%40googlegroups.com.


Re: [tryton-dev] tryton web services call from PHP via XML rpc

2014-10-10 Thread Josias Pérez
I'm interesting in that too, CRUD especially.

2014-10-10 1:21 GMT-06:00 frederic.lange...@coopengo.com:

 Hi devs,

 I m trying to call a tryton web service (for example create) via XML RPC
 from php but encountered somme issues.
 If someone already succeed in calling tryton from php, can you please
 provide an example?

 Thanks

 Frederic Langevin
 Coopengo




-- 
Bendiciones.

Josias Pérez.


[tryton-dev] Print 2 copies of a report

2014-04-30 Thread Josias Pérez
Hi tryton developers,

I wanna ask you how to config tryton to print 2 reports automacticlly from 
a wizard. Especific from to print a payment from invoice. 

I can create a report, and order to print automacticlly, but not to print 2 
(or more) copies. 

Thanks in advance!


[tryton-dev] Hide values on tree view.

2014-02-06 Thread Josias Pérez
Hi,

I really appreciate if someone can help to hide values on tree view, but at 
the same time, that be search enter some information on the filters find 
the record. For example, in the invoice list hide all the record when load 
first time, but when search by reference or party, show the record related 
to the filter.

Thanks in advance!


Re: [tryton-dev] Record rule question

2013-12-16 Thread Josias Pérez
HI Ced, 

On Monday, December 16, 2013 9:45:52 AM UTC-6, Cédric Krier wrote:

 On 15/12/13 19:33 -0800, Josias Pérez wrote: 
  Hi, 
  
  I only want to know how record rule work. For example, I have added to 
  party.party and company.employee type field ('a', 'b' and 'global). 
  
  With the follow rule ['OR', [( 'type' , 'in', ['global','a','b'] if 
  user.employee.type == 'global' else [] )], [ ('type', '=', 
  user.employee.type )] ] hide parties that doesnt belong to employee of 
 the 
  same type, and only show parties for employee types (global show all). 

 On which Model does the rule apply? 


It's on party.party model. 


  The question is: when a employee type 'a' for example, want to create a 
  sale, tryton client say You can read records that doesn't exists. 

 Probably the employe can not read the party of the company. 


The employee can read only parties with his 'type' (a, b, global).


  How 
  control inherits in records to another models to prevent that message? 

 I don't understand the question. 

 Any way, record rules are very complex to manage, you should really have 
 a good point to use them. And I really don't see why you should add such 
 rule to party because party reflect the external world which is readable 
 by everyone. 


We have differents types of clients, but, when the user can see only this 
own records types, specially in parties, invoices and sales. Let me know if 
the question its more clear. Its a very important thing to have control on 
what information can read every type of user.


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



[tryton-dev] Record rule question

2013-12-15 Thread Josias Pérez
Hi,

I only want to know how record rule work. For example, I have added to 
party.party and company.employee type field ('a', 'b' and 'global). 

With the follow rule ['OR', [( 'type' , 'in', ['global','a','b'] if 
user.employee.type == 'global' else [] )], [ ('type', '=', 
user.employee.type )] ] hide parties that doesnt belong to employee of the 
same type, and only show parties for employee types (global show all). 

The question is: when a employee type 'a' for example, want to create a 
sale, tryton client say You can read records that doesn't exists. How 
control inherits in records to another models to prevent that message? 

Thanks in advance!


Re: [tryton-dev] Custom view on Many2Many relationship

2013-12-10 Thread Josias Pérez
Hi Guillem,

I was talking with Zikzakmedia team about training module too. 

On Monday, December 2, 2013 11:43:46 AM UTC-6, Guillem Barba wrote:


 El 29/11/2013 7:24, Josias Pérez jep...@gmail.com javascript: va 
 escriure:
 
  Hi,
 
  I was working on a module for course management. 

 Hi Josias,
 There is a Blueprint [1] for a Training Verticalisation (the name can be 
 changed) which base module should be good for you. Based on the diagram you 
 supplied, you don't need Sessions in a Course but it should be possible.
 The blueprint is WiP. I have to complete it with invoicing requirements.
 I don't need it for now, but I can contribute in the development because I 
 will use it.

I want to contribute too with the development, I was been migrating the 
OERP training module, I the work is in 
https://github.com/iehoshia/trytond-training, feel free to contribute. 

Zikzakmedia team give a recommendation, distribute the functionality in 
diferents modules, 


training: Training basics; course, offer, sessions.
* training_catalog: To manage course catalog.
* training_subscription: To manage subscriptions on courses. 
* training_participation: To manage session and participation.
* training_subscription_invoice: To manage invoices on courses. 
* training_room: To manage rooms and buildings
* training_exam: To manage exams 

The part of scores I think it will be specific for your project. I also 
 need something similar but not equal. Maybe it can be generalized... But 
 probably not.

It could be generalized, for this is gradesheet, to manage scores, but the 
design need to be made.

Let me now how can work on this module together. 

Greetings!
 

 1: http://code.google.com/p/tryton/wiki/TrainingVerticalization 

  Initially, the design was taken from and excel sheet.
 
  I would appreciate help to use the One2Many relationship in GradeSheet 
 filter based on course selection and use it like excel does. 

 I don't understant what you need. What is GradeSheet?

  https://github.com/iehoshia/edu-dev
 
  Thanks in advance!
 
  


[tryton-dev] Permission for button wizards

2013-10-02 Thread Josias Pérez
Hi,

I'm working for a POS module on tryton.

At the moment, have 2 question:

1. We create a group called Team Sales, that can access to Sales and Sales 
Lines, but we want that they can't view some fields (specially related to 
cost_price). We can hide on fields permission, but at the same time, they 
need to create stock moves, that requiere to read cost_price. The question 
is how to hide the field (cost_price) only in the view, but still can read 
for create the stock moves. They can't see the stock moves, only create 
that. 

2. How to give access permission to buttons that call wizards? They aren't 
listed neither on button neither in wizard permission access.

Thanks in advance!


[tryton-dev] Action Domain for Dates

2013-10-01 Thread Josias Pérez
HI,

I would appreciate if can tell me how to add dates domains to date fields, 
specially in actions.

Thanks in advance.


[tryton-dev] Customize sales.

2013-09-16 Thread Josias Pérez
Hi,

I have testing tryton in many sale scenarios: 6 computers (2 for each 
level), 8 salesman, 3 levels in the building(curtains, carpets and bedding).

1. The first thing we know to do, is simplify the workflow of the sale, so, 
when a budget is reviewed, give the option for confirm the sale or process 
the sale (not draft and confirm and process).

2. Each salesman has a numeric code of four digit, but doesnt have assigned 
computer, can work on any computer of his level. When the Confirm or 
Process button are pressed, need to ask the salesman code and add this to 
the sale. So, sometimes can cancel a sale. Is it possible ?

3. Each level has its own products information and are managed separately, 
so we need to hide some product information, and display only the products 
of his category( curtains, carpets and bedding). 

4. Sometimes the generated invoices are not fully paid single, but in 3 o 4 
payments. Each time you make a payment, make a receipt to, and the receipt 
is delivered to the customer. The information about payments are managed by 
collectors that need to have the history of each client assigned (this 
classification make by department or manually assigned). 

Any help will be appreciated.


Re: [tryton-dev] Customize sales.

2013-09-16 Thread Josias Pérez


On Monday, September 16, 2013 2:22:21 AM UTC-6, Cédric Krier wrote:

 On 15/09/13 22:00 -0700, Josias Pérez wrote: 
  Hi, 
  
  I have testing tryton in many sale scenarios: 6 computers (2 for each 
  level), 8 salesman, 3 levels in the building(curtains, carpets and 
 bedding). 
  
  1. The first thing we know to do, is simplify the workflow of the sale, 
 so, 
  when a budget is reviewed, give the option for confirm the sale or 
 process 
  the sale (not draft and confirm and process). 

  I don't understand why are you talking about budget? I would have link 
  budget to purchase not sale. 

Sorry for talking about budget. I meant talking about quotation on sale. 
Give the option to confirm and process the sale in the draft view. 
 

 Otherwise, I don't get you about the workflow, by default a sale is in 
 draft so you don't have to go to draft because you already are in. 

  2. Each salesman has a numeric code of four digit, but doesnt have 
 assigned 
  computer, can work on any computer of his level. When the Confirm or 
  Process button are pressed, need to ask the salesman code and add this 
 to 
  the sale. So, sometimes can cancel a sale. Is it possible ? 

 This must be managed by giving to each one a login with the proper right 
 linked.   


Well, we login in each computer assigning a user and password for the 
computer, not for salesmans. So, they can work on any computer. When a sale 
is confirmed, they need to add his code (for confirm and register his 
sale). 
 

  3. Each level has its own products information and are managed 
 separately, 
  so we need to hide some product information, and display only the 
 products 
  of his category( curtains, carpets and bedding). 

 I think the best will be to add a level field on the sale and base on 
 this value create a record rule that will filter the product on the sale 
 line. 


I will do this. 


  4. Sometimes the generated invoices are not fully paid single, but in 3 
 o 4 
  payments. Each time you make a payment, make a receipt to, and the 
 receipt 
  is delivered to the customer. The information about payments are managed 
 by 
  collectors that need to have the history of each client assigned (this 
  classification make by department or manually assigned). 

 You can use the payment button on the invoice and for the receipt you 
 will have to create a report in this wizard. 


I will do this too, thanks for the comments. 


 -- 
 Cédric Krier 

 B2CK SPRL 
 Rue de Rotterdam, 4 
 4000 Liège 
 Belgium 
 Tel: +32 472 54 46 59 
 Email/Jabber: cedric...@b2ck.com javascript: 
 Website: http://www.b2ck.com/ 



[tryton-dev] Hide products and categories based on groups permission.

2013-09-09 Thread Josias Pérez
Hi,

I want to know if its possible to hide products and products categories 
based on permissions? And if it is, how do that?

Grettings!


[tryton-dev] Hide fields based on permission groups

2013-09-02 Thread Josias Pérez
Hi, 

I have a little question: how I hide some fields based on groups permission?

When edit access permissions on Administration menu, this doesnt show the 
field neither the view.

Thanks in advance!


[tryton-dev] Image (binary fields) on reports

2013-08-29 Thread Josias Pérez
Hi,

I would appreciate help for add image to reports, especifically on sale 
report. 

In product.product I have added a image field, binary type. 

How would be added on the ODT field?

Thanks in advance!


[tryton-dev] Subscription Module

2013-07-12 Thread Josias Pérez
Hi,

I was trying the subscription module in a 2.8 server.

The module are on 
https://bitbucket.org/zikzakmedia/trytond-subscription/src/be5c8fe688037558882bd8779578fa0769e451d2/subscription.py?at=default

This cannot create a recurrent document cause is give the follow message: 

Traceback (most recent call last):
  File 
/home/.virtualenvs/tryton28/local/lib/python2.7/site-packages/trytond/ir/cron.py,
 
line 155, in _callback
getattr(Model, cron.function)(*args)
  File 
/home/.virtualenvs/tryton28/local/lib/python2.7/site-packages/trytond/modules/subscription/subscription.py,
 
line 291, in model_copy
Request.create(to_create)
  File 
/home/.virtualenvs/tryton28/local/lib/python2.7/site-packages/trytond/model/modelsql.py,
 
line 360, in create
field.set([new_id], cls, fname, value)
  File 
/home/.virtualenvs/tryton28/local/lib/python2.7/site-packages/trytond/model/fields/one2many.py,
 
line 140, in set
vals = vals.copy()
AttributeError: 'str' object has no attribute 'copy'

Maybe it is easy fixed but at this moment dont know how.

Any help will be appreciated.