// Path: app/src/main/java/com/odoo/addons/website_sale/models/ProductPublicCategory.java
// public class ProductPublicCategory extends OModel {
// 
//     OColumn name = new OColumn("Name", OVarchar.class);
//     OColumn complete_name = new OColumn("Complete Name", OVarchar.class);
//     OColumn parent_id = new OColumn("Parent category", ProductPublicCategory.class, OColumn.RelationType.ManyToOne);
//     OColumn sequence = new OColumn("Sequence", OInteger.class).setDefaultValue(0);
//     OColumn image_medium = new OColumn("Image", OBlob.class).setDefaultValue("false");
// 
//     public ProductPublicCategory(Context context) {
//         super(context, "product.public.category");
//     }
// 
//     public static boolean hasCategories(Context context) {
//         ProductPublicCategory category = new ProductPublicCategory(context);
//         return category.count(null, null) > 0;
//     }
// 
// }


import android.content.Context;
import android.os.AsyncTask;
import com.odoo.App;
import com.odoo.addons.website_sale.models.ProductPublicCategory;
import com.odoo.core.utils.logger.OLog;
package com.odoo.addons.website_sale;



public class ProductCategoryLoader extends AsyncTask<Void, Void, Void> {
    private Context mContext;
    private ProductPublicCategory category;
    private OnCategoryLoadListener mOnCategoryLoadListener;
    private App mApp;

    public ProductCategoryLoader(Context context, OnCategoryLoadListener callback) {
        mContext = context;
        mApp = (App) mContext.getApplicationContext();
        category = new ProductPublicCategory(context);
        mOnCategoryLoadListener = callback;
    }

    @Override
    protected Void doInBackground(Void... params) {
        try {
            if (mApp.inNetwork()) {
                category.quickSyncRecords(null, true);
            }
            Thread.sleep(1000);
        } catch (Exception e) {

        }
        return null;
    }

// Path: app/src/main/java/com/odoo/addons/website_sale/models/ProductPublicCategory.java
// public class ProductPublicCategory extends OModel {
// 
//     OColumn name = new OColumn("Name", OVarchar.class);
//     OColumn complete_name = new OColumn("Complete Name", OVarchar.class);
//     OColumn parent_id = new OColumn("Parent category", ProductPublicCategory.class, OColumn.RelationType.ManyToOne);
//     OColumn sequence = new OColumn("Sequence", OInteger.class).setDefaultValue(0);
//     OColumn image_medium = new OColumn("Image", OBlob.class).setDefaultValue("false");
// 
//     public ProductPublicCategory(Context context) {
//         super(context, "product.public.category");
//     }
// 
//     public static boolean hasCategories(Context context) {
//         ProductPublicCategory category = new ProductPublicCategory(context);
//         return category.count(null, null) > 0;
//     }
// 
// }


// Path: app/src/main/java/com/odoo/addons/website_sale/ProductCategoryLoader.java
import android.content.Context;
import android.os.AsyncTask;
import com.odoo.App;
import com.odoo.addons.website_sale.models.ProductPublicCategory;
import com.odoo.core.utils.logger.OLog;

package com.odoo.addons.website_sale;



public class ProductCategoryLoader extends AsyncTask<Void, Void, Void> {
    private Context mContext;
    private ProductPublicCategory category;
    private OnCategoryLoadListener mOnCategoryLoadListener;
    private App mApp;

    public ProductCategoryLoader(Context context, OnCategoryLoadListener callback) {
        mContext = context;
        mApp = (App) mContext.getApplicationContext();
        category = new ProductPublicCategory(context);
        mOnCategoryLoadListener = callback;
    }

    @Override
    protected Void doInBackground(Void... params) {
        try {
            if (mApp.inNetwork()) {
                category.quickSyncRecords(null, true);
            }
            Thread.sleep(1000);
        } catch (Exception e) {

        }
        return null;
    }

    @Override