Skip to content

Commit

Permalink
[8.0.1.5.1] l10n_id_djbc_kb_lap_common
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed Jan 10, 2019
1 parent b8ca495 commit 5b06471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion l10n_id_djbc_kb_lap_common/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# pylint: disable=locally-disabled, manifest-required-author
{
"name": "Indonesia - Common Feature for Kawasan Berikat Reporting",
"version": "8.0.1.5.0",
"version": "8.0.1.5.1",
"category": "localization",
"website": "https://opensynergy-indonesia.com",
"author": "OpenSynergy Indonesia",
Expand Down
9 changes: 5 additions & 4 deletions l10n_id_djbc_kb_lap_common/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class StockMove(models.Model):

@api.constrains("state", "djbc_custom_document_id", "picking_type_id")
def _check_djbc_document(self):
if self.state == "done" and \
self.picking_type_id.djbc_kb_required_doc and \
not self.djbc_custom_document_id:
raise UserError(_("Need DJBC KB Doc"))
for move in self:
if move.state == "done" and \
move.picking_type_id.djbc_kb_required_doc and \
not move.djbc_custom_document_id:
raise UserError(_("Need DJBC KB Doc"))

0 comments on commit 5b06471

Please sign in to comment.