-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
481 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,49 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
===================================================== | ||
Indonesia - Common Feature for Pusat Logistik Berikat | ||
===================================================== | ||
|
||
|
||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-l10n-indonesia | ||
2. Add the path to this repository in your configuration (addons-path) | ||
3. Update the module list | ||
4. Go to menu *Setting -> Modules -> Local Modules* | ||
5. Search For *Indonesia - Common Feature for Pusat Logistik Berikat* | ||
6. Install the module | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/open-synergy/opnsynid-l10n-indonesia/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 <viriyananda.michael@gmail.com> | ||
* Andhitia Rama <andhitia.r@gmail.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://opensynergy-indonesia.com/logo.png | ||
:alt: OpenSynergy Indonesia | ||
:target: https://opensynergy-indonesia.com | ||
|
||
This module is maintained by the OpenSynergy 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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
# pylint: disable=locally-disabled, manifest-required-author | ||
{ | ||
"name": "Indonesia - Common Feature for Pusat Logistik Berikat", | ||
"version": "8.0.1.4.3", | ||
"category": "localization", | ||
"website": "https://opensynergy-indonesia.com", | ||
"author": "OpenSynergy Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"l10n_id_djbc_app" | ||
], | ||
"data": [ | ||
"menu.xml", | ||
"views/stock_picking_type_views.xml" | ||
], | ||
} |
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,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<menuitem | ||
id="djbc_reporting_plb_menu" | ||
name="Pusat Logistik Berikat" | ||
sequence="1" | ||
parent="l10n_id_djbc_app.djbc_reporting_menu" | ||
/> | ||
</data> | ||
</openerp> |
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import stock_picking_type |
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp import models, fields | ||
|
||
|
||
class StockPickingType(models.Model): | ||
_inherit = "stock.picking.type" | ||
|
||
djbc_plb_movement_type = fields.Selection( | ||
string="DJBC's PLB Movement Type", | ||
selection=[ | ||
("in", "In"), | ||
("out", "Out"), | ||
], | ||
) | ||
djbc_plb_scrap = fields.Boolean( | ||
string="DJBC's PLB Scrap?", | ||
default=False, | ||
) | ||
djbc_plb_adjustment = fields.Boolean( | ||
string="DJBC's PLB Adjustment?", | ||
default=False, | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
l10n_id_djbc_plb_common/views/stock_picking_type_views.xml
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<record id="stock_picking_type_view_form" model="ir.ui.view"> | ||
<field name="name">stock.picking.type Form PLB</field> | ||
<field name="model">stock.picking.type</field> | ||
<field name="inherit_id" ref="stock.view_picking_type_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//group[last()]" position="after"> | ||
<group name="djbc_plb" colspan="4" col="2" string="DJBC's PLB Configuration"> | ||
<field name="djbc_plb_movement_type"/> | ||
<field name="djbc_plb_scrap"/> | ||
<field name="djbc_plb_adjustment"/> | ||
</group> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</openerp> |
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,49 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
============================================================ | ||
Indonesia - Lap. Pemasukan for DJBC's Pusat Logistik Berikat | ||
============================================================ | ||
|
||
|
||
|
||
Installation | ||
============ | ||
|
||
To install this module, you need to: | ||
|
||
1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-l10n-indonesia | ||
2. Add the path to this repository in your configuration (addons-path) | ||
3. Update the module list | ||
4. Go to menu *Setting -> Modules -> Local Modules* | ||
5. Search For *Indonesia - Lap. Pemasukan for DJBC's Pusat Logistik Berikat* | ||
6. Install the module | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/open-synergy/opnsynid-l10n-indonesia/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 <viriyananda.michael@gmail.com> | ||
* Andhitia Rama <andhitia.r@gmail.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://opensynergy-indonesia.com/logo.png | ||
:alt: OpenSynergy Indonesia | ||
:target: https://opensynergy-indonesia.com | ||
|
||
This module is maintained by the OpenSynergy 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,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import wizards | ||
from . import reports |
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,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Indonesia - Lap. Pemasukan for DJBC's " | ||
"Pusat Logistik Berikat", | ||
"version": "8.0.1.2.1", | ||
"category": "localization", | ||
"website": "https://opensynergy-indonesia.com", | ||
"author": "OpenSynergy Indonesia", | ||
"license": "AGPL-3", | ||
"installable": True, | ||
"depends": [ | ||
"l10n_id_djbc_plb_common" | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"wizards/date_range_selector_views.xml", | ||
"reports/lap_plb_lap_pemasukan.xml" | ||
], | ||
} |
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import lap_plb_lap_pemasukan |
131 changes: 131 additions & 0 deletions
131
l10n_id_djbc_plb_lap_pemasukan/reports/lap_plb_lap_pemasukan.py
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,131 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 OpenSynergy Indonesia | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp import models, fields | ||
from openerp import tools | ||
|
||
|
||
class LapPlbLapPemasukan(models.Model): | ||
_name = "l10n_id.djbc_plb_lap_pemasukan" | ||
_description = "Laporan Pemasukan Barang Untuk Pusat Logistik Berikat" | ||
_auto = False | ||
|
||
jenis_dokumen = fields.Many2one( | ||
string="Jenis Dokumen", | ||
comodel_name="l10n_id.djbc_document_type" | ||
) | ||
|
||
no_dokumen = fields.Char( | ||
string="No. Dokumen" | ||
) | ||
|
||
tgl_dokumen = fields.Date( | ||
string="Tanggal Dokumen" | ||
) | ||
|
||
no_penerimaan = fields.Char( | ||
string="Nomor Penerimaan" | ||
) | ||
|
||
tgl_penerimaan = fields.Char( | ||
string="Tanggal Penerimaan" | ||
) | ||
|
||
pengirim = fields.Many2one( | ||
string="Pengirim Barang", | ||
comodel_name="res.partner" | ||
) | ||
|
||
kode_barang = fields.Char( | ||
string="Kode Barang" | ||
) | ||
|
||
nama_barang = fields.Many2one( | ||
string="Nama Barang", | ||
comodel_name="product.product" | ||
) | ||
|
||
jumlah = fields.Float( | ||
string="Jumlah" | ||
) | ||
|
||
satuan = fields.Many2one( | ||
string="Satuan", | ||
comodel_name="product.uom" | ||
) | ||
|
||
nilai = fields.Float( | ||
string="Nilai" | ||
) | ||
|
||
warehouse_id = fields.Many2one( | ||
string="Warehouse", | ||
comodel_name="stock.warehouse" | ||
) | ||
|
||
def _select(self): | ||
select_str = """ | ||
SELECT a.id as id, | ||
C.type_id as jenis_dokumen, | ||
C.name as no_dokumen, | ||
C.date as tgl_dokumen, | ||
B.name as no_penerimaan, | ||
A.date as tgl_penerimaan, | ||
B.partner_id as pengirim, | ||
D.default_code as kode_barang, | ||
A.product_id as nama_barang, | ||
A.product_qty as jumlah, | ||
A.product_uom as satuan, | ||
F.nilai as nilai, | ||
E.warehouse_id AS warehouse_id | ||
""" | ||
return select_str | ||
|
||
def _from(self): | ||
from_str = """ | ||
FROM stock_move AS A | ||
""" | ||
return from_str | ||
|
||
def _where(self): | ||
where_str = """ | ||
WHERE E.djbc_plb_movement_type='in' AND | ||
E.djbc_plb_scrap IS FALSE AND | ||
E.djbc_plb_adjustment IS FALSE | ||
""" | ||
return where_str | ||
|
||
def _join(self): | ||
join_str = """ | ||
LEFT JOIN stock_picking AS B ON A.picking_id=B.id | ||
JOIN l10n_id_djbc_custom_document AS C | ||
ON A.djbc_custom_document_id=C.id | ||
JOIN product_product AS D ON A.product_id=D.id | ||
JOIN stock_picking_type AS E ON A.picking_type_id=E.id | ||
JOIN | ||
( | ||
SELECT F1.move_id, | ||
SUM(G1.qty*G1.cost) AS nilai | ||
FROM stock_quant_move_rel AS F1 | ||
JOIN stock_quant AS G1 ON F1.quant_id=G1.id | ||
GROUP BY F1.move_id | ||
) AS F ON F.move_id=A.id | ||
""" | ||
return join_str | ||
|
||
def init(self, cr): | ||
tools.drop_view_if_exists(cr, self._table) | ||
# pylint: disable=locally-disabled, sql-injection | ||
cr.execute("""CREATE or REPLACE VIEW %s as ( | ||
%s | ||
%s | ||
%s | ||
%s | ||
)""" % ( | ||
self._table, | ||
self._select(), | ||
self._from(), | ||
self._join(), | ||
self._where() | ||
)) |
Oops, something went wrong.