This file contains hidden or 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
# fk_unconstrained.py | |
# Execute SQL statements with FK constraints temporarily disabled | |
# Used by the 16.0.4.0.0 migration (needs to be imported) | |
import pprint | |
from openupgradelib import openupgrade | |
MODULE = "some_module" |
This file contains hidden or 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
<group name="custom_questions" > | |
<label | |
for="" | |
attrs="{'invisible': [('internal_question_count', '<', 1)]}" | |
> | |
<field name="internal_question_1_label" nolabel="1" attrs="{'invisible': [('internal_question_count', '<', 1)]}" class="o_form_label" readonly="1"/> | |
</label> | |
<field | |
name="internal_question_1_answer" | |
attrs="{'invisible': [('internal_question_count', '<', 1)]}" |
This file contains hidden or 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
# Copyright 2022 Graeme Gellatly | |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |
from odoo import api, models | |
from odoo.tools.float_utils import float_compare | |
class StockQuant(models.Model): | |
_inherit = "stock.quant" |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
############################################################################## | |
# | |
# OpenERP / Odoo, Open Source Management Solution - module extension | |
# Copyright (C) 2014- O4SB (<http://openforsmallbusiness.co.nz>). | |
# Author Graeme Gellatly <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as | |
# published by the Free Software Foundation, either version 3 of the |
This file contains hidden or 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
Pycharm Find and Replace | |
self.pool.get\(('[\w\.]+')\) | |
self.pool[$1] |
This file contains hidden or 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
class StockMove(orm.Model): | |
_inherit = 'stock.move' | |
_order = 'date desc' | |
def _get_reference_accounting_values_for_valuation(self, cr, uid, move, | |
context=None): | |
""" | |
Return the reference amount and reference currency | |
representing the inventory valuation for this move. | |
These reference values should possibly be converted | |
before being posted in Journals to adapt to the primary |