// Path: app/src/main/java/com/odoo/addons/products/models/ProductProduct.java
// public class ProductProduct extends OModel {
// 
//     OColumn name = new OColumn("Name", OVarchar.class);
//     OColumn lst_price = new OColumn("Price", OFloat.class).setDefaultValue(0);
//     OColumn website_published = new OColumn("Published", OBoolean.class).setDefaultValue("true");
//     OColumn website_sequence = new OColumn("Sequence", OInteger.class).setDefaultValue(0);
// 
//     // Relation columns
//     OColumn product_tmpl_id = new OColumn("Template", ProductTemplate.class,
//             OColumn.RelationType.ManyToOne);
// 
//     OColumn public_categ_ids = new OColumn("Public category", ProductPublicCategory.class,
//             OColumn.RelationType.ManyToMany)
//             .setRecordSyncLimit(-1);
// 
//     OColumn attribute_value_ids = new OColumn("Attributes", ProductAttributeValue.class, OColumn.RelationType.ManyToMany)
//             .setRecordSyncLimit(-1);
// 
//     public ProductProduct(Context context) {
//         super(context, "product.product");
//     }
// }


import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
import com.odoo.App;
import com.odoo.addons.products.models.ProductProduct;
package com.odoo.addons.products.services;



public class ProductSyncService extends IntentService {
    public static final String TAG = ProductSyncService.class.getSimpleName();
    public static final String KEY_RESULT_RECEIVER = "result_receiver";
    private App app;

    public ProductSyncService() {
        super(TAG);
        Log.i(TAG, "ProductSyncService()");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        Log.i(TAG, "ProductSyncService START");
        app = (App) getApplicationContext();
        if (app.inNetwork()) {
            try {
// Path: app/src/main/java/com/odoo/addons/products/models/ProductProduct.java
// public class ProductProduct extends OModel {
// 
//     OColumn name = new OColumn("Name", OVarchar.class);
//     OColumn lst_price = new OColumn("Price", OFloat.class).setDefaultValue(0);
//     OColumn website_published = new OColumn("Published", OBoolean.class).setDefaultValue("true");
//     OColumn website_sequence = new OColumn("Sequence", OInteger.class).setDefaultValue(0);
// 
//     // Relation columns
//     OColumn product_tmpl_id = new OColumn("Template", ProductTemplate.class,
//             OColumn.RelationType.ManyToOne);
// 
//     OColumn public_categ_ids = new OColumn("Public category", ProductPublicCategory.class,
//             OColumn.RelationType.ManyToMany)
//             .setRecordSyncLimit(-1);
// 
//     OColumn attribute_value_ids = new OColumn("Attributes", ProductAttributeValue.class, OColumn.RelationType.ManyToMany)
//             .setRecordSyncLimit(-1);
// 
//     public ProductProduct(Context context) {
//         super(context, "product.product");
//     }
// }


// Path: app/src/main/java/com/odoo/addons/products/services/ProductSyncService.java
import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
import com.odoo.App;
import com.odoo.addons.products.models.ProductProduct;

package com.odoo.addons.products.services;



public class ProductSyncService extends IntentService {
    public static final String TAG = ProductSyncService.class.getSimpleName();
    public static final String KEY_RESULT_RECEIVER = "result_receiver";
    private App app;

    public ProductSyncService() {
        super(TAG);
        Log.i(TAG, "ProductSyncService()");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        Log.i(TAG, "ProductSyncService START");
        app = (App) getApplicationContext();
        if (app.inNetwork()) {
            try {
                ProductProduct products = new ProductProduct(getApplicationContext());