mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
stock_average_daily_sale: Remove product_abc_classification dependency
Remove product_abc_classification dependency. This module is not essential for the current module to function properly.
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
"depends": [
|
||||
"sale",
|
||||
"stock_storage_type_putaway_abc",
|
||||
"product_abc_classification",
|
||||
"product_abc_classification_sale_stock",
|
||||
"product_route_mto",
|
||||
],
|
||||
"data": [
|
||||
@@ -22,7 +20,6 @@
|
||||
"security/stock_average_daily_sale_demo.xml",
|
||||
"views/stock_average_daily_sale_config.xml",
|
||||
"views/stock_average_daily_sale.xml",
|
||||
"views/abc_classification_profile.xml",
|
||||
"views/stock_warehouse.xml",
|
||||
"data/ir_cron.xml",
|
||||
],
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
model="stock.average.daily.sale.config"
|
||||
id="stock_average_daily_sale_config_level_a"
|
||||
>
|
||||
<field
|
||||
name="abc_classification_profile_id"
|
||||
ref="product_abc_classification_sale_stock.abc_classification_profile_sale_stock"
|
||||
/>
|
||||
<field name="abc_classification_level">a</field>
|
||||
<field name="period_value">2</field>
|
||||
<field name="period_name">week</field>
|
||||
@@ -21,10 +17,6 @@
|
||||
model="stock.average.daily.sale.config"
|
||||
id="stock_average_daily_sale_config_level_b"
|
||||
>
|
||||
<field
|
||||
name="abc_classification_profile_id"
|
||||
ref="product_abc_classification_sale_stock.abc_classification_profile_sale_stock"
|
||||
/>
|
||||
<field name="abc_classification_level">b</field>
|
||||
<field name="period_value">13</field>
|
||||
<field name="period_name">week</field>
|
||||
@@ -36,10 +28,6 @@
|
||||
model="stock.average.daily.sale.config"
|
||||
id="stock_average_daily_sale_config_level_c"
|
||||
>
|
||||
<field
|
||||
name="abc_classification_profile_id"
|
||||
ref="product_abc_classification_sale_stock.abc_classification_profile_sale_stock"
|
||||
/>
|
||||
<field name="abc_classification_level">c</field>
|
||||
<field name="period_value">26</field>
|
||||
<field name="period_name">week</field>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from . import stock_warehouse # isort:skip
|
||||
from . import stock_average_daily_sale_config # isort:skip
|
||||
from . import stock_average_daily_sale # isort:skip
|
||||
from . import abc_classification_profile
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# Copyright 2023 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AbcClassificationProfile(models.Model):
|
||||
|
||||
_inherit = "abc.classification.profile"
|
||||
|
||||
stock_average_daily_sale_config_ids = fields.One2many(
|
||||
comodel_name="stock.average.daily.sale.config",
|
||||
inverse_name="abc_classification_profile_id",
|
||||
string="Average Daily Sale Configurations",
|
||||
)
|
||||
@@ -18,17 +18,11 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class StockAverageDailySale(models.Model):
|
||||
|
||||
_name = "stock.average.daily.sale"
|
||||
_auto = False
|
||||
_order = "abc_classification_level ASC, product_id ASC"
|
||||
_description = "Average Daily Sale for Products"
|
||||
|
||||
abc_classification_profile_id = fields.Many2one(
|
||||
comodel_name="abc.classification.profile",
|
||||
required=True,
|
||||
index=True,
|
||||
)
|
||||
abc_classification_level = fields.Selection(
|
||||
selection=ABC_SELECTION, required=True, readonly=True, index=True
|
||||
)
|
||||
@@ -305,7 +299,6 @@ class StockAverageDailySale(models.Model):
|
||||
date_to,
|
||||
config_id,
|
||||
abc_classification_level,
|
||||
cfg.abc_classification_profile_id,
|
||||
sale_ok,
|
||||
is_mto,
|
||||
sqty.qty_in_stock as qty_in_stock,
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright 2023 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="abc_classification_profile_form_view" model="ir.ui.view">
|
||||
<field
|
||||
name="name"
|
||||
>abc.classification.profile.form (in stock_average_daily_sale)</field>
|
||||
<field name="model">abc.classification.profile</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="product_abc_classification.abc_classification_profile_form_view"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="levels" position="after">
|
||||
<page name="average_daily_sale" string="Average Daily Sale">
|
||||
<field name="stock_average_daily_sale_config_ids" nolabel="1" />
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user