Пример #1
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Customer
from .serializers import CustomerSerializer
from .views import CustomerCreateView
from .views import CompanyCreateView
from .views import UpdateView

site.register_module(
    Customer, **{
        'create': {
            u'company': (_('Company'), CompanyCreateView),
            u'customer': (_('Customer'), CustomerCreateView),
        },
        'update': UpdateView,
        'serializer': CustomerSerializer,
    })


class CustomerCategory(BaseCategory):
    name = _('Customer')
    slug = "customer"


site.register_dashboards(
    Sales(
        CustomerCategory(
            ViewFactory(
Пример #2
0
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import HumanResources
from djangobmf.sites import site

from .models import Employee
from .serializers import EmployeeSerializer
from .views import EmployeeCreateView


site.register_module(Employee, **{
    'create': EmployeeCreateView,
    'serializer': EmployeeSerializer,
})


class EmployeeCategory(BaseCategory):
    name = _('Employees')
    slug = "employees"


site.register_dashboards(
    HumanResources(
        EmployeeCategory(
            ViewFactory(
                model=Employee,
                name=_("All Employees"),
                slug="all",
Пример #3
0
# ex:set fileencoding=utf-8:

from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Accounting
from djangobmf.sites import site

from .models import Tax
from .serializers import TaxSerializer

site.register_module(Tax, **{
    'serializer': TaxSerializer,
})


class TaxCategory(BaseCategory):
    name = _('Taxes')
    slug = "taxes"


site.register_dashboards(
    Accounting(
        TaxCategory(ViewFactory(
            model=Tax,
            name=_("All Taxes"),
            slug="all",
        ), ), ), )
Пример #4
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Quotation
from .models import QuotationProduct
from .serializers import QuotationSerializer
from .views import QuotationCreateView
from .views import QuotationUpdateView

site.register_module(
    Quotation, **{
        'create': QuotationCreateView,
        'update': QuotationUpdateView,
        'serializer': QuotationSerializer,
        'report': True,
    })

site.register_module(QuotationProduct, **{})


class QuotationCategory(BaseCategory):
    name = _('Quotations')
    slug = "quotations"


site.register_dashboards(
    Sales(
        QuotationCategory(
Пример #5
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Accounting
from djangobmf.sites import site

from .models import Invoice
from .models import InvoiceProduct
from .serializers import InvoiceSerializer
from .views import InvoiceCreateView
from .views import InvoiceUpdateView


site.register_module(Invoice, **{
    'create': InvoiceCreateView,
    'update': InvoiceUpdateView,
    'serializer': InvoiceSerializer,
    'report': True,
})


site.register_module(InvoiceProduct, **{
})


class InvoiceCategory(BaseCategory):
    name = _('Invoices')
    slug = "invoices"


site.register_dashboards(
    Accounting(
Пример #6
0
from .models import ACCOUNTING_INCOME
from .models import ACCOUNTING_EXPENSE
from .models import ACCOUNTING_ASSET
from .models import ACCOUNTING_LIABILITY
from .models import Account
from .models import Transaction
from .models import TransactionItem
from .serializers import AccountSerializer
from .serializers import TransactionSerializer
from .serializers import TransactionItemSerializer
from .views import TransactionCreateView
from .views import TransactionUpdateView


site.register_module(Account, **{
    'serializer': AccountSerializer,
})


site.register_module(Transaction, **{
    'create': TransactionCreateView,
    'update': TransactionUpdateView,
    'serializer': TransactionSerializer,
})


site.register_module(TransactionItem, **{
    'serializer': TransactionItemSerializer,
})

Пример #7
0
#!/usr/bin/python
# ex:set fileencoding=utf-8:

from __future__ import unicode_literals

from djangobmf.sites import site

from .models import TestView

site.register_module(TestView)
Пример #8
0
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Address
from .serializers import AddressSerializer


site.register_module(Address, **{
    'serializer': AddressSerializer,
})


class AddressCategory(BaseCategory):
    name = _('Address')
    slug = "address"


site.register_dashboards(
    Sales(
        AddressCategory(
            ViewFactory(
                model=Address,
                name=_("All Addresses"),
                slug="all",
Пример #9
0
from .models import ACCOUNTING_INCOME
from .models import ACCOUNTING_EXPENSE
from .models import ACCOUNTING_ASSET
from .models import ACCOUNTING_LIABILITY
from .models import Account
from .models import Transaction
from .models import TransactionItem
from .serializers import AccountSerializer
from .serializers import TransactionSerializer
from .serializers import TransactionItemSerializer
from .views import TransactionCreateView
from .views import TransactionUpdateView

site.register_module(Account, **{
    'serializer': AccountSerializer,
})

site.register_module(
    Transaction, **{
        'create': TransactionCreateView,
        'update': TransactionUpdateView,
        'serializer': TransactionSerializer,
    })

site.register_module(TransactionItem, **{
    'serializer': TransactionItemSerializer,
})

site.register_settings(
    'bmfcontrib_accounting', {
Пример #10
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales

from .models import Product
from .models import ProductTax
from .models import PRODUCT_SERVICE
from .serializers import ProductSerializer
from .views import ProductCreateView
from .views import ProductDetailView
from .views import ProductUpdateView

site.register_module(
    Product, **{
        'create': ProductCreateView,
        'detail': ProductDetailView,
        'update': ProductUpdateView,
        'serializer': ProductSerializer,
    })

site.register_module(ProductTax, **{})

site.register_settings(
    'bmfcontrib_product', {
        'default':
        forms.ModelChoiceField(
            queryset=Product.objects.filter(type=PRODUCT_SERVICE)),
    })


class ProductCategory(BaseCategory):
Пример #11
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Quotation
from .models import QuotationProduct
from .serializers import QuotationSerializer
from .views import QuotationCreateView
from .views import QuotationUpdateView


site.register_module(Quotation, **{
    'create': QuotationCreateView,
    'update': QuotationUpdateView,
    'serializer': QuotationSerializer,
    'report': True,
})


site.register_module(QuotationProduct, **{
})


class QuotationCategory(BaseCategory):
    name = _('Quotations')
    slug = "quotations"


site.register_dashboards(
    Sales(
Пример #12
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Accounting
from djangobmf.sites import site

from .models import Invoice
from .models import InvoiceProduct
from .serializers import InvoiceSerializer
from .views import InvoiceCreateView
from .views import InvoiceUpdateView

site.register_module(
    Invoice, **{
        'create': InvoiceCreateView,
        'update': InvoiceUpdateView,
        'serializer': InvoiceSerializer,
        'report': True,
    })

site.register_module(InvoiceProduct, **{})


class InvoiceCategory(BaseCategory):
    name = _('Invoices')
    slug = "invoices"


site.register_dashboards(
    Accounting(
        InvoiceCategory(
Пример #13
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales

from .models import Product
from .models import ProductTax
from .models import PRODUCT_SERVICE
from .serializers import ProductSerializer
from .views import ProductCreateView
from .views import ProductDetailView
from .views import ProductUpdateView


site.register_module(Product, **{
    'create': ProductCreateView,
    'detail': ProductDetailView,
    'update': ProductUpdateView,
    'serializer': ProductSerializer,
})


site.register_module(ProductTax, **{
})


site.register_settings('bmfcontrib_product', {
    'default': forms.ModelChoiceField(queryset=Product.objects.filter(type=PRODUCT_SERVICE)),
})


class ProductCategory(BaseCategory):
    name = _('Products')
Пример #14
0
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Customer
from .serializers import CustomerSerializer
from .views import CustomerCreateView
from .views import CompanyCreateView
from .views import UpdateView

site.register_module(Customer, **{
    'create': {
        u'company': (_('Company'), CompanyCreateView),
        u'customer': (_('Customer'), CustomerCreateView),
    },
    'update': UpdateView,
    'serializer': CustomerSerializer,
})


class CustomerCategory(BaseCategory):
    name = _('Customer')
    slug = "customer"


site.register_dashboards(
    Sales(
        CustomerCategory(
            ViewFactory(
                model=Customer,
Пример #15
0
    )
    open = ViewFactory(
        model=Task,
        slug="open",
        name=_("Open tasks"),
        manager="active",
    )
    archive = ViewFactory(
        model=Task,
        slug="archive",
        name=_("Archive"),
    )


site.register_module(Task, **{
    'permissions': TaskPermission,
    'serializer': TaskSerializer,
})


site.register_module(Goal, **{
    'clone': GoalCloneView,
    'detail': GoalDetailView,
    'permissions': GoalPermission,
    'serializer': GoalSerializer,
})


site.register_dashboards(
    ProjectManagement(
        # ProjectCategory(
        #     ViewFactory(
Пример #16
0
from djangobmf.sites import site
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import TimeAndAttendance

from .models import Timesheet
from .serializers import TimesheetSerializer
from .permissions import TimesheetPermission
from .views import CreateView
from .views import UpdateView


site.register_module(Timesheet, **{
    'create': CreateView,
    'update': UpdateView,
    'serializer': TimesheetSerializer,
    'permissions': TimesheetPermission,
})


class TimesheetCategory(BaseCategory):
    name = _('Timesheets')
    slug = "timesheets"


site.register_dashboards(
    TimeAndAttendance(
        TimesheetCategory(
            ViewFactory(
                model=Timesheet,
                name=_("My timesheets"),
Пример #17
0
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import HumanResources
from djangobmf.sites import site

from .models import Employee
from .serializers import EmployeeSerializer
from .views import EmployeeCreateView

site.register_module(
    Employee, **{
        'create': EmployeeCreateView,
        'serializer': EmployeeSerializer,
    })


class EmployeeCategory(BaseCategory):
    name = _('Employees')
    slug = "employees"


site.register_dashboards(
    HumanResources(
        EmployeeCategory(
            ViewFactory(
                model=Employee,
                name=_("All Employees"),
Пример #18
0
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Position
from .serializers import PositionSerializer
from .views import PositionUpdateView
from .views import PositionCreateView
from .views import PositionAPI

site.register_module(
    Position, **{
        'create':
        PositionCreateView,
        'update':
        PositionUpdateView,
        'serializer':
        PositionSerializer,
        'api_urlpatterns':
        patterns(
            '',
            url(r'^api/$', PositionAPI.as_view(), name="api"),
        ),
    })


class PositionCategory(BaseCategory):
    name = _('Positions')
    slug = "positions"


site.register_dashboards(
    Sales(
Пример #19
0
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Accounting
from djangobmf.sites import site

from .models import Tax
from .serializers import TaxSerializer


site.register_module(Tax, **{
    'serializer': TaxSerializer,
})


class TaxCategory(BaseCategory):
    name = _('Taxes')
    slug = "taxes"


site.register_dashboards(
    Accounting(
        TaxCategory(
            ViewFactory(
                model=Tax,
                name=_("All Taxes"),
                slug="all",
Пример #20
0
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Position
from .serializers import PositionSerializer
from .views import PositionUpdateView
from .views import PositionCreateView
from .views import PositionAPI


site.register_module(Position, **{
    'create': PositionCreateView,
    'update': PositionUpdateView,
    'serializer': PositionSerializer,
    'api_urlpatterns': patterns(
        '',
        url(r'^api/$', PositionAPI.as_view(), name="api"),
    ),
})


class PositionCategory(BaseCategory):
    name = _('Positions')
    slug = "positions"


site.register_dashboards(
    Sales(
        PositionCategory(
            ViewFactory(
Пример #21
0
from djangobmf.sites import site
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import TimeAndAttendance

from .models import Timesheet
from .serializers import TimesheetSerializer
from .permissions import TimesheetPermission
from .views import CreateView
from .views import UpdateView

site.register_module(
    Timesheet, **{
        'create': CreateView,
        'update': UpdateView,
        'serializer': TimesheetSerializer,
        'permissions': TimesheetPermission,
    })


class TimesheetCategory(BaseCategory):
    name = _('Timesheets')
    slug = "timesheets"


site.register_dashboards(
    TimeAndAttendance(
        TimesheetCategory(
            ViewFactory(
                model=Timesheet,
Пример #22
0
from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import ViewFactory
from djangobmf.categories import ProjectManagement
from djangobmf.sites import site

from .categories import ProjectCategory
from .models import Project
from .permissions import ProjectPermission
from .serializers import ProjectSerializer
from .views import ProjectUpdateView


site.register_module(Project, **{
    'update': ProjectUpdateView,
    'permissions': ProjectPermission,
    'serializer': ProjectSerializer,
})


site.register_dashboards(
    ProjectManagement(
        ProjectCategory(
            ViewFactory(
                model=Project,
                name=_("Active projects"),
                slug="active",
                manager="active",
            ),
            ViewFactory(
                model=Project,
Пример #23
0
from djangobmf.sites import site
from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import HumanResources

from .models import Team
from .models import TeamMember
from .serializers import TeamSerializer
from .views import TeamCreateView
from .views import TeamUpdateView


site.register_module(Team, **{
    'create': TeamCreateView,
    'update': TeamUpdateView,
    'serializer': TeamSerializer,
})

site.register_module(TeamMember, **{
})


class TeamCategory(BaseCategory):
    name = _('Teams')
    slug = "teams"


site.register_dashboards(
    HumanResources(
        TeamCategory(
Пример #24
0
# ex:set fileencoding=utf-8:

from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import BaseCategory
from djangobmf.categories import ViewFactory
from djangobmf.categories import Sales
from djangobmf.sites import site

from .models import Address
from .serializers import AddressSerializer

site.register_module(Address, **{
    'serializer': AddressSerializer,
})


class AddressCategory(BaseCategory):
    name = _('Address')
    slug = "address"


site.register_dashboards(
    Sales(
        AddressCategory(
            ViewFactory(
                model=Address,
                name=_("All Addresses"),
                slug="all",
Пример #25
0
from django.utils.translation import ugettext_lazy as _

from djangobmf.categories import ViewFactory
from djangobmf.categories import ProjectManagement
from djangobmf.sites import site

from .categories import ProjectCategory
from .models import Project
from .permissions import ProjectPermission
from .serializers import ProjectSerializer
from .views import ProjectUpdateView

site.register_module(
    Project, **{
        'update': ProjectUpdateView,
        'permissions': ProjectPermission,
        'serializer': ProjectSerializer,
    })

site.register_dashboards(
    ProjectManagement(
        ProjectCategory(
            ViewFactory(
                model=Project,
                name=_("Active projects"),
                slug="active",
                manager="active",
            ),
            ViewFactory(
                model=Project,
                name=_("All projects"),