A Dilluns, 5 de desembre de 2011 00:00:34, Cédric Krier va escriure: > On 04/12/11 21:47 +0100, Albert Cervera i Areny wrote: > > As $subject says, think we should convert the relationship between > > account.invoice and account.move from a Many2One to a One2One because > > that better represents their relationship. I think we should also make > > it browsable from account moves to invoices because that's a very usual > > need when implementing new accounting modules. We should simply add the > > 'invoice' field as a One2One in account.move. > > I don't see any advantage. I will prefer to try to prevent bloating the > account.move table with field that are not always needed or meaningful.
Well, there are two questions here: One is to make the relationship a One2One and the other one to add the field to account.move. For the former I think that it is better because that's simply the relationship that exists between Invoices and Moves. You cannot have an invoice with several moves nor a move with several invoices, so that makes sense to me. About adding the field from account.move, I think it's a good thing for the API to have, although that could be added in another module if it's not wanted in account_invoice module, but we've found many times the need for browsing from account.move or account.move.line to its invoice. For both programmers and users. Shouldn't the user be able to move from an account move (and move line) to the corresponding invoice instead of having to move to the invoices menu option and search there? -- Albert Cervera i Areny http://www.NaN-tic.com Tel: +34 93 553 18 03 http://twitter.com/albertnan http://www.nan-tic.com/blog -- tryton-dev@googlegroups.com mailing list