-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by andhit-r
- Loading branch information
Showing
10 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
|
||
================================ | ||
Purchase + Inventory Integration | ||
================================ | ||
|
||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 14.0 of the repository https://github.com/open-synergy/ssi-purchase | ||
2. Add the path to this repository in your configuration (addons-path) | ||
3. Update the module list | ||
4. Go to menu *Apps -> Apps -> Main Apps* | ||
5. Search For *Purchase + Inventory Integration* | ||
6. Install the module | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/open-synergy/ssi-purchase/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed | ||
and welcomed feedback. | ||
|
||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Michael Viriyananda <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://simetri-sinergi.id/logo.png | ||
:alt: PT. Simetri Sinergi Indonesia | ||
:target: https://simetri-sinergi.id.com | ||
|
||
This module is maintained by the PT. Simetri Sinergi Indonesia. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright 2023 OpenSynergy Indonesia | ||
# Copyright 2023 PT. Simetri Sinergi Indonesia | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import ( | ||
models, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 OpenSynergy Indonesia | ||
# Copyright 2023 PT. Simetri Sinergi Indonesia | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "Purchase + Inventory Integration", | ||
"version": "14.0.1.0.0", | ||
"website": "https://simetri-sinergi.id", | ||
"author": "PT. Simetri Sinergi Indonesia, OpenSynergy Indonesia", | ||
"license": "LGPL-3", | ||
"installable": True, | ||
"application": True, | ||
"depends": [ | ||
"purchase", | ||
"stock", | ||
], | ||
"data": [ | ||
"security/res_group_data.xml", | ||
"security/ir_rule_data.xml", | ||
"views/stock_warehouse_views.xml", | ||
], | ||
"demo": [], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright 2023 OpenSynergy Indonesia | ||
# Copyright 2023 PT. Simetri Sinergi Indonesia | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
from . import ( | ||
stock_warehouse, | ||
res_users, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2023 OpenSynergy Indonesia | ||
# Copyright 2023 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResUsers(models.Model): | ||
_name = "res.users" | ||
_inherit = ["res.users"] | ||
|
||
warehouse_purchase_ids = fields.Many2many( | ||
string="Purchase Users", | ||
comodel_name="stock.warehouse", | ||
relation="rel_warehouse_2_purchase_user", | ||
column2="warehouse_id", | ||
column1="user_id", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2023 OpenSynergy Indonesia | ||
# Copyright 2023 PT. Simetri Sinergi Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
from odoo import fields, models | ||
|
||
|
||
class StockWarehouse(models.Model): | ||
_name = "stock.warehouse" | ||
_inherit = ["stock.warehouse"] | ||
|
||
purchase_user_ids = fields.Many2many( | ||
string="Purchase Users", | ||
comodel_name="res.users", | ||
relation="rel_warehouse_2_purchase_user", | ||
column1="warehouse_id", | ||
column2="user_id", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2023 OpenSynergy Indonesia | ||
Copyright 2023 PT. Simetri Sinergi Indonesia | ||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). --> | ||
<odoo> | ||
|
||
<record id="purchase_order_warehouse_user_rule" model="ir.rule"> | ||
<field name="name">Purchase Order - Warehouse</field> | ||
<field name="model_id" ref="purchase.model_purchase_order" /> | ||
<field name="groups" eval="[(4, ref('purchase_order_warehouse_group'))]" /> | ||
<field | ||
name="domain_force" | ||
>[('picking_type_id.warehouse_id.id','=',user.warehouse_purchase_ids.ids)]</field> | ||
<field name="perm_unlink" eval="1" /> | ||
<field name="perm_write" eval="1" /> | ||
<field name="perm_read" eval="1" /> | ||
<field name="perm_create" eval="1" /> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2022 OpenSynergy Indonesia | ||
Copyright 2022 PT. Simetri Sinergi Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
|
||
|
||
<!-- Data Ownership --> | ||
<record id="purchase_order_warehouse_group" model="res.groups"> | ||
<field name="name">Warehouse</field> | ||
<field | ||
name="category_id" | ||
ref="ssi_purchase.purchase_order_data_ownership_module_category" | ||
/> | ||
</record> | ||
|
||
<record id="ssi_purchase.purchase_order_company_group" model="res.groups"> | ||
<field name="name">Company</field> | ||
<field | ||
name="category_id" | ||
ref="ssi_purchase.purchase_order_data_ownership_module_category" | ||
/> | ||
<field name="implied_ids" eval="[(4, ref('purchase_order_warehouse_group'))]" /> | ||
</record> | ||
</odoo> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- Copyright 2022 OpenSynergy Indonesia | ||
Copyright 2022 PT. Simetri Sinergi Indonesia | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
<odoo> | ||
<record id="stock_warehouse_view_form" model="ir.ui.view"> | ||
<field name="name">stock.warehouse - form</field> | ||
<field name="model">stock.warehouse</field> | ||
<field name="inherit_id" ref="stock.view_warehouse" /> | ||
<field name="arch" type="xml"> | ||
<data> | ||
<xpath expr="//notebook" position="inside"> | ||
<page name="purchase" string="Purchase"> | ||
<group name="purchase_1" colspan="4" col="2"> | ||
<field | ||
name="purchase_user_ids" | ||
widget="many2many_tags_avatar" | ||
/> | ||
</group> | ||
</page> | ||
</xpath> | ||
</data> | ||
</field> | ||
</record> | ||
|
||
|
||
</odoo> |