-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create new TrackingOptions #871
Comments
a quick solution is to use your own class when creating the option but that doesn't help you if you want to edit them <?php
namespace App\Xero\Models;
use XeroPHP\Models\Accounting\TrackingCategory\TrackingOption as ParentTrackingOption;
class TrackingOption extends ParentTrackingOption
{
/**
* @inheritdoc
*/
public static function getRootNodeName()
{
return 'Option';
}
} |
@willpower232does this work? Over the years there has been inconstant behaviour handling Tracking Categories and options. |
I can definitely create tracking options now and the XML is clearly broken without it so I'd say this is definitely needed. Unless there was some wildly different intention from that PR, I'm not sure how they're possibly using the model although the addition of methods in |
Yeah maybe something has changed, or we've finally found a solution? Let's merge this because, as you say, it's not working as it is. |
Apologies, for not getting a reply to the tag above on this sooner. When I created the original MR, I was taking someones older work and just making sure it had no conflicts so could be merged. I ended up not using this feature in my project and instead doing a manual work around. I apologies @willpower232 as I did not test this well enough as has been clearly shown in this issue. |
I would like to create a TrackingOption as part of preparing a Demo Company for development.
Unfortunately the following code does nothing
Having inspected the savePropertiesDirectly method, I extracted the following XML body
I can see that in #801 @philipdarlo set
TrackingOption::getRootNodeName
to an empty string for some reason.I can obviously PR to restore the word "Option" but was there any particular reason for blanking the return?
The text was updated successfully, but these errors were encountered: