Giter Club home page Giter Club logo

django-oscar-vat_moss's Introduction

oscar_vat_moss

Enables EU VATMOSS processing for the Oscar e-commerce system

https://travis-ci.org/hastexo/django-oscar-vat_moss.svg?branch=master https://codecov.io/github/hastexo/django-oscar-vat_moss/coverage.svg?branch=master

This package enables e-commerce application based on Django Oscar to assess and charge VAT (Value Added Tax) according to EU regulations.

It is based on django-oscar and vat_moss-python.

Installation

For now, install with

pip install https://github.com/hastexo/django-oscar-vat_moss/archive/master.zip

to get the latest master. There are no named releases yet, and the package isn't yet on PyPI.

Use

To use, you must

  • Enable a pricing Strategy that uses the DeferredTax tax mixin
  • Add a CheckoutSessionMixin to your checkout session, so taxes can be applied when the customer's shipping address is known
  • Optionally extend your data model with a field accommodating your customer's VATIN (VAT Identification Number) if you want to enable VAT-free B2B transactions under the reverse charge system. If all your transactions are B2C, this last bit may be safely omitted.

Enabling a VAT-enabled pricing strategy

Add oscar_vat_moss.partner.strategy.VATStrategy to your partner/strategy.py module, and update your Selector to use it when appropriate:

# partner/strategy.py

from oscar_vat_moss.partner.strategy import VATStrategy

class Selector(object):
    def strategy(self, request=None, user=None, **kwargs):
        # Apply your strategy selection logic, where appropriate:
        return VATStrategy(request)

If you only want one selector and you always want to apply VATStrategy, you may also simply use:

# partner/strategy.py

from oscar_vat_moss.partner.strategy import *

Applying VAT on checkout

Add oscar_vat_moss.checkout.session.CheckoutSessionMixin to your checkout/session.py module:

# checkout/session.py

from oscar_vat_moss.checkout.session import CheckoutSessionMixin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.