)
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 7/1/15 5:11 PM
19 | */
20 | package odoo.controls;
21 |
22 | public interface IOnDomainFilterCallbacks {
23 | void onFieldValueChanged(Object value);
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_drawer_group_layout.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
12 |
13 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/odoo_news.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
17 |
18 |
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/IModuleInstallListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 27/4/15 4:35 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | public interface IModuleInstallListener {
23 | void installedOnServer(boolean isInstalled);
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OTimestamp.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:30 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OTimestamp extends ODateTime {
23 | public static final String TAG = OTimestamp.class.getSimpleName();
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/odoo/controls/IOnQuickRecordCreateListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 20/1/15 5:01 PM
19 | */
20 | package odoo.controls;
21 |
22 | import com.odoo.core.orm.ODataRow;
23 |
24 | public interface IOnQuickRecordCreateListener {
25 | public void onRecordCreated(ODataRow row);
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/odoo/controls/ExpandableListOperationListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 3/2/15 2:17 PM
19 | */
20 | package odoo.controls;
21 |
22 | import java.util.List;
23 |
24 | public interface ExpandableListOperationListener {
25 | public void onAdapterDataChange(List items);
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/IDatabaseListListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 21/4/15 7:25 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | import java.util.List;
23 |
24 | public interface IDatabaseListListener {
25 | void onDatabasesLoad(List dbs);
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/config/BaseConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 5/1/15 5:55 PM
19 | */
20 | package com.odoo.config;
21 |
22 | public class BaseConfig {
23 | /**
24 | * Do not remove following constants.
25 | */
26 |
27 | public static final boolean DEVELOPER_MODE = true;
28 | }
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/sys/IOnActivityResultListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 19/12/14 1:00 PM
19 | */
20 | package com.odoo.core.utils.sys;
21 |
22 | import android.content.Intent;
23 |
24 | public interface IOnActivityResultListener {
25 | public void onOdooActivityResult(int requestCode, int resultCode, Intent data);
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/IOdooConnectionListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 21/4/15 5:52 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | import com.odoo.core.rpc.Odoo;
23 |
24 | public interface IOdooConnectionListener {
25 | void onConnect(Odoo odoo);
26 |
27 | void onError(OdooError error);
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/odoo/controls/IOnChangeCallback.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 7/1/15 5:11 PM
19 | */
20 | package odoo.controls;
21 |
22 | import com.odoo.core.orm.ODataRow;
23 |
24 | public interface IOnChangeCallback {
25 | public static final String TAG = IOnChangeCallback.class.getSimpleName();
26 |
27 | public void onValueChange(ODataRow row);
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/config/FirstLaunchConfig.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 28/4/15 4:32 PM
19 | */
20 | package com.odoo.config;
21 |
22 | import android.content.Context;
23 |
24 | import com.odoo.core.support.OUser;
25 |
26 | public class FirstLaunchConfig {
27 |
28 | public static void onFirstLaunch(Context context, OUser user) {
29 |
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/IOdooResponse.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 21/4/15 6:01 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | import com.odoo.core.rpc.helper.utils.gson.OdooResult;
23 |
24 | public interface IOdooResponse {
25 | void onResponse(OdooResult response);
26 |
27 | void onError(OdooError error);
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/service/ISyncFinishListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 1/1/15 3:16 PM
19 | */
20 | package com.odoo.core.service;
21 |
22 | import android.content.SyncResult;
23 |
24 | import com.odoo.core.support.OUser;
25 |
26 | public interface ISyncFinishListener {
27 | public OSyncAdapter performNextSync(OUser user, SyncResult syncResult);
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/service/ISyncServiceListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 10/4/15 3:49 PM
19 | */
20 | package com.odoo.core.service;
21 |
22 | public interface ISyncServiceListener {
23 | public void onSyncStarted();
24 |
25 | public void onSyncFinished();
26 |
27 | public void onSyncFailed();
28 |
29 | public void onSyncTimedOut();
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/support/list/IOnItemClickListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 13/1/15 3:09 PM
19 | */
20 | package com.odoo.core.support.list;
21 |
22 | import android.view.View;
23 |
24 | public interface IOnItemClickListener {
25 | public void onItemDoubleClick(View view, int position);
26 |
27 | public void onItemClick(View view, int position);
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OHtml.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OHtml extends OTypeHelper {
23 | public static final String TAG = OHtml.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "TEXT";
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OText.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OText extends OTypeHelper {
23 | public static final String TAG = OText.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "TEXT";
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/internal/ObjectConstructor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson.internal;
18 |
19 | /**
20 | * Defines a generic object construction factory. The purpose of this class
21 | * is to construct a default instance of a class that can be used for object
22 | * navigation while deserialization from its JSON representation.
23 | *
24 | * @author Inderjeet Singh
25 | * @author Joel Leitch
26 | */
27 | public interface ObjectConstructor {
28 |
29 | /**
30 | * Returns a new instance.
31 | */
32 | public T construct();
33 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OBlob.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OBlob extends OTypeHelper {
23 | public static final String TAG = OBlob.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "BLOB";
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/service/receivers/ISyncFinishReceiver.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 1/1/15 3:18 PM
19 | */
20 | package com.odoo.core.service.receivers;
21 |
22 | import android.content.BroadcastReceiver;
23 |
24 | public abstract class ISyncFinishReceiver extends BroadcastReceiver {
25 | public static final String SYNC_FINISH = "ISyncFinishReceiver.SYNC_FINISH";
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OFloat.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OFloat extends OTypeHelper {
23 | public static final String TAG = OFloat.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "REAL";
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OInteger.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OInteger extends OTypeHelper {
23 | public static final String TAG = OInteger.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "INTEGER";
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OSelection.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:30 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OSelection extends OTypeHelper {
23 | public static final String TAG = OSelection.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "VARCHAR";
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/support/addons/fragment/ISyncStatusObserverListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 8/1/15 12:23 PM
19 | */
20 | package com.odoo.core.support.addons.fragment;
21 |
22 | public interface ISyncStatusObserverListener {
23 | public static final String TAG = ISyncStatusObserverListener.class.getSimpleName();
24 |
25 | public void onStatusChange(Boolean refreshing);
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
13 |
14 |
16 |
17 |
18 |
19 |
23 |
24 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/handler/OdooVersionException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 21/4/15 4:06 PM
19 | */
20 | package com.odoo.core.rpc.handler;
21 |
22 | public class OdooVersionException extends Exception {
23 | public static final String TAG = OdooVersionException.class.getSimpleName();
24 |
25 | public OdooVersionException(String message) {
26 | super(message);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/IOdooLoginCallback.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 22/4/15 12:32 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | import com.odoo.core.rpc.Odoo;
23 | import com.odoo.core.support.OUser;
24 |
25 | public interface IOdooLoginCallback {
26 | void onLoginSuccess(Odoo odoo, OUser user);
27 |
28 | void onLoginFail(OdooError error);
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_about.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
14 |
15 | -
21 |
22 | -
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/internal/JsonReaderInternalAccess.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson.internal;
18 |
19 | import com.google.gson.stream.JsonReader;
20 | import java.io.IOException;
21 |
22 | /**
23 | * Internal-only APIs of JsonReader available only to other classes in Gson.
24 | */
25 | public abstract class JsonReaderInternalAccess {
26 | public static JsonReaderInternalAccess INSTANCE;
27 |
28 | /**
29 | * Changes the type of the current property name token to a string value.
30 | */
31 | public abstract void promoteNameToValue(JsonReader reader) throws IOException;
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/support/addons/fragment/IOnSearchViewChangeListener.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 8/1/15 6:30 PM
19 | */
20 | package com.odoo.core.support.addons.fragment;
21 |
22 | public interface IOnSearchViewChangeListener {
23 | public static final String TAG = IOnSearchViewChangeListener.class.getSimpleName();
24 |
25 | public boolean onSearchViewTextChange(String newFilter);
26 |
27 | public void onSearchViewClose();
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/helper/utils/OBundleUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 22/4/15 11:27 AM
19 | */
20 | package com.odoo.core.rpc.helper.utils;
21 |
22 | import android.os.Bundle;
23 |
24 | public class OBundleUtils {
25 | public static final String TAG = OBundleUtils.class.getSimpleName();
26 |
27 | public static boolean hasKey(Bundle bundle, String key) {
28 | return (bundle != null && bundle.containsKey(key));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 25
5 | buildToolsVersion '25'
6 | defaultConfig {
7 | useLibrary 'org.apache.http.legacy'
8 | manifestPlaceholders = [applicationName: "Odoo"]
9 | applicationId "com.odoo"
10 | minSdkVersion 14
11 | targetSdkVersion 25
12 | versionCode 7
13 | versionName "2.3.0"
14 | }
15 | buildTypes {
16 | debug {
17 | minifyEnabled true
18 | shrinkResources true
19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20 | }
21 | release {
22 | minifyEnabled true
23 | shrinkResources true
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | }
28 |
29 | dependencies {
30 | compile fileTree(include: ['*.jar'], dir: 'libs')
31 | compile 'com.android.support:appcompat-v7:25.1.0'
32 | compile 'com.android.support:cardview-v7:25.1.0'
33 | compile 'com.google.android.gms:play-services-gcm:10.0.1'
34 | compile 'com.android.support:design:25.1.0'
35 | compile 'com.android.volley:volley:1.0.0'
36 | compile project(':intro-slider-lib')
37 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/support/addons/fragment/IBaseFragment.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 30/12/14 3:30 PM
19 | */
20 | package com.odoo.core.support.addons.fragment;
21 |
22 | import android.content.Context;
23 |
24 | import com.odoo.core.support.drawer.ODrawerItem;
25 |
26 | import java.util.List;
27 |
28 | public interface IBaseFragment {
29 | public List drawerMenus(Context context);
30 |
31 | public Class database();
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/news_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
21 |
22 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OBoolean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OBoolean extends OTypeHelper {
23 | public static final String TAG = OBoolean.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "VARCHAR";
28 | }
29 |
30 | @Override
31 | public Integer getFieldSize() {
32 | return 10;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OVarchar.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:30 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public class OVarchar extends OTypeHelper {
23 | public static final String TAG = OVarchar.class.getSimpleName();
24 |
25 | @Override
26 | public String getFieldType() {
27 | return "VARCHAR";
28 | }
29 |
30 | @Override
31 | public Integer getFieldSize() {
32 | return 64;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/odoo/controls/OControlHelper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 7/1/15 5:46 PM
19 | */
20 | package odoo.controls;
21 |
22 | import android.graphics.Typeface;
23 |
24 | public class OControlHelper {
25 | public static final String TAG = OControlHelper.class.getSimpleName();
26 |
27 | public static Typeface boldFont() {
28 | return Typeface.create("sans-serif-condensed", 0);
29 | }
30 |
31 | public static Typeface lightFont() {
32 | return Typeface.create("sans-serif-light", 0);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/reminder/ReminderActionReceiver.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 9/1/15 6:15 PM
19 | */
20 | package com.odoo.core.utils.reminder;
21 |
22 | import android.content.BroadcastReceiver;
23 | import android.content.Context;
24 | import android.content.Intent;
25 |
26 | public class ReminderActionReceiver extends BroadcastReceiver {
27 | public static final String TAG = ReminderActionReceiver.class.getSimpleName();
28 |
29 | @Override
30 | public void onReceive(Context context, Intent intent) {
31 |
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/ODateTime.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | import com.odoo.core.utils.ODateUtils;
23 |
24 | public class ODateTime extends OTypeHelper {
25 | public static final String TAG = ODateTime.class.getSimpleName();
26 |
27 | @Override
28 | public String getFieldType() {
29 | return "VARCHAR";
30 | }
31 |
32 | @Override
33 | public String getDataFormat() {
34 | return ODateUtils.DEFAULT_FORMAT;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/ODate.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:29 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | import com.odoo.core.utils.ODateUtils;
23 |
24 | public class ODate extends OTypeHelper {
25 | public static final String TAG = ODate.class.getSimpleName();
26 |
27 | @Override
28 | public String getFieldType() {
29 | return "VARCHAR";
30 | }
31 |
32 | @Override
33 | public String getDataFormat() {
34 | return ODateUtils.DEFAULT_DATE_FORMAT;
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/addons/customers/providers/CustomersSyncProvider.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 2/1/15 2:25 PM
19 | */
20 | package com.odoo.addons.customers.providers;
21 |
22 | import com.odoo.base.addons.res.ResPartner;
23 | import com.odoo.core.orm.provider.BaseModelProvider;
24 |
25 | public class CustomersSyncProvider extends BaseModelProvider {
26 | public static final String TAG = CustomersSyncProvider.class.getSimpleName();
27 |
28 | @Override
29 | public String authority() {
30 | return ResPartner.AUTHORITY;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_customer_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
9 |
13 |
17 | -
22 |
23 |
26 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_attachment_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
22 |
23 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Odoo
4 | Customers
5 | Information Saved
6 | Image size too large !
7 | No Customer Found !
8 | Message to %s
9 | Add and internal note
10 | Add an internal note that will not be sent to the followers
11 | Log note
12 | Send a message
13 | Log an internal note
14 | Build
15 | Storage permission required to create downloaded file on your sdcard.
16 | Storage permission required to store downloaded files on sdcard of your phone. Please grant permission for use this feature
17 | Are you sure want to delete ?
18 | Record deleted
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OResource.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 18/12/14 11:25 AM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import android.content.Context;
23 |
24 | public class OResource {
25 | public static String string(Context context, int res_id) {
26 | return context.getResources().getString(res_id);
27 | }
28 |
29 | public static Integer dimen(Context context, int res_id) {
30 | return (int) context.getResources().getDimension(res_id);
31 | }
32 |
33 | public static int color(Context context, int res_id) {
34 | return context.getResources().getColor(res_id);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/helper/utils/gson/OdooResponse.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 22/4/15 3:57 PM
19 | */
20 | package com.odoo.core.rpc.helper.utils.gson;
21 |
22 | public class OdooResponse {
23 | public String jsonrpc;
24 | public Integer id;
25 | public OdooResult result;
26 | public OdooResult error;
27 |
28 | @Override
29 | public String toString() {
30 | return "OdooResponse{" +
31 | "jsonrpc='" + jsonrpc + '\'' +
32 | ", error='" + error + '\'' +
33 | ", id=" + id +
34 | ", result=" + result +
35 | '}';
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/logger/OLog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | */
19 | package com.odoo.core.utils.logger;
20 |
21 | import android.text.TextUtils;
22 | import android.util.Log;
23 |
24 | public class OLog {
25 |
26 | public static void log(String... messages) {
27 | String message = TextUtils.join(", ", messages);
28 | final Throwable throwable = new Throwable();
29 | final StackTraceElement[] elements = throwable.getStackTrace();
30 | final String callerClassName = elements[1].getClassName();
31 | final String callerMethodName = elements[1].getMethodName();
32 | Log.e(callerClassName + "[" + callerMethodName + "] ", message);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/odoo_activity.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/internal/$Gson$Preconditions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson.internal;
18 |
19 | /**
20 | * A simple utility class used to check method Preconditions.
21 | *
22 | *
23 | * public long divideBy(long value) {
24 | * Preconditions.checkArgument(value != 0);
25 | * return this.value / value;
26 | * }
27 | *
28 | *
29 | * @author Inderjeet Singh
30 | * @author Joel Leitch
31 | */
32 | public final class $Gson$Preconditions {
33 | public static T checkNotNull(T obj) {
34 | if (obj == null) {
35 | throw new NullPointerException();
36 | }
37 | return obj;
38 | }
39 |
40 | public static void checkArgument(boolean condition) {
41 | if (!condition) {
42 | throw new IllegalArgumentException();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/FieldNamingStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson;
18 |
19 | import java.lang.reflect.Field;
20 |
21 | /**
22 | * A mechanism for providing custom field naming in Gson. This allows the client code to translate
23 | * field names into a particular convention that is not supported as a normal Java field
24 | * declaration rules. For example, Java does not support "-" characters in a field name.
25 | *
26 | * @author Inderjeet Singh
27 | * @author Joel Leitch
28 | * @since 1.3
29 | */
30 | public interface FieldNamingStrategy {
31 |
32 | /**
33 | * Translates the field name into its JSON field name representation.
34 | *
35 | * @param f the field object that we are translating
36 | * @return the translated field name.
37 | * @since 1.3
38 | */
39 | public String translateName(Field f);
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/base/addons/mail/MailMessageSubType.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 27/3/15 12:33 PM
19 | */
20 | package com.odoo.base.addons.mail;
21 |
22 | import android.content.Context;
23 |
24 | import com.odoo.core.orm.OModel;
25 | import com.odoo.core.orm.fields.OColumn;
26 | import com.odoo.core.orm.fields.types.OVarchar;
27 | import com.odoo.core.support.OUser;
28 |
29 | public class MailMessageSubType extends OModel {
30 | public static final String TAG = MailMessageSubType.class.getSimpleName();
31 |
32 | OColumn name = new OColumn("Name", OVarchar.class);
33 |
34 | public MailMessageSubType(Context context, OUser user) {
35 | super(context, "mail.message.subtype", user);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/JsonIOException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.google.gson;
17 |
18 | /**
19 | * This exception is raised when Gson was unable to read an input stream
20 | * or write to one.
21 | *
22 | * @author Inderjeet Singh
23 | * @author Joel Leitch
24 | */
25 | public final class JsonIOException extends JsonParseException {
26 | private static final long serialVersionUID = 1L;
27 |
28 | public JsonIOException(String msg) {
29 | super(msg);
30 | }
31 |
32 | public JsonIOException(String msg, Throwable cause) {
33 | super(msg, cause);
34 | }
35 |
36 | /**
37 | * Creates exception with the specified cause. Consider using
38 | * {@link #JsonIOException(String, Throwable)} instead if you can describe what happened.
39 | *
40 | * @param cause root exception that caused this exception to be thrown.
41 | */
42 | public JsonIOException(Throwable cause) {
43 | super(cause);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/auth/OdooAuthService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 17/12/14 6:20 PM
19 | */
20 | package com.odoo.core.auth;
21 |
22 | import android.accounts.AccountManager;
23 | import android.app.Service;
24 | import android.content.Intent;
25 | import android.os.IBinder;
26 |
27 | public class OdooAuthService extends Service {
28 | private OdooAuthenticator mAuthenticator;
29 |
30 | @Override
31 | public IBinder onBind(Intent intent) {
32 | IBinder binder = null;
33 | if (intent.getAction().equals(AccountManager.ACTION_AUTHENTICATOR_INTENT)) {
34 | mAuthenticator = new OdooAuthenticator(this);
35 | binder = mAuthenticator.getIBinder();
36 | }
37 | return binder;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_instance_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
27 |
28 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/config/Addons.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 30/12/14 3:11 PM
19 | */
20 | package com.odoo.config;
21 |
22 | import com.odoo.addons.customers.Customers;
23 | import com.odoo.core.support.addons.AddonsHelper;
24 | import com.odoo.core.support.addons.OAddon;
25 |
26 | public class Addons extends AddonsHelper {
27 |
28 | /**
29 | * Declare your required module here
30 | * NOTE: For maintain sequence use object name in asc order.
31 | * Ex.:
32 | * OAddon partners = new OAddon(Partners.class).setDefault();
33 | * for maintain sequence call withSequence(int sequence)
34 | * OAddon partners = new OAddon(Partners.class).withSequence(2);
35 | */
36 | OAddon customers = new OAddon(Customers.class).setDefault();
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/JsonSyntaxException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.google.gson;
17 |
18 | /**
19 | * This exception is raised when Gson attempts to read (or write) a malformed
20 | * JSON element.
21 | *
22 | * @author Inderjeet Singh
23 | * @author Joel Leitch
24 | */
25 | public final class JsonSyntaxException extends JsonParseException {
26 |
27 | private static final long serialVersionUID = 1L;
28 |
29 | public JsonSyntaxException(String msg) {
30 | super(msg);
31 | }
32 |
33 | public JsonSyntaxException(String msg, Throwable cause) {
34 | super(msg, cause);
35 | }
36 |
37 | /**
38 | * Creates exception with the specified cause. Consider using
39 | * {@link #JsonSyntaxException(String, Throwable)} instead if you can
40 | * describe what actually happened.
41 | *
42 | * @param cause root exception that caused this exception to be thrown.
43 | */
44 | public JsonSyntaxException(Throwable cause) {
45 | super(cause);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/reminder/ReminderReceiver.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 9/1/15 6:15 PM
19 | */
20 | package com.odoo.core.utils.reminder;
21 |
22 | import android.content.BroadcastReceiver;
23 | import android.content.Context;
24 | import android.content.Intent;
25 | import android.os.Bundle;
26 |
27 | public class ReminderReceiver extends BroadcastReceiver {
28 | public static final String TAG = ReminderReceiver.class.getSimpleName();
29 |
30 | @Override
31 | public void onReceive(Context context, Intent intent) {
32 | String type = intent.getStringExtra(ReminderUtils.KEY_REMINDER_TYPE);
33 | showNotification(context, type, intent.getExtras());
34 | }
35 |
36 | private void showNotification(Context context, String type, Bundle data) {
37 |
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_account_ask_pass.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
27 |
28 |
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OListUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 7/1/15 12:43 PM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import java.util.ArrayList;
23 | import java.util.List;
24 |
25 | public class OListUtils {
26 | public static final String TAG = OListUtils.class.getSimpleName();
27 |
28 |
29 | public static List doubleToIntList(List list) {
30 | List vals = new ArrayList<>();
31 | for (Double val : list) {
32 | vals.add(val.intValue());
33 | }
34 | return vals;
35 | }
36 |
37 | public static List toStringList(List list) {
38 | List items = new ArrayList<>();
39 | for (Integer item : list) {
40 | items.add(item + "");
41 | }
42 | return items;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/helper/utils/gson/OdooRecord.java:
--------------------------------------------------------------------------------
1 | package com.odoo.core.rpc.helper.utils.gson;
2 |
3 | import com.google.gson.internal.LinkedTreeMap;
4 |
5 | import java.util.AbstractMap;
6 | import java.util.ArrayList;
7 | import java.util.List;
8 |
9 | public abstract class OdooRecord extends AbstractMap {
10 |
11 | public List records = new ArrayList<>();
12 |
13 | public String getString(String key) {
14 | if (containsKey(key))
15 | return get(key).toString();
16 | return "false";
17 | }
18 |
19 | public Double getDouble(String key) {
20 | return (Double) get(key);
21 | }
22 |
23 | public Integer getInt(String key) {
24 | return getDouble(key).intValue();
25 | }
26 |
27 | public Boolean getBoolean(String key) {
28 | return (Boolean) get(key);
29 | }
30 |
31 | public OdooRecord getM20(String key) {
32 | if (!getString(key).equals("false")) {
33 | OdooRecord rec = new LinkedTreeMap();
34 | List value = getArray(key);
35 | rec.put("id", value.get(0));
36 | rec.put("name", value.get(1));
37 | return rec;
38 | }
39 | return null;
40 | }
41 |
42 | public List getM2M(String key) {
43 | return getO2M(key);
44 | }
45 |
46 | public List getO2M(String key) {
47 | if (!getString(key).equals("false")) {
48 | return getArray(key);
49 | }
50 | return new ArrayList<>();
51 | }
52 |
53 | public List getArray(String key) {
54 | return (List) get(key);
55 | }
56 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_drawer_menu_item.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
17 |
18 |
29 |
30 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/stream/MalformedJsonException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson.stream;
18 |
19 | import java.io.IOException;
20 |
21 | /**
22 | * Thrown when a reader encounters malformed JSON. Some syntax errors can be
23 | * ignored by calling {@link JsonReader#setLenient(boolean)}.
24 | */
25 | public final class MalformedJsonException extends IOException {
26 | private static final long serialVersionUID = 1L;
27 |
28 | public MalformedJsonException(String msg) {
29 | super(msg);
30 | }
31 |
32 | public MalformedJsonException(String msg, Throwable throwable) {
33 | super(msg);
34 | // Using initCause() instead of calling super() because Java 1.5 didn't retrofit IOException
35 | // with a constructor with Throwable. This was done in Java 1.6
36 | initCause(throwable);
37 | }
38 |
39 | public MalformedJsonException(Throwable throwable) {
40 | // Using initCause() instead of calling super() because Java 1.5 didn't retrofit IOException
41 | // with a constructor with Throwable. This was done in Java 1.6
42 | initCause(throwable);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/listeners/OdooSyncResponse.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 29/4/15 12:12 PM
19 | */
20 | package com.odoo.core.rpc.listeners;
21 |
22 | import com.odoo.core.rpc.helper.utils.gson.OdooResponse;
23 |
24 | public class OdooSyncResponse {
25 |
26 | private OdooResponse response = null;
27 | private Object object;
28 |
29 | public void setObject(Object obj) {
30 | object = obj;
31 | }
32 |
33 | public Object getObject() {
34 | return object;
35 | }
36 |
37 | public void setResponse(OdooResponse response) {
38 | this.response = response;
39 | }
40 |
41 | public OdooResponse get() {
42 | return response;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | return "OdooSyncResponse{" +
48 | "response=" + response +
49 | ", object=" + object +
50 | '}';
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/intro-slider-lib/src/main/java/com/odoo/widgets/slider/SliderView.java:
--------------------------------------------------------------------------------
1 | package com.odoo.widgets.slider;
2 |
3 | import java.util.List;
4 |
5 | import android.annotation.SuppressLint;
6 | import android.content.Context;
7 | import android.support.v4.app.FragmentManager;
8 | import android.util.AttributeSet;
9 | import android.view.LayoutInflater;
10 | import android.view.ViewGroup;
11 | import android.widget.LinearLayout;
12 |
13 | import com.odoo.widgets.slider.R;
14 |
15 | public class SliderView extends LinearLayout {
16 |
17 | private Context mContext;
18 | private SliderHelper mSlider;
19 |
20 | @SuppressLint("NewApi")
21 | public SliderView(Context context, AttributeSet attrs, int defStyleAttr,
22 | int defStyleRes) {
23 | super(context, attrs, defStyleAttr, defStyleRes);
24 | init(context);
25 | }
26 |
27 | @SuppressLint("NewApi")
28 | public SliderView(Context context, AttributeSet attrs, int defStyleAttr) {
29 | super(context, attrs, defStyleAttr);
30 | init(context);
31 | }
32 |
33 | public SliderView(Context context, AttributeSet attrs) {
34 | super(context, attrs);
35 | init(context);
36 | }
37 |
38 | public SliderView(Context context) {
39 | super(context);
40 | init(context);
41 | }
42 |
43 | private void init(Context context) {
44 | mContext = context;
45 | setOrientation(LinearLayout.VERTICAL);
46 | addView(LayoutInflater.from(mContext).inflate(
47 | R.layout.slider_default_view, this, false));
48 | }
49 |
50 | public void setItems(FragmentManager fragmentManager, List items) {
51 | mSlider = (SliderHelper) findViewById(R.id.default_view_helper);
52 | mSlider.init(fragmentManager, items);
53 | mSlider.initNavigator((ViewGroup) findViewById(R.id.footer_dot));
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/addons/customers/services/CustomerSyncService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 2/1/15 11:07 AM
19 | */
20 | package com.odoo.addons.customers.services;
21 |
22 | import android.content.Context;
23 | import android.os.Bundle;
24 |
25 | import com.odoo.base.addons.res.ResPartner;
26 | import com.odoo.core.service.OSyncAdapter;
27 | import com.odoo.core.service.OSyncService;
28 | import com.odoo.core.support.OUser;
29 |
30 | public class CustomerSyncService extends OSyncService {
31 | public static final String TAG = CustomerSyncService.class.getSimpleName();
32 |
33 | @Override
34 | public OSyncAdapter getSyncAdapter(OSyncService service, Context context) {
35 | return new OSyncAdapter(context, ResPartner.class, service, true);
36 | }
37 |
38 | @Override
39 | public void performDataSync(OSyncAdapter adapter, Bundle extras, OUser user) {
40 | adapter.syncDataLimit(80);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OAppBarUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 19/12/14 2:36 PM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import android.support.v7.app.ActionBar;
23 | import android.support.v7.app.AppCompatActivity;
24 | import android.support.v7.widget.Toolbar;
25 |
26 | import com.odoo.R;
27 |
28 | public class OAppBarUtils {
29 |
30 | public static void setAppBar(AppCompatActivity activity, Boolean withHomeButtonEnabled) {
31 | Toolbar toolbar = (Toolbar) activity.findViewById(R.id.toolbar);
32 | if (toolbar != null) {
33 | activity.setSupportActionBar(toolbar);
34 | ActionBar actionBar = activity.getSupportActionBar();
35 | if (withHomeButtonEnabled && actionBar != null) {
36 | actionBar.setHomeButtonEnabled(true);
37 | actionBar.setDisplayHomeAsUpEnabled(true);
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/base/addons/res/ResCountry.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 6:43 PM
19 | */
20 | package com.odoo.base.addons.res;
21 |
22 | import android.content.Context;
23 |
24 | import com.odoo.core.orm.OModel;
25 | import com.odoo.core.orm.fields.OColumn;
26 | import com.odoo.core.orm.fields.types.OVarchar;
27 | import com.odoo.core.support.OUser;
28 |
29 | public class ResCountry extends OModel {
30 |
31 | OColumn name = new OColumn("Name", OVarchar.class).setSize(100);
32 |
33 | public ResCountry(Context context, OUser user) {
34 | super(context, "res.country", user);
35 | }
36 |
37 | @Override
38 | public boolean allowCreateRecordOnServer() {
39 | return false;
40 | }
41 |
42 | @Override
43 | public boolean allowUpdateRecordOnServer() {
44 | return false;
45 | }
46 |
47 | @Override
48 | public boolean allowDeleteRecordInLocal() {
49 | return false;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/odoo/controls/IOControlData.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General License
16 | * along with this program. If not, see
17 | *
18 | * Created on 7/1/15 5:15 PM
19 | */
20 | package odoo.controls;
21 |
22 | import android.view.View;
23 |
24 | import com.odoo.core.orm.fields.OColumn;
25 |
26 | interface IOControlData {
27 | String TAG = IOControlData.class.getSimpleName();
28 |
29 | void setValue(Object value);
30 |
31 | Object getValue();
32 |
33 | void setEditable(Boolean editable);
34 |
35 | Boolean isEditable();
36 |
37 | void setLabelText(String label);
38 |
39 | void setColumn(OColumn column);
40 |
41 | void initControl();
42 |
43 | String getLabel();
44 |
45 | void setValueUpdateListener(ValueUpdateListener listener);
46 |
47 | interface ValueUpdateListener {
48 | void onValueUpdate(Object value);
49 |
50 | void visibleControl(boolean isVisible);
51 | }
52 |
53 | Boolean isControlReady();
54 |
55 | void resetData();
56 |
57 | View getFieldView();
58 |
59 | void setError(String error);
60 | }
61 |
--------------------------------------------------------------------------------
/intro-slider-lib/src/main/res/layout/default_ui.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
14 |
15 |
22 |
23 |
34 |
35 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/JsonNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson;
18 |
19 | /**
20 | * A class representing a Json {@code null} value.
21 | *
22 | * @author Inderjeet Singh
23 | * @author Joel Leitch
24 | * @since 1.2
25 | */
26 | public final class JsonNull extends JsonElement {
27 | /**
28 | * singleton for JsonNull
29 | *
30 | * @since 1.8
31 | */
32 | public static final JsonNull INSTANCE = new JsonNull();
33 |
34 | /**
35 | * Creates a new JsonNull object.
36 | * Deprecated since Gson version 1.8. Use {@link #INSTANCE} instead
37 | */
38 | @Deprecated
39 | public JsonNull() {
40 | // Do nothing
41 | }
42 |
43 | @Override
44 | JsonNull deepCopy() {
45 | return INSTANCE;
46 | }
47 |
48 | /**
49 | * All instances of JsonNull have the same hash code since they are indistinguishable
50 | */
51 | @Override
52 | public int hashCode() {
53 | return JsonNull.class.hashCode();
54 | }
55 |
56 | /**
57 | * All instances of JsonNull are the same
58 | */
59 | @Override
60 | public boolean equals(Object other) {
61 | return this == other || other instanceof JsonNull;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/config/PreRequiredPermissions.java:
--------------------------------------------------------------------------------
1 | package com.odoo.config;
2 |
3 | import android.Manifest;
4 |
5 | import com.odoo.core.tools.permissions.DevicePermissionHelper;
6 |
7 | /**
8 | * Odoo, Open Source Management Solution
9 | * Copyright (C) 2012-today Odoo SA ()
10 | *
11 | * This program is free software: you can redistribute it and/or modify
12 | * it under the terms of the GNU Affero General Public License as
13 | * published by the Free Software Foundation, either version 3 of the
14 | * License, or (at your option) any later version
15 | *
16 | * This program is distributed in the hope that it will be useful,
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 | * GNU Affero General Public License for more details
20 | *
21 | * You should have received a copy of the GNU Affero General Public License
22 | * along with this program. If not, see
23 | *
24 | * Created on 30/11/15
25 | */
26 | public class PreRequiredPermissions implements DevicePermissionHelper.DevicePermissionImpl {
27 | public static final String TAG = PreRequiredPermissions.class.getSimpleName();
28 |
29 |
30 | /**
31 | * Provide permission list used by device, This method invoked only in API23+ devices.
32 | * Used by runtime permission model of Odoo Mobile to identify default required permissions
33 | * before start using application.
34 | *
35 | * If, user not grant any of this permission; application will not start.
36 | * @return String[] array of required permissions.
37 | */
38 | @Override
39 | public String[] permissions() {
40 | return new String[]{
41 | Manifest.permission.WRITE_EXTERNAL_STORAGE
42 | };
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_no_items_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
21 |
22 |
32 |
33 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/JsonDeserializationContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson;
18 |
19 | import java.lang.reflect.Type;
20 |
21 | /**
22 | * Context for deserialization that is passed to a custom deserializer during invocation of its
23 | * {@link JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext)}
24 | * method.
25 | *
26 | * @author Inderjeet Singh
27 | * @author Joel Leitch
28 | */
29 | public interface JsonDeserializationContext {
30 |
31 | /**
32 | * Invokes default deserialization on the specified object. It should never be invoked on
33 | * the element received as a parameter of the
34 | * {@link JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext)} method. Doing
35 | * so will result in an infinite loop since Gson will in-turn call the custom deserializer again.
36 | *
37 | * @param json the parse tree.
38 | * @param typeOfT type of the expected return value.
39 | * @param The type of the deserialized object.
40 | * @return An object of type typeOfT.
41 | * @throws JsonParseException if the parse tree does not contain expected data.
42 | */
43 | public T deserialize(JsonElement json, Type typeOfT) throws JsonParseException;
44 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/base_intro_slider_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
25 |
26 |
36 |
37 |
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/OM2MRecord.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 6:51 PM
19 | */
20 | package com.odoo.core.orm;
21 |
22 | import com.odoo.core.orm.fields.OColumn;
23 |
24 | import java.util.ArrayList;
25 | import java.util.List;
26 |
27 | public class OM2MRecord {
28 | public static final String TAG = OM2MRecord.class.getSimpleName();
29 | private OColumn mCol = null;
30 | private int mId = 0;
31 | private OModel mDatabase = null;
32 |
33 | public OM2MRecord(OModel model, OColumn col, int id) {
34 | mDatabase = model;
35 | mCol = col;
36 | mId = id;
37 | }
38 |
39 | public List getRelIds() {
40 | List ids = new ArrayList<>();
41 | for (ODataRow row : mDatabase.selectManyToManyRecords(new String[]{OColumn.ROW_ID},
42 | mCol.getName(), mId)) {
43 | ids.add(row.getInt(OColumn.ROW_ID));
44 | }
45 | return ids;
46 | }
47 |
48 | public List browseEach() {
49 | return mDatabase.selectManyToManyRecords(null, mCol.getName(), mId);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OStringColorUtil.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 15/1/15 12:55 PM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import android.content.Context;
23 | import android.content.res.Resources;
24 | import android.content.res.TypedArray;
25 | import android.graphics.Color;
26 |
27 | import com.odoo.R;
28 |
29 | import java.util.Locale;
30 |
31 | public class OStringColorUtil {
32 | public static final String TAG = OStringColorUtil.class.getSimpleName();
33 |
34 | public static int getStringColor(Context context, String content) {
35 | Resources res = context.getResources();
36 | TypedArray mColors = res.obtainTypedArray(R.array.letter_tile_colors);
37 | int MAX_COLORS = mColors.length();
38 | int firstCharAsc = content.toUpperCase(Locale.getDefault()).charAt(0);
39 | int index = (firstCharAsc % MAX_COLORS);
40 | if (index > MAX_COLORS - 1) {
41 | index = index / 2;
42 | }
43 | int color = mColors.getColor(index, Color.WHITE);
44 | mColors.recycle();
45 | return color;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/sys/OCacheUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 10/2/15 11:39 AM
19 | */
20 | package com.odoo.core.utils.sys;
21 |
22 | import android.content.Context;
23 |
24 | import java.io.File;
25 |
26 | public class OCacheUtils {
27 | public static final String TAG = OCacheUtils.class.getSimpleName();
28 |
29 | public static void clearSystemCache(Context context) {
30 | try {
31 | File dir = context.getCacheDir();
32 | if (dir != null && dir.isDirectory()) {
33 | deleteDir(dir);
34 | }
35 | } catch (Exception e) {
36 | }
37 | }
38 |
39 | public static boolean deleteDir(File dir) {
40 | if (dir != null && dir.isDirectory()) {
41 | String[] children = dir.list();
42 | for (int i = 0; i < children.length; i++) {
43 | boolean success = deleteDir(new File(dir, children[i]));
44 | if (!success) {
45 | return false;
46 | }
47 | }
48 | }
49 | return dir.delete();
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/dpr/eclipse-adt/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | ##---------------Begin: proguard configuration for Gson ----------
20 | # Gson uses generic type information stored in a class file when working with fields. Proguard
21 | # removes such information by default, so configure it to keep all of it.
22 | -keepattributes Signature
23 |
24 | # For using GSON @Expose annotation
25 | -keepattributes *Annotation*
26 |
27 | # Gson specific classes
28 | -keep class sun.misc.Unsconfigurationafe { *; }
29 | #-keep class com.google.gson.stream.** { *; }
30 |
31 | # Application classes that will be serialized/deserialized over Gson
32 | -keep class com.google.gson.examples.android.model.** { *; }
33 |
34 | # Prevent proguard from stripping interface information from TypeAdapterFactory,
35 | # JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
36 | -keep class * implements com.google.gson.TypeAdapterFactory
37 | -keep class * implements com.google.gson.JsonSerializer
38 | -keep class * implements com.google.gson.JsonDeserializer
39 |
40 | ##---------------End: proguard configuration for Gson ----------
41 |
42 |
43 | -dontobfuscate
44 | -keep class * extends com.odoo.core.orm.OModel{*;}
45 | # Searchview v4
46 | -keep class android.support.v7.widget.SearchView { *; }
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/orm/fields/types/OTypeHelper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 31/12/14 11:30 AM
19 | */
20 | package com.odoo.core.orm.fields.types;
21 |
22 | public abstract class OTypeHelper {
23 | public Integer field_size = 0;
24 |
25 | public final boolean equals(String type) {
26 | return getFieldType().equals(type);
27 | }
28 |
29 | public final String getType() {
30 | String type = getFieldType();
31 | if (field_size > 0) {
32 | type += "(" + field_size + ")";
33 | }
34 | return type;
35 | }
36 |
37 | public void setSize(Integer size) {
38 | if (size != null)
39 | field_size = size;
40 | }
41 |
42 | public abstract String getFieldType();
43 |
44 | public Integer getFieldSize() {
45 | return field_size;
46 | }
47 |
48 | public String getDataFormat() {
49 | return null;
50 | }
51 |
52 | @Override
53 | public String toString() {
54 | return "OTypeHelper{" +
55 | "field_type='" + getFieldType() + '\'' +
56 | ", field_size=" + field_size +
57 | '}';
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OStorageUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 15/1/15 5:09 PM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import android.os.Environment;
23 |
24 | import java.io.File;
25 |
26 | public class OStorageUtils {
27 | public static final String TAG = OStorageUtils.class.getSimpleName();
28 |
29 | public static String getDirectoryPath(String file_type) {
30 | File externalStorage = Environment.getExternalStorageDirectory();
31 | String path = externalStorage.getAbsolutePath() + "/Odoo";
32 | File baseDir = new File(path);
33 | if (!baseDir.isDirectory()) {
34 | baseDir.mkdir();
35 | }
36 | if (file_type == null) {
37 | file_type = "file";
38 | }
39 | if (file_type.contains("image")) {
40 | path += "/Images";
41 | } else if (file_type.contains("audio")) {
42 | path += "/Audio";
43 | } else {
44 | path += "/Files";
45 | }
46 | File fileDir = new File(path);
47 | if (!fileDir.isDirectory()) {
48 | fileDir.mkdir();
49 | }
50 | return path;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/intro-slider-lib/src/main/java/com/odoo/widgets/slider/SliderItem.java:
--------------------------------------------------------------------------------
1 | package com.odoo.widgets.slider;
2 |
3 | import com.odoo.widgets.slider.SliderPagerAdapter.SliderBuilderListener;
4 |
5 | import java.util.HashMap;
6 |
7 | public class SliderItem {
8 |
9 | private String content = null;
10 | private String title = null;
11 | private int image = 0;
12 | private SliderBuilderListener mSliderBuilderListener = null;
13 | private HashMap extras = new HashMap<>();
14 |
15 | public SliderItem(String title, String content, int image,
16 | SliderBuilderListener listener) {
17 | super();
18 | this.content = content;
19 | this.title = title;
20 | this.image = image;
21 | mSliderBuilderListener = listener;
22 | }
23 |
24 | public SliderItem putExtra(String key, Object value) {
25 | extras.put(key, value);
26 | return this;
27 | }
28 |
29 | public SliderItem setExtras(HashMap extras) {
30 | this.extras = extras;
31 | return this;
32 | }
33 |
34 | public HashMap getExtras() {
35 | return extras;
36 | }
37 |
38 | public String getContent() {
39 | return content;
40 | }
41 |
42 | public void setContent(String mContent) {
43 | this.content = mContent;
44 | }
45 |
46 | public String getTitle() {
47 | return title;
48 | }
49 |
50 | public void setTitle(String mTitle) {
51 | this.title = mTitle;
52 | }
53 |
54 | public int getImagePath() {
55 | return image;
56 | }
57 |
58 | public void setImagePath(int image) {
59 | this.image = image;
60 | }
61 |
62 | public void setSliderCustomViewListener(SliderBuilderListener listener) {
63 | mSliderBuilderListener = listener;
64 | }
65 |
66 | public SliderBuilderListener getSliderCustomViewListener() {
67 | return mSliderBuilderListener;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/account/BaseSettings.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 9/1/15 11:35 AM
19 | */
20 | package com.odoo.core.account;
21 |
22 | import android.content.Context;
23 | import android.net.Uri;
24 | import android.os.Bundle;
25 | import android.preference.PreferenceFragment;
26 |
27 | import com.odoo.R;
28 | import com.odoo.core.utils.OPreferenceManager;
29 | import com.odoo.core.utils.OResource;
30 |
31 | public class BaseSettings extends PreferenceFragment {
32 | public static final String TAG = BaseSettings.class.getSimpleName();
33 | // Keys
34 | public static final String KEY_NOTIFICATION_RING_TONE = "notification_ringtone";
35 |
36 | @Override
37 | public void onCreate(Bundle savedInstanceState) {
38 | super.onCreate(savedInstanceState);
39 | addPreferencesFromResource(R.xml.base_preference);
40 | }
41 |
42 | public static Uri getNotificationRingTone(Context context) {
43 | OPreferenceManager mPref = new OPreferenceManager(context);
44 | String defaultUri = OResource.string(context, R.string.notification_default_ring_tone);
45 | return Uri.parse(mPref.getString(KEY_NOTIFICATION_RING_TONE, defaultUri));
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/rpc/helper/OArguments.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 21/4/15 4:05 PM
19 | */
20 | package com.odoo.core.rpc.helper;
21 |
22 | import org.json.JSONArray;
23 | import org.json.JSONException;
24 | import org.json.JSONObject;
25 |
26 | import java.util.List;
27 |
28 | public class OArguments extends ODomainArgsHelper {
29 | public static final String TAG = OArguments.class.getSimpleName();
30 |
31 | public OArguments add(List datas) {
32 | try {
33 | add(new JSONArray(datas.toString()));
34 | } catch (JSONException e) {
35 | }
36 | return this;
37 | }
38 |
39 | public OArguments addNULL() {
40 | mObjects.add(null);
41 | return this;
42 | }
43 |
44 | public JSONArray get() {
45 | JSONArray arguments = new JSONArray();
46 | for (Object obj : getObject()) {
47 | JSONArray data = new JSONArray();
48 | data.put(obj);
49 | if (obj instanceof JSONObject) {
50 | arguments.put(obj);
51 | } else {
52 | arguments.put(data);
53 | }
54 | }
55 | return arguments;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/google/gson/LongSerializationPolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.gson;
18 |
19 | /**
20 | * Defines the expected format for a {@code long} or {@code Long} type when its serialized.
21 | *
22 | * @since 1.3
23 | *
24 | * @author Inderjeet Singh
25 | * @author Joel Leitch
26 | */
27 | public enum LongSerializationPolicy {
28 | /**
29 | * This is the "default" serialization policy that will output a {@code long} object as a JSON
30 | * number. For example, assume an object has a long field named "f" then the serialized output
31 | * would be:
32 | * {@code {"f":123}}.
33 | */
34 | DEFAULT() {
35 | public JsonElement serialize(Long value) {
36 | return new JsonPrimitive(value);
37 | }
38 | },
39 |
40 | /**
41 | * Serializes a long value as a quoted string. For example, assume an object has a long field
42 | * named "f" then the serialized output would be:
43 | * {@code {"f":"123"}}.
44 | */
45 | STRING() {
46 | public JsonElement serialize(Long value) {
47 | return new JsonPrimitive(String.valueOf(value));
48 | }
49 | };
50 |
51 | /**
52 | * Serialize this {@code value} using this serialization policy.
53 | *
54 | * @param value the long value to be serialized into a {@link JsonElement}
55 | * @return the serialized version of {@code value}
56 | */
57 | public abstract JsonElement serialize(Long value);
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/base/addons/res/ResUsers.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 13/1/15 10:16 AM
19 | */
20 | package com.odoo.base.addons.res;
21 |
22 | import android.content.Context;
23 |
24 | import com.odoo.core.orm.OModel;
25 | import com.odoo.core.orm.fields.OColumn;
26 | import com.odoo.core.orm.fields.types.OVarchar;
27 | import com.odoo.core.support.OUser;
28 |
29 | public class ResUsers extends OModel {
30 | public static final String TAG = ResUsers.class.getSimpleName();
31 |
32 | OColumn name = new OColumn("Name", OVarchar.class);
33 | OColumn login = new OColumn("User Login name", OVarchar.class);
34 |
35 | @Override
36 | public boolean allowCreateRecordOnServer() {
37 | return false;
38 | }
39 |
40 | @Override
41 | public boolean allowUpdateRecordOnServer() {
42 | return false;
43 | }
44 |
45 | @Override
46 | public boolean allowDeleteRecordInLocal() {
47 | return false;
48 | }
49 |
50 | public ResUsers(Context context, OUser user) {
51 | super(context, "res.users", user);
52 | }
53 |
54 | public static int myId(Context context) {
55 | ResUsers users = new ResUsers(context, null);
56 | return users.selectRowId(users.getUser().getUserId());
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/support/OdooCompatActivity.java:
--------------------------------------------------------------------------------
1 | package com.odoo.core.support;
2 |
3 | import android.support.v7.app.AppCompatActivity;
4 |
5 | /**
6 | * Odoo, Open Source Management Solution
7 | * Copyright (C) 2012-today Odoo SA ()
8 | *
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Affero General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details
18 | *
19 | * You should have received a copy of the GNU Affero General Public License
20 | * along with this program. If not, see
21 | *
22 | * Created on 26/11/15
23 | */
24 | public abstract class OdooCompatActivity extends AppCompatActivity {
25 | public static final String TAG = OdooCompatActivity.class.getSimpleName();
26 | private DevicePermissionResultListener mDevicePermissionResultListener = null;
27 |
28 | // API23+ Permission model helper methods
29 | public void setOnDevicePermissionResultListener(DevicePermissionResultListener callback) {
30 | mDevicePermissionResultListener = callback;
31 | }
32 |
33 | @Override
34 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
35 | if (mDevicePermissionResultListener != null) {
36 | mDevicePermissionResultListener.onRequestPermissionsResult(requestCode, permissions, grantResults);
37 | }
38 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
39 | }
40 |
41 | public interface DevicePermissionResultListener {
42 | void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/datas/OConstants.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 18/12/14 11:28 AM
19 | */
20 | package com.odoo.datas;
21 |
22 | public class OConstants {
23 | public static final String URL_ODOO = "https://www.odoo.com";
24 | public static final String URL_ODOO_RESET_PASSWORD = URL_ODOO + "/web/reset_password";
25 | public static final String URL_ODOO_SIGN_UP = URL_ODOO + "/web/signup";
26 | public static final String URL_ODOO_MOBILE_GIT_HUB = "https://github.com/Odoo-mobile";
27 | public static final String URL_ODOO_APPS_ON_PLAY_STORE = "https://play.google.com/store/apps/developer?id=Odoo+SA";
28 |
29 | public static final String ODOO_COMPANY_NAME = "Odoo";
30 |
31 | public static final int RPC_REQUEST_TIME_OUT = 30000; // 30 Seconds
32 | public static final int RPC_REQUEST_RETRIES = 1; // Retries when timeout
33 |
34 | /**
35 | * Database version. Required to change in increment order
36 | * when you change your database model in case of released apk.
37 | *
38 | * When dealing with DATABASE_VERSION, you need to override onModelUpgrade() method
39 | * in each of the model class for applying upgrade script for that model.
40 | */
41 | public static final int DATABASE_VERSION = 1;
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/odoo/core/utils/OAlertDialog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Odoo, Open Source Management Solution
3 | * Copyright (C) 2012-today Odoo SA ()
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU Affero General Public License as
7 | * published by the Free Software Foundation, either version 3 of the
8 | * License, or (at your option) any later version
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU Affero General Public License for more details
14 | *
15 | * You should have received a copy of the GNU Affero General Public License
16 | * along with this program. If not, see
17 | *
18 | * Created on 18/12/14 6:36 PM
19 | */
20 | package com.odoo.core.utils;
21 |
22 | import android.app.AlertDialog;
23 | import android.content.Context;
24 |
25 | import com.odoo.R;
26 |
27 | public class OAlertDialog {
28 |
29 | private Context mContext;
30 | private String title, message;
31 | private Boolean cancelable = true;
32 |
33 | public OAlertDialog(Context context) {
34 | mContext = context;
35 | }
36 |
37 | public OAlertDialog setTitle(String title) {
38 | this.title = title;
39 | return this;
40 | }
41 |
42 | public OAlertDialog setCancelable(Boolean cancelable) {
43 | this.cancelable = cancelable;
44 | return this;
45 | }
46 |
47 | public OAlertDialog setMessage(String message) {
48 | this.message = message;
49 | return this;
50 | }
51 |
52 | public void show() {
53 | AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
54 | builder.setTitle(title);
55 | builder.setMessage(message);
56 | builder.setNegativeButton(OResource.string(mContext, R.string.label_ok), null);
57 | builder.setCancelable(cancelable);
58 | builder.create().show();
59 | }
60 | }
61 |
--------------------------------------------------------------------------------