Skip to content

Commit

Permalink
[REF] move internal notes to sale_stock_ux
Browse files Browse the repository at this point in the history
  • Loading branch information
jjscarafia committed Jun 6, 2020
1 parent 4bba820 commit 4616cf3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 55 deletions.
1 change: 0 additions & 1 deletion report_extended_stock/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
'data': [
'views/report_view.xml',
'views/stock_view.xml',
'views/stock_book_views.xml',
],
'demo': [
],
Expand Down
1 change: 0 additions & 1 deletion report_extended_stock/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
# directory
##############################################################################
from . import stock_picking
from . import stock_book
from . import report
13 changes: 0 additions & 13 deletions report_extended_stock/models/stock_book.py

This file was deleted.

16 changes: 0 additions & 16 deletions report_extended_stock/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,3 @@ def do_print_voucher(self):

return self.env['ir.actions.report'].get_report(self).report_action(
self)

@api.constrains('sale_id')
def set_notes(self):
"""Setamos notas internas y observaciones desde la venta
"""
for rec in self.filtered('sale_id'):
vals = {}
propagate_internal_notes = self.env['ir.config_parameter'].sudo(
).get_param('sale.propagate_internal_notes') == 'True'
propagate_note = self.env['ir.config_parameter'].sudo(
).get_param('sale.propagate_note') == 'True'
if propagate_internal_notes and rec.sale_id.internal_notes:
vals['note'] = rec.sale_id.internal_notes
if propagate_note and rec.sale_id.note:
vals['observations'] = rec.sale_id.note
rec.write(vals)
24 changes: 0 additions & 24 deletions report_extended_stock/views/stock_book_views.xml

This file was deleted.

0 comments on commit 4616cf3

Please sign in to comment.