Browse Source

Aug 24 [FIX] : Bug Fixed 'product_brand_inventory'

pull/277/head
AjmalCybro 2 years ago
parent
commit
270335d493
  1. 31
      product_brand_inventory/README.md
  2. 44
      product_brand_inventory/README.rst
  3. 1
      product_brand_inventory/__init__.py
  4. 7
      product_brand_inventory/__manifest__.py
  5. 8
      product_brand_inventory/doc/RELEASE_NOTES.md
  6. 22
      product_brand_inventory/models/__init__.py
  7. 2
      product_brand_inventory/models/brand.py
  8. 179
      product_brand_inventory/views/brand_views.xml

31
product_brand_inventory/README.md

@ -1,31 +0,0 @@
Product Brand in Inventory
==========================
Installation
============
- www.odoo.com/documentation/15.0/setup/install.html
- Install our custom addon
License
=======
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3)
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Credits
=======
* Cybrosys Techno Solutions <https://www.cybrosys.com>
Developer: Sonu Soman - sonu@cybrosys.info
Maintainer
----------
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.

44
product_brand_inventory/README.rst

@ -0,0 +1,44 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Product Brand in Inventory
==========================
This module lets you add Brand in Inventory and for products.
Installation
============
- www.odoo.com/documentation/16.0/setup/install.html
- Install our custom addon
License
=======
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3)
(http://www.gnu.org/licenses/agpl.html)
Bug Tracker
===========
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Contacts
--------
* Mail Contact : odoo@cybrosys.com
Credits
=======
Developer: (V16) Sonu Soman, Contact: odoo@cybrosys.com
Maintainer
----------
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com.
Further information
===================
HTML Description: `<static/description/index.html>`__

1
product_brand_inventory/__init__.py

@ -18,5 +18,4 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

7
product_brand_inventory/__manifest__.py

@ -20,9 +20,11 @@
###################################################################################
{
'name': 'Product Brand in Inventory',
'version': '16.0.1.0.0',
'version': '16.0.1.0.1',
'category': 'Warehouse',
'summary': 'Product Brand in Inventory',
'description': 'This module lets you add '
'Brand in Inventory and for products.',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
@ -30,12 +32,11 @@
'website': 'https://www.cybrosys.com',
'depends': ['stock'],
'data': [
'views/brand_views.xml',
'security/ir.model.access.csv',
'views/brand_views.xml',
],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

8
product_brand_inventory/doc/RELEASE_NOTES.md

@ -3,3 +3,11 @@
#### 20.09.2021
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Product Brand in Inventory
#### 18.08.2023
#### Version 16.0.1.0.1
#### UPDT
- Update Brand Group By in Inventory Report

22
product_brand_inventory/models/__init__.py

@ -1 +1,21 @@
from . import brand
# -*- coding: utf-8 -*-
###################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# This program is free software: you can modify
# it under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import brand

2
product_brand_inventory/models/brand.py

@ -18,7 +18,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
###################################################################################
from odoo import models, fields, api
@ -38,7 +37,6 @@ class BrandProduct(models.Model):
@api.depends('member_ids')
def get_count_products(self):
print('brand')
self.product_count = len(self.member_ids)

179
product_brand_inventory/views/brand_views.xml

@ -1,86 +1,111 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="product_brand_id" model="ir.ui.view">
<field name="name">Brand Name</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="brand_id"/>
</field>
<!-- Form view edited of product template. -->
<record id="product_template_form_view" model="ir.ui.view">
<field name="name">product.template.form.view.inherit.product.brand</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<field name="categ_id" position="after">
<field name="brand_id"/>
</field>
</record>
</field>
</record>
<record id="product_brand_action" model="ir.actions.act_window">
<field name="name">Product Brand</field>
<field name="res_model">product.brand</field>
<field name="view_mode">tree,form</field>
</record>
<record id="product_brand_view" model="ir.ui.view">
<field name="name">Product Brand</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="brand_image" widget="image" class="oe_avatar"/>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Brand Name"/>
<h1>
<field name="name"/>
</h1>
<div name="options_active"/>
</div>
<group>
<field name="product_count" style="width:40px;"/>
</group>
<!-- Action for Product Brand-->
<record id="product_brand_action" model="ir.actions.act_window">
<field name="name">Product Brand</field>
<field name="res_model">product.brand</field>
<field name="view_mode">tree,form</field>
</record>
<notebook>
<page string="Products">
<field name="member_ids" widget="many2many" options="{'not_delete': True}">
<kanban quick_create="false" create="true" delete="true">
<field name="id"/>
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click" style="max-width: 200px">
<div class="o_kanban_record_top">
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)"
class="oe_avatar oe_kanban_avatar_smallbox o_image_40_cover mb0"
alt="Avatar"/>
<div class="o_kanban_record_headings ml8">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong>
</div>
<!-- Product Brand Form view-->
<record id="product_brand_view_form" model="ir.ui.view">
<field name="name">product.brand.view.form</field>
<field name="model">product.brand</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="brand_image" widget="image" class="oe_avatar"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"
string="Brand Name"/>
<h1>
<field name="name"/>
</h1>
<div name="options_active"/>
</div>
<group>
<field name="product_count" style="width:40px;"/>
</group>
<notebook>
<page string="Products">
<field name="member_ids" widget="many2many"
options="{'not_delete': True}">
<kanban quick_create="false" create="true"
delete="true">
<field name="id"/>
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click"
style="max-width: 200px">
<div class="o_kanban_record_top">
<img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)"
class="oe_avatar oe_kanban_avatar_smallbox o_image_40_cover mb0"
alt="Avatar"/>
<div class="o_kanban_record_headings ml8">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
</div>
</t>
</templates>
</kanban>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="brand_group_by" model="ir.ui.view">
<field name="name">product.template.search.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<filter string="Brand" name="Brand" context="{'group_by':'brand_id'}"/>
</xpath>
</field>
</record>
<!-- Group by for Brand in Product Template Search-->
<record id="brand_group_by" model="ir.ui.view">
<field name="name">product.template.search.inherit</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<filter string="Brand" name="Brand"
context="{'group_by':'brand_id'}"/>
</xpath>
</field>
</record>
<!-- Brand Group By in Stock On Hand -->
<record id="quant_search_view" model="ir.ui.view">
<field name="name">quant.search.view.inherit.brand</field>
<field name="model">stock.quant</field>
<field name="inherit_id" ref="stock.quant_search_view"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='company']" position="after">
<filter string='Brand' name="brand" domain="[]" context="{'group_by': 'brand_id'}"/>
</xpath>
</field>
</record>
<!-- Menu of Product Brands-->
<menuitem id="product_brand_inventory"
name="Product Brands"
action="product_brand_action"
parent="stock.menu_stock_inventory_control"
sequence="2"/>
</data>
</odoo>
<menuitem id="product_brand_inventory"
name="Product Brands"
action="product_brand_action"
parent="stock.menu_stock_inventory_control"
sequence="2"/>
</odoo>

Loading…
Cancel
Save