Skip to content

Purchase order: Property Name:Unrecognized field "BillableSt specified is unsupported or invalid #38

@RemyAlves

Description

@RemyAlves

Hi,
First of all thanks for this beautiful repo, it helped me win so much time on my qb integration.

Im trying right now to create purchase order, but after putting (I think) every correctly, I end up on this error : "2010: Property Name: Unrecognized field "BillableSt specified is unsupported or invalid".
I tryed to remove line 51 or purchaseorder.py:PurchaseOrderLine : ' self.BillableStatus = "" ', seem to solve this problem.

But after doing so, I got an other problem, more strange and can't find a way to do it. I tried to take exemple from the test but don't work.

2010: Property Name:Can not deserialize instance of com.intuit.schema.finance.v3.LineDetailTypeEnum out of START_OBJECT token specified is unsupported or invalid

I'm dropping my code right here, tell me what you think about it, if its on my side (probably) or yours.
Thanks a lot ! :)

    po = PurchaseOrder()

    vendor_obj = Ref()
    vendor_obj.value = "21"
    vendor_obj.name = "Cali'Remy_Remy_Alves"
    po.VendorRef = vendor_obj

    expenseAccount = Ref()
    expenseAccount.name = "Cost of Goods Sold"
    expenseAccount.value = "60"
    po.APAccountRef = expenseAccount

    line = PurchaseOrderLine()
    line.LineNum = 1
    line.Amount = 42
    line.Description = "Yolo description"

    line.DetailType = ItemBasedExpenseLineDetail()
    item = Item.all(max_results=1, qb=client)[0]
    line.DetailType.ItemRef = item.to_ref()

    po.Line.append( line )

    po.save(qb=client)

Have a good day

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions