[Erp5-dev] PredicateMatrix.py backward compatibility fix with warning proposal
Jérome Perrin
jerome at nexedi.com
Fri Jun 13 14:59:43 CEST 2008
Hi,
Le vendredi 06 juin 2008 à 14:36 +0200, Yoshinori Okuji a écrit :
> > And I'm trying to have only one source tree for both versions as
> long
> > as possible, so sometimes I'm spotting incompatibilities.
> >
> > One of them is problem with updateMatrix from PredicateMatrix. Patch
> > attached, so it is possible to use customised
> > InvoiceTransactionRule_asCellRange, using old API (relative_url)
> > instead of id.[1]
r20475 was an incompatible change, before this change it was impossible,
to copy and paste an invoice transaction rule.
> > Proposed patch attached.
>
> It is a bad idea to catch all exceptions (i.e. except:).
>
> Besides that, there might be an easier way to check the API. For
> instance, if
> a relative URL is given, it should contain '/'. But I think Jérôme
> should
> take a look, as I don't know this change well.
Checking that the cell index contain "/" could be a way, but I'm not
sure this will always be true in the future. To make it easier I added
code to migrate existing invoice transaction rule's matrix index to the
new format in r21581.
Jérome
More information about the Erp5-dev
mailing list