A Diumenge, 10 de juliol de 2011 11:52:48, Cédric Krier va escriure: > On 10/07/11 11:26 +0200, Albert Cervera i Areny wrote: > > We're starting to work on the Spanish localization and one of the many > > things in the TODO list involves improvements to > > account.invoice.payment_term model. Let me list the required changes: > > > > 1) Add the possibility that the delay is calculated in months instead of > > days. So January 30th + 1 month = 28 February (instead of 2 of March if > > one specified 30 days) > > You can add a delay type of "net_months". > > > 2) Add the possibility of dividing instead of making a percentage. So if > > an invoice must have 3 payments we "Type" is set to "Division" and the > > value to "3". So the division is always correct (instead of having to > > write "33.3333333"). > > You can add a type for "division".
Yes, I saw that these two points are really easy to implement in Tryton. The design is very good! > > > 3) Add the possibility of several payment days. In Spain, some companies > > only pay at day 15th of each month (or day 20th, or 30th, or whatever), > > but some of them have two payment days (15th and 30th of each month for > > example). For > > > > example: > > - A customer pays after 1 month at days 15th or 30th. > > - If we create an invoice on January 5th it will be paid on February > > 15th. - If we create an invoice on January 16th it will be paid on > > February 28th. > > This is some different delay types. > > > The days in which a party pays should, ideally be stored on > > party.party, not > > > > account.invoice.payment_term. The reason is that the number of > > possibilities in payment terms explodes a lot with the payment day > > condition. > > I don't understand, you mean that some companies have different rules for > each customers? That's sound strange. Yes. So one customer may pay at 30 days and on day 15th, another one may pay at 60 days on day 15th, another one may pay at 30 days on days 10th and 20th, etc. The number of combinations can be really huge and having a payment term entry for each of them is really not practical. In most Spanish applications a payment term is "30 days", "60 days" or "30, 60 days" and on the customer's form you introduce the payment days "15th and 30th" or "10th and 20th", etc. In OpenERP we implemented this in two ways. The "paydays" module forces you to create a payment term entry for any combination of payment term and payment days. The "partner_paydays" module lets you introduce the payment days in partner's form. The problem with the latter is that it changes the API (well, uses the context for that which is worse) and any module that has not been designed to pass the partner as a parameter in the context simply doesn't calculate payment terms correctly. That's why I wanted to change the base API in Tryton so all modules are compatible with this. Hopefully I made it clearer now.. -- Albert Cervera i Areny http://www.NaN-tic.com OpenERP Partners Tel: +34 93 553 18 03 http://twitter.com/albertnan http://www.nan-tic.com/blog -- [email protected] mailing list
