Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# Copyright (C) 2019 Sunflower IT <sunflowerweb.nl>
# License GNU Affero General Public License <http://www.gnu.org/licenses/>.
from . import stock_picking
from . import sale_order

View file

@ -0,0 +1,14 @@
# Copyright (C) 2019 Sunflower IT <sunflowerweb.nl>
# License GNU Affero General Public License <http://www.gnu.org/licenses/>.
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order"
def action_confirm(self):
res = super().action_confirm()
for order in self:
order.picking_ids.write({"brand_id": order.brand_id.id})
return res

View file

@ -0,0 +1,19 @@
# Copyright (C) 2019 Sunflower IT <sunflowerweb.nl>
# License GNU Affero General Public License <http://www.gnu.org/licenses/>.
from odoo import fields, models
class StockPicking(models.Model):
_name = "stock.picking"
_inherit = ["stock.picking", "res.brand.mixin"]
brand_id = fields.Many2one(
help="Brand to use for this picking.",
)
def _is_brand_required(self):
self.ensure_one()
if self.picking_type_id.code in ("internal", "mrp_operation"):
return False
return super()._is_brand_required()