[IMP] pre-commit: first run on whole repo
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Purchase Stock Usability',
|
||||
'version': '14.0.1.0.0',
|
||||
'category': 'Purchases',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Usability improvements on purchase_stock module',
|
||||
'description': """
|
||||
"name": "Purchase Stock Usability",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Purchases",
|
||||
"license": "AGPL-3",
|
||||
"summary": "Usability improvements on purchase_stock module",
|
||||
"description": """
|
||||
Purchase Stock Usability
|
||||
========================
|
||||
|
||||
@@ -16,14 +16,14 @@ Several usability improvements on the official purchase_stock module:
|
||||
|
||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': [
|
||||
'purchase_stock',
|
||||
'purchase_usability',
|
||||
],
|
||||
'data': [
|
||||
'views/stock_picking.xml',
|
||||
],
|
||||
'installable': True,
|
||||
"author": "Akretion",
|
||||
"website": "https://github.com/OCA/odoo-usability",
|
||||
"depends": [
|
||||
"purchase_stock",
|
||||
"purchase_usability",
|
||||
],
|
||||
"data": [
|
||||
"views/stock_picking.xml",
|
||||
],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
@@ -6,21 +6,22 @@ from odoo import api, fields, models
|
||||
|
||||
|
||||
class PurchaseOrder(models.Model):
|
||||
_inherit = 'purchase.order'
|
||||
_inherit = "purchase.order"
|
||||
|
||||
picking_type_id = fields.Many2one(tracking=True)
|
||||
incoterm_id = fields.Many2one(tracking=True)
|
||||
|
||||
# inherit compute method of the field delivery_partner_id
|
||||
# defined in purchase_usability
|
||||
@api.depends('dest_address_id', 'picking_type_id')
|
||||
@api.depends("dest_address_id", "picking_type_id")
|
||||
def _compute_delivery_partner_id(self):
|
||||
for o in self:
|
||||
delivery_partner_id = False
|
||||
if o.dest_address_id:
|
||||
delivery_partner_id = o.dest_address_id
|
||||
elif (
|
||||
o.picking_type_id.warehouse_id and
|
||||
o.picking_type_id.warehouse_id.partner_id):
|
||||
o.picking_type_id.warehouse_id
|
||||
and o.picking_type_id.warehouse_id.partner_id
|
||||
):
|
||||
delivery_partner_id = o.picking_type_id.warehouse_id.partner_id
|
||||
o.delivery_partner_id = delivery_partner_id
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2017-2021 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="name">purchase_stock_usability.stock.picking.form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="origin" position="after">
|
||||
<field name="purchase_id" attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"/>
|
||||
<field
|
||||
name="purchase_id"
|
||||
attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user