Code Monkey home page Code Monkey logo

django-quickbooks's People

Contributors

bedilbek avatar hassaanalansary avatar nrkfred avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-quickbooks's Issues

Is there an easy way to create an customer/invoice via this project?

I see there's classes such as Customer, Invoice which I presume are created for common use cases.

Say my goal is to programmatically create a customer/invoice, is there a quickstart guide for doing so?

I.e once I'm authed with QB desktop, is there a way to create a customer and send that request to the webconnector to process?
either via raw xml or a model?

If yall could post a short snippet on either this README example https://github.com/weltlink/django-quickbooks#implementation

or provide guidance on how I would add this customer to the QBD Task queue, that would be greatly appreciated!
Trying to understand what the django_quickbooks.services is used for....

from django_quickbooks.objects import BillAddress, ShipAddress, Customer
from django_quickbooks.services.customer import CustomerService
from lxml import etree

customer_xml = """<?xml version="1.0"?><?qbxml version="13.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <CustomerAddRq>
            <CustomerAdd>
                <Name>Amazon</Name>
                <FullName>Amazon</FullName>
                <IsActive>true</IsActive>
                <CompanyName>Amazon</CompanyName>
                <BillAddress>
                    <Addr1>2305 Litton Ln</Addr1>
                    <City>Hebron</City>
                    <State>Kentucky</State>
                    <PostalCode>41048</PostalCode>
                    <Country>United States</Country>
                    <Note>Nice address</Note>
                </BillAddress>
                <ShipAddress>
                    <Addr1>2305 Litton Ln</Addr1>
                    <City>Hebron</City>
                    <State>Kentucky</State>
                    <PostalCode>41048</PostalCode>
                    <Country>United States</Country>
                    <Note>Nice address</Note>
                </ShipAddress>
                <Phone>998909090909</Phone>
                <AltPhone>998909090910</AltPhone>
                <Fax>998909090911</Fax>
                <Email>[email protected]</Email>
                <Contact>Someone from Amazon</Contact>
                <AltContact>Some other one from Amazon</AltContact>
            </CustomerAdd>
        </CustomerAddRq>
    </QBXMLMsgsRq>
</QBXML>"""

root_lxml = etree.fromstring(customer_xml)
customer = Customer.from_lxml(root_lxml)
cs = CustomerService()
cs.add(customer)

queue_manager.py _get_connection function failing

When BlockingConnection is being called it is basically just timing out.
Is there additional setup that is not documented? I get that there is a link to formal documentation.
So is there more to what I need in order to get this working?

Is this project still active?

Hi - I'm looking for a tool to sync Quickbooks desktop data with MySQL. Is this project still active? Can it be used for this use case?
Thanks
Toby

queue_manager.py _get_connection failing

For some reason pika's BlockingConnection is just getting stuck. Not sure if I need to do anything to the rabbitmq settings? I followed the documentation and trying to simply add a customer.

This function inside of queue manager fails.

    def _get_connection(self) -> BlockingConnection:
        if hasattr(self, '_connection') and self._connection and self._connection.is_open:
            return self._connection
        self._connection = BlockingConnection(
            ConnectionParameters(
                host=qbwc_settings.RABBITMQ_DEFAULT_HOST,
                virtual_host=qbwc_settings.RABBITMQ_DEFAULT_VHOST,
                credentials=PlainCredentials(
                    username=qbwc_settings.RABBITMQ_DEFAULT_USER,
                    password=qbwc_settings.RABBITMQ_DEFAULT_PASS
                ),
                heartbeat=600,
                blocked_connection_timeout=300,
                connection_attempts=1000,
            )
        )

        return self._connection

Stability

Hi, this project looks great and seems to be exactly what I'm looking for. However, I am curious about stability. Is the project as a whole ready for production use? Are the QB Desktop features ready for production use?

Thanks!

How to only send XML data using this library

class create_xml_customer(Service):
def run_test(self):
sample_customer_xml = """

800004ED-1525972764
2018-03-24T00:31:04+05:00
2018-03-24T00:31:04+05:00
1525972764
Amazon
Amazon
true
Amazon

2305 Litton Ln




Hebron
Kentucky
41048
United States
Nice address


2305 Litton Ln




Hebron
Kentucky
41048
United States
Nice address

998909090909
998909090910
998909090911
[email protected]
Someone from Amazon
Some other one from Amazon

"""
sample_customer_data = dict(
ListID='800004ED-1525972764',
TimeCreated='2018-03-24T00:31:04+05:00',
TimeModified='2018-03-24T00:31:04+05:00',
EditSequence='1525972764',
Name='Amazon',
FullName='Amazon',
IsActive=True,
CompanyName='Amazon',
Phone='998909090909',
AltPhone='998909090910',
Fax='998909090911',
Email='[email protected]',
Contact='Someone from Amazon',
AltContact='Some other one from Amazon',
)
sample_address_data = dict(
Addr1='2305 Litton Ln',
City='Hebron',
State='Kentucky',
PostalCode='41048',
Country='United States',
Note='Nice address'
)
root_lxml = etree.fromstring(sample_customer_xml)
customer = Customer.from_lxml(root_lxml)
assert customer.ListID == sample_customer_data['ListID']
assert customer.TimeCreated == sample_customer_data['TimeCreated']
assert customer.TimeModified == sample_customer_data['TimeModified']
assert customer.EditSequence == sample_customer_data['EditSequence']
assert customer.Name == sample_customer_data['Name']
assert customer.FullName == sample_customer_data['FullName']
assert customer.IsActive == sample_customer_data['IsActive']
assert customer.CompanyName == sample_customer_data['CompanyName']
assert customer.Phone == sample_customer_data['Phone']
assert customer.AltPhone == sample_customer_data['AltPhone']
assert customer.Fax == sample_customer_data['Fax']
assert customer.Email == sample_customer_data['Email']
assert customer.Contact == sample_customer_data['Contact']
assert customer.AltContact == sample_customer_data['AltContact']

    # assert customer.BillAddress == BillAddress(**sample_address_data)
    # assert customer.ShipAddress == ShipAddress(**sample_address_data)

    from django_quickbooks.objects import Customer as QBCustomer
    # map your fields to the qbd_obj fields
    xx = QBCustomer(customer)
    # QBDTask.objects.create(qb_operation=QUICKBOOKS_ENUMS.OPP_ADD,
    #                        qb_resource=QUICKBOOKS_ENUMS.RESOURCE_CUSTOMER,
    #                        object_id=instance.id,
    #                        content_type=ContentType.objects.get_for_model(instance),
    #                        realm_id="6aea80599dad4469920d0d633b67d0f4",
    #
    #                        )
    xx = CustomerService.add(self, customer)
    if xx:
        return xx
    else:
        return xx

This is the code, try to run without sending object_id how can I add this in the queue manager

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.