Skip to content

Commit

Permalink
Merge pull request #420 from beescoop/12.0-split-beesdoo_inventory
Browse files Browse the repository at this point in the history
12.0 split beesdoo inventory
  • Loading branch information
robinkeunen authored Aug 1, 2022
2 parents 79d9535 + e6b8d5b commit 7068f9a
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 94 deletions.
2 changes: 1 addition & 1 deletion beesdoo_inventory/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Beesdoo Inventory

|badge1| |badge2| |badge3|

Adds a responsible, a max shipping date and a button to copy quantity to stock pickings.
Restrict selectable products to those sold as main supplier by the picking partner.

**Table of contents**

Expand Down
1 change: 0 additions & 1 deletion beesdoo_inventory/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from . import models
14 changes: 9 additions & 5 deletions beesdoo_inventory/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Beesdoo Inventory",
"summary": """
Adds a responsible, a max shipping date and a button to copy quantity to
stock pickings.""",
"summary": "Restrict selectable products to those"
" sold as main supplier by the picking partner.",
"author": "Beescoop - Cellule IT, Coop IT Easy SC",
"website": "https://github.com/beescoop/Obeesdoo",
"category": "Inventory",
"version": "12.0.1.0.1",
"depends": ["delivery", "beesdoo_base", "beesdoo_product"],
"version": "12.0.3.0.1",
"depends": [
"stock",
"beesdoo_product", # for field main_seller_id
"stock_picking_responsible",
"stock_move_line_auto_fill",
],
"data": ["views/stock.xml"],
"installable": True,
"license": "AGPL-3",
Expand Down
25 changes: 25 additions & 0 deletions beesdoo_inventory/migrations/12.0.3.0.1/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import logging

from odoo import SUPERUSER_ID
from odoo.api import Environment

_logger = logging.getLogger(__name__)


def migrate(cr, version):
# remove all users from group "Manage Packages" sometimes
# translated as "Gérer les emplacements multiples
# et les entrepôts"
_logger.info(
"removing all users from groups 'Manage Packages',"
" 'Manage Multiple Stock Locations'"
" and 'Manage Different Stock Owners'"
)
with Environment.manage():
env = Environment(cr, SUPERUSER_ID, {})
group_tracking_lot = env.ref("stock.group_tracking_lot")
group_stock_multi_locations = env.ref("stock.group_stock_multi_locations")
group_tracking_owner = env.ref("stock.group_tracking_owner")
group_tracking_lot.users = [(5, 0, 0)]
group_stock_multi_locations.users = [(5, 0, 0)]
group_tracking_owner.users = [(5, 0, 0)]
1 change: 0 additions & 1 deletion beesdoo_inventory/models/__init__.py

This file was deleted.

58 changes: 0 additions & 58 deletions beesdoo_inventory/models/stock.py

This file was deleted.

2 changes: 1 addition & 1 deletion beesdoo_inventory/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Adds a responsible, a max shipping date and a button to copy quantity to stock pickings.
Restrict selectable products to those sold as main supplier by the picking partner.
2 changes: 1 addition & 1 deletion beesdoo_inventory/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h1 class="title">Beesdoo Inventory</h1>
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/beescoop/obeesdoo/tree/12.0/beesdoo_inventory"><img alt="beescoop/obeesdoo" src="https://img.shields.io/badge/github-beescoop%2Fobeesdoo-lightgray.png?logo=github" /></a></p>
<p>Adds a responsible, a max shipping date and a button to copy quantity to stock pickings.</p>
<p>Restrict selectable products to those sold as main supplier by the picking partner.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down
27 changes: 1 addition & 26 deletions beesdoo_inventory/views/stock.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record model="ir.ui.view" id="beesdoo_stock_tree_view">
<field name="name">beesdoo.stock.tree.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree" />
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="responsible" />
</field>
</field>
</record>

<record model="ir.ui.view" id="beesdoo_stock_form_view">
<field name="name">beesdoo.stock.form.view</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<field name="scheduled_date" position="after">
<field name="max_shipping_date" placeholder="Max shipping date" />
</field>
<field name="backorder_id" position="after">
<field name="responsible" />
</field>
<button name="action_assign" position="after">
<button
name="copy_qty"
string="Copy Move Line Quantity"
states="partially_available,assigned"
type="object"
class="oe_highlight"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"
/>
</button>
<!-- todo move to main supplier module -->
<xpath
expr="//field[@name='move_ids_without_package']//field[@name='product_id']"
position="attributes"
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ git+https://github.com/coopiteasy/[email protected]#subdirectory=setup/partner_contact
git+https://github.com/grap/[email protected]#subdirectory=setup/product_print_category
git+https://github.com/coopiteasy/[email protected]_invoice_date_required#subdirectory=setup/account_invoice_date_required
git+https://github.com/coopiteasy/[email protected]_invoice_negative_total#subdirectory=setup/account_invoice_negative_total
git+https://github.com/coopiteasy/[email protected]_picking_responsible#subdirectory=setup/stock_picking_responsible

0 comments on commit 7068f9a

Please sign in to comment.