chicks/sugarcrm — Issue #67: Can't associate Accounts with Quotes
Author: gpedic
Created: 2011-11-03 12:10:42+00:00
State: open

When I try to create an association between an account and a quote using for example:

acc = SugarCRM::Account.find('any-account-id')
quot = SugarCRM::Quote.new({
:name => "test",
:billing_account_name: acc.name
...
})
acc.quotes << quot

The assignment fails with:
SugarCRM::InvalidAssociation (Could not lookup association for: # returns false
but the opposite is true for Accounts
acc.associations.find!(quot) -> returns true

Adding the missing association seems like the most likely fix for this, but I'm not really sure how to do it.