Skip to content

Commit

Permalink
[ADD] sale_budget
Browse files Browse the repository at this point in the history
  • Loading branch information
jjscarafia committed Jan 25, 2023
1 parent 8f1901a commit 9a29eea
Show file tree
Hide file tree
Showing 18 changed files with 866 additions and 0 deletions.
70 changes: 70 additions & 0 deletions sale_budget/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

================================
Budgets for quotations and sales
================================

TODO

Installation
============

To install this module, you need to:

#. Only need to install the module

Configuration
=============

To configure this module, you need to:

#. Nothing to configure

Usage
=====

To use this module, you need to:

#. You can set three discount to sale order line.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: http://runbot.adhoc.com.ar/

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/sale/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
=======

Images
------

* |company| |icon|

Contributors
------------

Maintainer
----------

|company_logo|

This module is maintained by the |company|.

To contribute to this module, please visit https://www.adhoc.com.ar.
5 changes: 5 additions & 0 deletions sale_budget/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from . import models
45 changes: 45 additions & 0 deletions sale_budget/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
##############################################################################
#
# Copyright (C) 2023 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# 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
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Budgets for quotations and sales',
'version': "16.0.1.0.0",
'category': 'Sales Management',
'sequence': 14,
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
'summary': '',
'depends': [
'sale_management',
'account_budget',
],
'data': [
'views/account_budget_post_views.xml',
'views/crossovered_budget_lines_views.xml',
'views/account_budget_views.xml',
'views/sale_order_views.xml',
'security/ir.model.access.csv',
],
'demo': [
],
'installable': True,
'auto_install': False,
'application': False,
}
206 changes: 206 additions & 0 deletions sale_budget/data/account_budget_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Budgets -->
<data noupdate="1">
<!-- Optimistic -->
<record id="crossovered_budget_template0" model="crossovered.budget">
<field name="name">Budget template</field>
</record>
<record id="budget_position_" model="account.budget.post">
<!-- <field name="account_ids" ref="crossovered_budget_budgetoptimistic0" /> -->
<field name="product_ids" eval="[]"/>
</record>
<record id="budget_line_analytic_admin" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-01-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-12-31'" name="date_to"/>
<field name="planned_amount">-35000</field>
<field name="analytic_account_id" ref="analytic.analytic_administratif"/>
</record>
<record id="budget_line_analytic_agrolait1" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-01-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-01-31'" name="date_to"/>
<field name="planned_amount">10000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait2" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-02-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-02-28'" name="date_to"/>
<field name="planned_amount">10000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait3" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-03-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-03-31'" name="date_to"/>
<field name="planned_amount">12000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait4" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-04-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-04-30'" name="date_to"/>
<field name="planned_amount">15000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait5" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-05-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-05-31'" name="date_to"/>
<field name="planned_amount">15000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait6" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-06-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-06-30'" name="date_to"/>
<field name="planned_amount">15000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait7" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-07-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-07-31'" name="date_to"/>
<field name="planned_amount">13000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait8" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-08-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-08-31'" name="date_to"/>
<field name="planned_amount">9000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait9" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-09-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-09-30'" name="date_to"/>
<field name="planned_amount">8000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait10" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-10-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-10-31'" name="date_to"/>
<field name="planned_amount">15000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait11" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-11-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-11-30'" name="date_to"/>
<field name="planned_amount">15000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait12" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetoptimistic0" />
<field eval="str(datetime.now().year+1)+'-12-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-12-31'" name="date_to"/>
<field name="planned_amount">18000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>

<!-- pessimistic-->
<record id="crossovered_budget_budgetpessimistic0" model="crossovered.budget">
<field eval="'Budget '+str(datetime.now().year+1)+': Pessimistic'" name="name"/>
<field eval="str(datetime.now().year+1)+'-01-01'" name="date_from"/>
<field eval="&quot;&quot;&quot;draft&quot;&quot;&quot;" name="state"/>
<field eval="str(datetime.now().year+1)+'-12-31'" name="date_to"/>
<field name="user_id" ref="base.user_admin"/>
</record>

