mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Merge pull request #153 from ursais/imp_pms_purchase
[IMP] pms_purchase
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
# Copyright (c) 2022 Open Source Integrators
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import api, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class StockPutawayRule(models.Model):
|
||||
_inherit = "stock.putaway.rule"
|
||||
|
||||
location_out_id = fields.Many2one(
|
||||
"stock.location",
|
||||
"Store to",
|
||||
check_company=True,
|
||||
domain="[('id', 'child_of', location_in_id),"
|
||||
" ('id', '!=', location_in_id),"
|
||||
" '|',"
|
||||
" ('company_id', '=', False),"
|
||||
" ('company_id', '=', company_id)]",
|
||||
ondelete="cascade",
|
||||
required=False,
|
||||
)
|
||||
|
||||
@api.model
|
||||
def _get_putaway_options(self):
|
||||
res = super()._get_putaway_options()
|
||||
|
||||
@@ -17,5 +17,18 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_putaway_list_inherit_pms_purchase" model="ir.ui.view">
|
||||
<field name="name">stock.putaway.rule.list</field>
|
||||
<field name="model">stock.putaway.rule</field>
|
||||
<field name="inherit_id" ref="stock.stock_putaway_list" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="location_out_id" position="attributes">
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'required': [('method', '!=', 'move_to_property')]}</attribute>
|
||||
</field>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user