Cleaner version of the patch (many thanks to hynekcer), with tests and
preliminary docs, now posted at [1].

[1] https://bitbucket.org/ringemup/satchmo-clean/changeset/e1ffd15fda4b

On Mar 30, 3:12 pm, Nan <[email protected]> wrote:
> Ah, I see what you're referring to.  It's in the by_orderitem methods
> of the existing tax processors.
>
> I didn't think it was necessary to change in those processors because
> their calls to by_product_and_price are simply redirected to by_price
> anyway.  I was more concerned with the calls in parts of the code
> (such as template tags) that wouldn't be directly overridden by a new
> tax processor class that used the product in its calculations.
>
> Do you think it's cleaner to change those calls anyway?  I'm
> undecided.
>
> As for verifying that the tax processor output is unchanged, I have
> done so.  Do we need to write new test cases?
>
> Meantime, I'll contribute a sample tax processor that uses
> by_product_and_price.
>
> On Mar 24, 11:34 am, hynekcer <[email protected]> wrote:
>
>
>
>
>
>
>
> > I looked to your 
> > changesethttps://bitbucket.org/ringemup/satchmo/changeset/20ebf1e5ccf0
> > I had noticed it there.
> > The command
> >   grep -r "processor.by_orderitem" path/to/your/satchmo
> > says that it is
> >  satchmo/apps/satchmo_store/shop/models.py
> > in the context, what you modified.
>
> > Please, verify then, that results in all templates are these correct
> > new with the respect to product area. It shold not introduced bugs in
> > Satchmo by the patch.
> > If possible, use first those parts from my BaseProcessor required by
> > short tax processor examples.
>
> > On Mar 24, 3:27 am, Nan <[email protected]> wrote:
>
> > > > > > Nan, you forgot to change
> > > > > > self.tax = processor.by_orderitem(self)
> > > > > Where was this change omitted?
>
> > > > Here
> > > >          if self.product.taxable:
> > > > -            self.unit_tax = processor.by_price(taxclass,
> > > > self.unit_price)
> > > > +            self.unit_tax = processor.by_price_and_product(taxclass,
> > > > self.unit_price, product=self.product)
> > > >              self.tax = processor.by_orderitem(self)
>
> > > Sorry, still confused.  Which file / class is that in?

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to