<record id="budget_line_analytic_admin_pessim" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-01-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-12-31'" name="date_to"/>
<field name="planned_amount">-55000</field>
<field name="analytic_account_id" ref="analytic.analytic_administratif"/>
</record>
<record id="budget_line_analytic_agrolait_pessim1" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-01-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-01-31'" name="date_to"/>
<field name="planned_amount">9000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim2" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-02-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-02-28'" name="date_to"/>
<field name="planned_amount">8000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim3" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-03-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-03-31'" name="date_to"/>
<field name="planned_amount">10000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim4" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-04-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-04-30'" name="date_to"/>
<field name="planned_amount">14000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim5" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-05-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-05-31'" name="date_to"/>
<field name="planned_amount">16000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim6" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-06-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-06-30'" name="date_to"/>
<field name="planned_amount">13000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim7" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-07-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-07-31'" name="date_to"/>
<field name="planned_amount">10000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim8" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-08-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-08-31'" name="date_to"/>
<field name="planned_amount">8000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim9" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-09-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-09-30'" name="date_to"/>
<field name="planned_amount">7000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim10" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-10-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-10-31'" name="date_to"/>
<field name="planned_amount">12000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim11" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-11-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-11-30'" name="date_to"/>
<field name="planned_amount">17000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
<record id="budget_line_analytic_agrolait_pessim12" model="crossovered.budget.lines">
<field name="crossovered_budget_id" ref="crossovered_budget_budgetpessimistic0" />
<field eval="str(datetime.now().year+1)+'-12-01'" name="date_from"/>
<field eval="str(datetime.now().year+1)+'-12-31'" name="date_to"/>
<field name="planned_amount">17000</field>
<field name="analytic_account_id" ref="analytic.analytic_agrolait"/>
</record>
</data>
</odoo>
60 changes: 60 additions & 0 deletions sale_budget/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_three_discounts
#
# Translators:
# Juan José Scarafía <[email protected]>, 2020
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-11 13:03+0000\n"
"PO-Revision-Date: 2020-06-12 01:55+0000\n"
"Last-Translator: Juan José Scarafía <[email protected]>, 2020\n"
"Language-Team: German (https://www.transifex.com/adhoc/teams/46451/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: sale_three_discounts
#: code:addons/sale_three_discounts/models/account_invoice_line.py:0
#: code:addons/sale_three_discounts/models/sale_order_line.py:0
#, python-format
msgid ", must be less or equal than 100"
msgstr ""

#. module: sale_three_discounts
#: model:ir.model.fields,field_description:sale_three_discounts.field_sale_order_line__discount
msgid "Discount (%)"
msgstr ""

#. module: sale_three_discounts
#: model:ir.model.fields,field_description:sale_three_discounts.field_account_move_line__discount1
#: model:ir.model.fields,field_description:sale_three_discounts.field_sale_order_line__discount1
msgid "Discount 1 (%)"
msgstr "Rabatt 1 (%)"

#. module: sale_three_discounts
#: model:ir.model.fields,field_description:sale_three_discounts.field_account_move_line__discount2
#: model:ir.model.fields,field_description:sale_three_discounts.field_sale_order_line__discount2
msgid "Discount 2 (%)"
msgstr "Rabatt 2 (%)"

#. module: sale_three_discounts
#: model:ir.model.fields,field_description:sale_three_discounts.field_account_move_line__discount3
#: model:ir.model.fields,field_description:sale_three_discounts.field_sale_order_line__discount3
msgid "Discount 3 (%)"
msgstr "Rabatt 3 (%)"

#. module: sale_three_discounts
#: model:ir.model,name:sale_three_discounts.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: sale_three_discounts
#: model:ir.model,name:sale_three_discounts.model_sale_order_line
msgid "Sales Order Line"
msgstr "Auftragsposition"
Loading

0 comments on commit 9a29eea

Please sign in to comment.