size int64 0 304k | ext stringclasses 1
value | lang stringclasses 1
value | branch stringclasses 1
value | content stringlengths 0 304k | avg_line_length float64 0 238 | max_line_length int64 0 304k |
|---|---|---|---|---|---|---|
712 | py | PYTHON | 15.0 | # Copyright (C) 2018 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _get_stock_move_values(
self,
product_id,
product_qty,
product_uom,
location_id,
... | 22.967742 | 712 |
909 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Sub-Status",
"summary": "Add sub-statuses to Field Service orders",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Open ... | 31.344828 | 909 |
2,297 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from datetime import timedelta
from odoo import fields
from odoo.tests.common import TransactionCase
class FSMSubstatusCase(TransactionCase):
def setUp(self):
super(FSMSubstatusCase,... | 38.932203 | 2,297 |
990 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
sub_stage_id = fields.Many2one(
"fsm.stage.status",
string="Sub-Status",
required... | 31.935484 | 990 |
981 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMStageStatus(models.Model):
_name = "fsm.stage.status"
_description = "Order Sub-Status"
name = fields.Char(required=True)
... | 31.645161 | 981 |
866 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMStage(models.Model):
_inherit = "fsm.stage"
@api.model
def _default_sub_stage(self):
return self.env["fsm.stage.status"].search([("n... | 27.935484 | 866 |
788 | py | PYTHON | 15.0 | # Copyright (C) 2019, Open Source Integrators
# # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Field Service - Stage Server Action",
"summary": "Execute server actions when reaching a Field Service stage",
"version": "15.0.1.0.1",
"category": "Field Service",
"author": "O... | 37.52381 | 788 |
280 | py | PYTHON | 15.0 | # Copyright (C) 2019, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMStage(models.Model):
_inherit = "fsm.stage"
action_id = fields.Many2one("ir.actions.server", string="Server Action")
| 28 | 280 |
711 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service Partner Relations",
"summary": "Manage relations between contacts, companies and locations",
"version": "15.0.1.0.1",
"category": "Field Service",
"author": "Open Sou... | 37.421053 | 711 |
18,398 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.addons.partner_multi_relation.tests.test_partner_relation_common import (
TestPartnerRelationCommon,
)
class TestPart... | 37.092742 | 18,398 |
1,120 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocation(models.Model):
_inherit = "fsm.location"
rel_count = fields.Integer(string="Relations", compute="_compute_relation_count")
def _compute... | 36.129032 | 1,120 |
470 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
class ResPartnerRelationType(models.Model):
_inherit = "res.partner.relation.type"
def get_partner_types(self):
super(ResPartnerRelationType, self).get_partner_type... | 29.375 | 470 |
8,588 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class ResPartnerRelationAll(models.AbstractModel):
_inherit = "res.partner.relation.all"
@api.onchange("this_partn... | 38.339286 | 8,588 |
564 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class ResPartner(models.Model):
_inherit = "res.partner"
def get_partner_type(self):
"""
Get partner type for relation.
:return: 'c' for company or 'p'... | 28.2 | 564 |
1,815 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service",
"summary": "Manage Field Service Locations, Workers and Orders",
"version": "15.0.1.2.0",
"license": "AGPL-3",
"category": "Field Service",
"author": "Open Sour... | 33.611111 | 1,815 |
3,958 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class FSMWizard(TransactionCase):
"""
Test used to check that the base functionalities of Field Service.
... | 38.427184 | 3,958 |
1,688 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests.common import Form, TransactionCase
class FSMTeam(TransactionCase):
def setUp(self):
super().setUp()
self.Order = self.env["fsm.order"]
... | 35.914894 | 1,688 |
1,183 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from . import test_fsm_order
class TestFsmCategory(test_fsm_order.TestFSMOrder):
def setUp(self):
super().setUp()
fsm_category = self.env[... | 38.16129 | 1,183 |
11,380 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
class FSMLocation(TransactionCase):
def setUp(self):
super().setUp()
self.Location ... | 41.231884 | 11,380 |
2,863 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import Form, TransactionCase
class FSMPerson(TransactionCase):
def setUp(self):
super().setUp()
self.Worker = self.env["fsm.person"]
def test_fsm_perso... | 41.492754 | 2,863 |
2,764 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from . import test_fsm_order
class TestTemplateOnchange(test_fsm_order.TestFSMOrderBase):
def setUp(self):
super().setUp()
self.fsm_category_a = self.env... | 41.878788 | 2,764 |
11,356 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import timedelta
from freezegun import freeze_time
from odoo import fields
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import Form, TransactionCase
@f... | 38.757679 | 11,356 |
2,632 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import Form, TransactionCase
class FSMEquipment(TransactionCase):
def setUp(self):
super().setUp()
self.Equipment = self.env["fsm.equipment"]
self.t... | 41.125 | 2,632 |
2,050 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo.exceptions import UserError
class FSMWizard(models.TransientModel):
"""
A wizard to convert a res.partner record to a fsm.person or
fsm.locat... | 36.607143 | 2,050 |
3,386 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMPerson(models.Model):
_name = "fsm.person"
_inherits = {"res.partner": "partner_id"}
_inherit = ["mail.thread.blacklist", "fsm.model.mixin"]
... | 36.408602 | 3,386 |
13,331 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class FSMLocation(models.Model):
_name = "fsm.location"
_inherits = {"res.partner": "partner_id"}
_inhe... | 38.979532 | 13,331 |
838 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMTemplate(models.Model):
_name = "fsm.template"
_description = "Field Service Order Template"
name = fields.Char(required=True)
instructions =... | 32.230769 | 838 |
15,882 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from . import fsm_stage
class FSMOrder(models.Model):
_name = "fsm... | 38.926471 | 15,882 |
1,006 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMTag(models.Model):
_name = "fsm.tag"
_description = "Field Service Tag"
name = fields.Char(required=True)
parent_id = fields.Many2one("fsm.ta... | 31.4375 | 1,006 |
396 | py | PYTHON | 15.0 | # Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMOrderType(models.Model):
_name = "fsm.order.type"
_description = "Field Service Order Type"
name = fields.Char(required=True)
internal_type = fields.... | 24.75 | 396 |
1,354 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMCategory(models.Model):
_name = "fsm.category"
_description = "Field Service Worker Category"
_parent_name = "parent_id"
_parent_store = ... | 34.717949 | 1,354 |
374 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResTerritory(models.Model):
_inherit = "res.territory"
person_ids = fields.Many2many("fsm.person", string="Field Service Workers")
person_id = field... | 34 | 374 |
742 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMPersonCalendarFilter(models.Model):
"""Assigned Worker Calendar Filter"""
_name = "fsm.person.calendar.filter"
_description = "FSM Person Calendar Filter"
user... | 30.916667 | 742 |
562 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
auto_populate_persons_on_location = fields.Boolean(
string="Auto-populate Workers on Location... | 35.125 | 562 |
1,071 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocationPerson(models.Model):
_name = "fsm.location.person"
_description = "Field Service Location Person Info"
_rec_name = "location_id"
_ord... | 34.548387 | 1,071 |
4,241 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
# Groups
group_fsm_team = fields.Boolean(
string="Manage Tea... | 42.41 | 4,241 |
3,069 | py | PYTHON | 15.0 | # Copyright (C) 2018 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMTeam(models.Model):
_name = "fsm.team"
_description = "Field Service Team"
_inherit = ["mail.thread", "mail.activity.mixin"]
def _default_stages(self):
... | 35.275862 | 3,069 |
2,101 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMEquipment(models.Model):
_name = "fsm.equipment"
_description = "Field Service Equipment"
_inherit = ["mail.thread", "mail.activity.mixin", "... | 38.907407 | 2,101 |
3,507 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
AVAILABLE_PRIORITIES = [("0", "Normal"), ("1", "Low"), ("2", "High"), ("3", "Urgent")]
class FSMStage(models.Model... | 33.084906 | 3,507 |
2,618 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
type = fields.Selection(selection_add=[("fsm_location", "Location")])
fsm_location = fields.Boole... | 35.863014 | 2,618 |
1,737 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FsmModelMixin(models.AbstractModel):
_name = "fsm.model.mixin"
_description = "Fsm Model Mixin"
_stage_type = ""
stage_id = fields.Many2one(
... | 30.982143 | 1,735 |
947 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Base Territory",
"summary": "This module allows you to define territories, branches,"
" districts and regions to be used for Field Service operations or Sales.",
"version": "15.0.1.0.... | 35.074074 | 947 |
443 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResDistrict(models.Model):
_name = "res.district"
_description = "District"
name = fields.Char(required=True)
region_id = fields.Many2one("res.region", s... | 31.642857 | 443 |
443 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCountry(models.Model):
_inherit = "res.country"
territory_id = fields.Many2one("res.territory", string="Territory")
region_ids = fields.Many2many(
... | 27.6875 | 443 |
798 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResTerritory(models.Model):
_name = "res.territory"
_description = "Territory"
name = fields.Char(required=True)
branch_id = fields.Many2one("res.branch"... | 36.272727 | 798 |
441 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResBranch(models.Model):
_name = "res.branch"
_description = "branch"
name = fields.Char(required=True)
partner_id = fields.Many2one("res.partner", strin... | 31.5 | 441 |
372 | py | PYTHON | 15.0 | # Copyright (C) 2020 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResRegion(models.Model):
_name = "res.region"
_description = "Region"
name = fields.Char(required=True)
description = fields.Char()
partner_id = fiel... | 28.615385 | 372 |
702 | py | PYTHON | 15.0 | # Copyright (C) 2019, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - CRM",
"version": "15.0.1.0.0",
"summary": "Create Field Service orders from the CRM",
"category": "Field Service",
"author": "Patrick Wilson, Odoo Community Association (O... | 31.909091 | 702 |
914 | py | PYTHON | 15.0 | from odoo.tests import common
class TestFieldserviceCrm(common.TransactionCase):
def test_fieldservicecrm(self):
location_1 = self.env["fsm.location"].create(
{
"name": "Summer's House",
"owner_id": self.env["res.partner"]
.create({"name": "Summe... | 30.466667 | 914 |
548 | py | PYTHON | 15.0 | # Copyright (C) 2019, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocation(models.Model):
_inherit = "fsm.location"
opportunity_count = fields.Integer(
compute="_compute_opportunity_count", string="# Opportunities"
)
... | 30.444444 | 548 |
280 | py | PYTHON | 15.0 | # Copyright (C) 2019, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
opportunity_id = fields.Many2one("crm.lead", string="Opportunity", tracking=True)
| 28 | 280 |
706 | py | PYTHON | 15.0 | # Copyright (C) 2019, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Lead(models.Model):
_inherit = "crm.lead"
fsm_order_ids = fields.One2many(
"fsm.order", "opportunity_id", string="Service Orders"
)
fsm_location_id = fie... | 32.090909 | 706 |
856 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Sales - Recurring",
"version": "15.0.2.0.0",
"summary": "Sell recurring field services.",
"category": "Field Service",
"author": "Open Source Integrators, Odoo Com... | 28.533333 | 856 |
6,990 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.addons.fieldservice_sale.tests.test_fsm_sale_order import TestFSMSale
class TestFSMSaleRecurring(TestFSMSale):
@classmethod
def setUpClass(cls):
super(TestFSMSaleRecurrin... | 40.639535 | 6,990 |
1,938 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
fsm_recurring_ids = fields.Many2many(
"fsm.recurring",
... | 37.269231 | 1,938 |
2,693 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
fsm_recurring_id = fields.Many2one(
"fsm.recurring",
... | 40.19403 | 2,693 |
862 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
field_service_tracking = fields.Selection(
selectio... | 34.48 | 862 |
648 | py | PYTHON | 15.0 | # Copyright (C) 2019 Brian McMaster
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
class FSMRecurring(models.Model):
_inherit = "fsm.recurring"
sale_line_id = fields.Many2one("sale.order.line")
def action_v... | 29.454545 | 648 |
766 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Vehicles",
"summary": "Manage Field Service vehicles and assign drivers",
"version": "15.0.1.0.1",
"category": "Field Service",
"author": "Open Source Integrators, ... | 34.818182 | 766 |
1,530 | py | PYTHON | 15.0 | # Copyright (C) 2022 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo.tests.common import TransactionCase
class FSMVehicleCase(TransactionCase):
def setUp(self):
super(FSMVehicleCase, self).setUp()
... | 34.772727 | 1,530 |
277 | py | PYTHON | 15.0 | # Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMPerson(models.Model):
_inherit = "fsm.person"
vehicle_id = fields.Many2one("fsm.vehicle", string="Default Vehicle")
| 30.777778 | 277 |
877 | py | PYTHON | 15.0 | # Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
@api.model
def _get_default_vehicle(self):
return self.person_id.vehicle_id.id or False
vehic... | 28.290323 | 877 |
452 | py | PYTHON | 15.0 | # Copyright (C) 2018 Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMVehicle(models.Model):
_name = "fsm.vehicle"
_description = "Field Service Vehicle"
name = fields.Char(required="True")
person_id = fields.Many2one("fsm.person"... | 30.133333 | 452 |
729 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Repair",
"summary": "Integrate Field Service orders with MRP repair orders",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Open Source ... | 31.695652 | 729 |
2,426 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from datetime import timedelta
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestFSMRepairCommon(TransactionCase):
... | 37.90625 | 2,426 |
1,976 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class FSMOrder(models.Model):
_inherit = "fsm.order"
repair_id = fields.Many2one("repair.order", string="R... | 42.042553 | 1,976 |
310 | py | PYTHON | 15.0 | # Copyright 2021 - TODAY, Marcel Savegnago - Escodoo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FsmOrderType(models.Model):
_inherit = "fsm.order.type"
internal_type = fields.Selection(
selection_add=[("repair", "Repair")],
)
| 23.846154 | 310 |
766 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service Sizes",
"summary": "Manage Sizes for Field Service Locations and Orders",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Brian McMaster, ... | 29.461538 | 766 |
2,059 | py | PYTHON | 15.0 | # Copyright (C) 2020 - Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestFSMSize(TransactionCase):
def setUp(self):
super(TestFSMSize, self).setUp()
self.Size = self.env... | 34.898305 | 2,059 |
850 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocationSize(models.Model):
_name = "fsm.location.size"
_description = "Size for FSM Location"
size_id = fields.Many2one("fsm.size", required=Tr... | 35.416667 | 850 |
333 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocation(models.Model):
_inherit = "fsm.location"
location_size_ids = fields.One2many(
"fsm.location.size", "location_id", string="Location ... | 30.272727 | 333 |
1,913 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
def _default_size_id(self):
size = False
if self.type:
size = self.env[... | 33.561404 | 1,913 |
1,108 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class FSMSize(models.Model):
_name = "fsm.size"
_description = "Field Service Size"
name = fields.Cha... | 38.206897 | 1,108 |
592 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "FSM Stage Validation",
"summary": "Validate input data when reaching a Field Service stage",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Brian McMas... | 39.466667 | 592 |
7,783 | py | PYTHON | 15.0 | # Copyright 2020, Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestFSMStageValidation(TransactionCase):
def setUp(self):
super... | 38.339901 | 7,783 |
368 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .validate_utils import validate_stage_fields
class FSMPerson(models.Model):
_inherit = "fsm.person"
@api.constrains("stage_id")
def _validate_stage_fi... | 28.307692 | 368 |
372 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .validate_utils import validate_stage_fields
class FSMLocation(models.Model):
_inherit = "fsm.location"
@api.constrains("stage_id")
def _validate_stag... | 28.615385 | 372 |
366 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .validate_utils import validate_stage_fields
class FSMOrder(models.Model):
_inherit = "fsm.order"
@api.constrains("stage_id")
def _validate_stage_fiel... | 28.153846 | 366 |
770 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _
from odoo.exceptions import ValidationError
def validate_stage_fields(records):
for rec in records:
stage = rec.stage_id
field_ids = stage.validate_field_ids
field_names ... | 32.083333 | 770 |
374 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .validate_utils import validate_stage_fields
class FSMEquipment(models.Model):
_inherit = "fsm.equipment"
@api.constrains("stage_id")
def _validate_st... | 28.769231 | 374 |
979 | py | PYTHON | 15.0 | # Copyright (C) 2020 Brian McMaster <brian@mcmpest.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMStage(models.Model):
_inherit = "fsm.stage"
validate_field_ids = fields.Many2many(
"ir.model.fields",
string="Fields to Validat... | 32.633333 | 979 |
322 | py | PYTHON | 15.0 | # Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def pre_init_hook(cr):
cr.execute("""ALTER TABLE "fsm_location" ADD "customer_id" INT;""")
cr.execute(
"""UPDATE "fsm_location" SET customer_id = owner_id
WHERE customer_id IS NULL;"""
... | 32.2 | 322 |
1,038 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Analytic Accounting",
"summary": """Track analytic accounts on Field Service locations
and orders""",
"version": "15.0.1.0.0",
"category": "Field Ser... | 28.833333 | 1,038 |
262 | py | PYTHON | 15.0 | # Copyright (C) 2021, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(env, version):
if not version:
return
env.execute("UPDATE fsm_order SET bill_to = 'location' " "WHERE bill_to IS NULL;")
| 29.111111 | 262 |
7,323 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from datetime import timedelta
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class FSMAccountAnalyticCase(TransactionCase... | 38.746032 | 7,323 |
399 | py | PYTHON | 15.0 | # Copyright (C) 2018 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class FSMWizard(models.TransientModel):
_inherit = "fsm.wizard"
def _prepare_fsm_location(self, partner):
res = super()._prepare_fsm_location(partner)
res["cust... | 30.692308 | 399 |
1,636 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMLocation(models.Model):
_inherit = "fsm.location"
analytic_account_id = fields.Many2one(
"account.analytic.account", string="Analytic Ac... | 27.266667 | 1,636 |
1,038 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
@api.model_create_multi
def create(self, v... | 41.52 | 1,038 |
1,214 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
total_cost = fields.Float(compute="_compute_total_cost")
bill_to = fields.Selection(
[("... | 30.35 | 1,214 |
321 | py | PYTHON | 15.0 | # Copyright (C) 2020 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
fsm_filter_location_by_contact = fields.Boolean(
string="Filter Contacts with Location"
)... | 26.75 | 321 |
423 | py | PYTHON | 15.0 | # Copyright (C) 2020, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
fsm_filter_location_by_contact = fields.Boolean(
string="Filter Contacts with... | 30.214286 | 423 |
1,043 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class AccountAnalyticLine(models.Model):
_inherit = "account.analytic.line"
fsm_order_id = fields.Many2one... | 37.25 | 1,043 |
1,043 | py | PYTHON | 15.0 | # Copyright (C) 2022 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class ResPartner(models.Model):
_inherit = "res.partner"
@api.model
def _search(
self,
args,
offset=0,
limit=None,
or... | 26.74359 | 1,043 |
670 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Purchase",
"summary": "Manage FSM Purchases",
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/fie... | 27.916667 | 670 |
1,476 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import odoo.tests.common as common
class TestFieldServicePurchase(common.TransactionCase):
def setUp(self):
super(TestFieldServicePurchase, self).setUp()
self.product_supplierinf... | 34.325581 | 1,476 |
1,224 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMPerson(models.Model):
_inherit = "fsm.person"
pricelist_count = fields.Integer(
compute="_compute_pricelist_count", string="# Pricelists"
... | 34.971429 | 1,224 |
736 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Delivery",
"summary": "Select delivery methods and carriers on Field Service orders",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Open Source ... | 28.307692 | 736 |
3,284 | py | PYTHON | 15.0 | # Copyright (C) 2022 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo.tests.common import TransactionCase
class FSMDeliveryCase(TransactionCase):
def setUp(self):
super(FSMDeliveryCase, self).setUp()
... | 38.186047 | 3,284 |
281 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMOrder(models.Model):
_inherit = "fsm.order"
carrier_id = fields.Many2one("delivery.carrier", string="Delivery Method")
| 28.1 | 281 |
543 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Brian McMaster
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockMove(models.Model):
_inherit = "stock.move"
def _get_new_picking_values(self):
vals = super(StockMove, self)._get_new_picking_values()
vals[... | 28.578947 | 543 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.