mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-20 09:32:05 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class DdmrpAdjustmentDemand(models.Model):
|
||||
_name = "ddmrp.adjustment.demand"
|
||||
_description = "DDMRP Adjustment Demand"
|
||||
|
||||
buffer_id = fields.Many2one(
|
||||
comodel_name="stock.buffer",
|
||||
string="Apply to",
|
||||
)
|
||||
product_id = fields.Many2one(related="buffer_id.product_id")
|
||||
buffer_origin_id = fields.Many2one(
|
||||
comodel_name="stock.buffer",
|
||||
string="Originated from",
|
||||
required=True,
|
||||
ondelete="cascade",
|
||||
)
|
||||
product_origin_id = fields.Many2one(
|
||||
related="buffer_origin_id.product_id",
|
||||
string="Origin Product",
|
||||
)
|
||||
extra_demand = fields.Float()
|
||||
product_uom_id = fields.Many2one(
|
||||
comodel_name="uom.uom",
|
||||
string="Unit of Measure",
|
||||
related="buffer_id.product_uom",
|
||||
)
|
||||
date_start = fields.Date(
|
||||
string="Start date",
|
||||
)
|
||||
date_end = fields.Date(
|
||||
string="End date",
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name="res.company",
|
||||
related="buffer_id.company_id",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue