Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Default number lines journal items #131

Open
wants to merge 30 commits into
base: 9.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ebdfb5d
[IMP] move the certisys logo on invoice to a dedicated module
Feb 18, 2019
81e4650
Add files
nicolasj77 Feb 17, 2019
d356d5e
Add display unit
nicolasj77 Feb 18, 2019
f64d393
Add to test
nicolasj77 Feb 18, 2019
a06f0f9
Add fields to PDF
nicolasj77 Feb 18, 2019
74f5160
Add weight and unity on PDF
nicolasj77 Feb 19, 2019
8e6870b
Add files
nicolasj77 Jan 28, 2019
f50d601
Add provider_ref_id field
nicolasj77 Jan 28, 2019
355c63b
Add xpath
nicolasj77 Feb 11, 2019
725d715
Modify stock_view for test
nicolasj77 Feb 11, 2019
016e326
show provider reference
nicolasj77 Feb 11, 2019
babe19c
Add translation file
nicolasj77 Feb 17, 2019
310d543
Add provider reference on PDF
nicolasj77 Feb 19, 2019
caee3b1
Change place column weight
nicolasj77 Feb 19, 2019
05b6e2c
Fix review
nicolasj77 Feb 19, 2019
3166e59
Fix review
nicolasj77 Feb 19, 2019
800ec8b
Check if at least one record in recordset
nicolasj77 Feb 22, 2019
8108d41
Fix review
nicolasj77 Feb 22, 2019
8832f63
[FIX] review
nicolasj77 Feb 23, 2019
122a4e3
[FIX] mrp_brewing: product_id domain on stock.move
robinkeunen Feb 20, 2019
e133120
[ADD] sale order related fields
robinkeunen Feb 22, 2019
68cc979
[IMP] foodhub: link pack operation to sale order lines
robinkeunen Feb 25, 2019
29e40f3
[REFACT] remove browse while the mail template is already on hand.
Feb 26, 2019
4131223
Suppression du deuxième product_id
nicolasj77 Jan 28, 2019
438d6de
Restore init and openerp
nicolasj77 Jan 28, 2019
42bec17
fix review
nicolasj77 Feb 11, 2019
8c21d97
[ADD] add module hw_printer_network
Mar 2, 2019
e6e193e
[PEP8] make code pep8 compliant
Mar 4, 2019
d369d02
[ADD] add files for module and test limit in xml
nicolasj77 Mar 11, 2019
0f2b521
[IMP] Change inheritance view for pager
nicolasj77 Mar 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
33 changes: 33 additions & 0 deletions account_invoice_label_certisys/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2013-2016 Open Architects Consulting SPRL.
#
# 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': 'Account Invoice label certisys',
'description': 'Add certisys label on invoices',
'category': 'Invoice',
'version': '9.0.1.0',
'author': 'Coop IT Easy SCRLfs',
'depends': [
'account',
],
'data': [
'reports/invoice_template.xml'
],
'installable': True,
}
16 changes: 16 additions & 0 deletions account_invoice_label_certisys/reports/invoice_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="certicys_label" inherit_id="account.report_invoice_document">
<xpath expr="//p[@t-if='o.fiscal_position_id.note']" position="after">
<p>
<img src="/account_invoice_label_certisys/static/img/EU_Organic_Logo.jpg" style="width:98px;height:auto;padding-bottom:5px;"/>
<strong>Toutes les bières de la <span t-field="o.company_id.name"/> sont certifiées bio par certisys BE-BIO-01</strong>
</p>
</xpath>

</template>
</data>


</odoo>
Empty file.
21 changes: 21 additions & 0 deletions account_journal_items_default_number_lines/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Coop IT Easy SCRLfs
# Nicolas Jamoulle, <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Default number of lines in journal items",
"version": "9.0.1.0",
"depends": [
'account',
],
"author": "Coop IT Easy SCRLfs",
"license": "AGPL-3",
"website": "www.coopiteasy.be",
"description": """
Allow to change d efault number of lines in journal items
""",
"data": [
'views/account_journal_view.xml',
],
'installable': True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<openerp>
<data>
<record model="ir.actions.act_window" id="account.action_account_moves_all_a">
<field name="limit">200</field>
</record>
</data>
</openerp>
3 changes: 3 additions & 0 deletions foodhub_custom/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

from . import models
22 changes: 22 additions & 0 deletions foodhub_custom/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2019 Coop IT Easy SCRLfs
# Robin Keunen <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': "Foodhub Custom",
'version': '9.0.1.0.0',
'description': """
Foodhub customizations""",

'author': "Coop IT Easy SCRL fs",
'website': "http://www.coopiteasy.be",
'license': 'AGPL-3',
'category': 'Account',
'depends': [
'sale_stock',
],

'data': [
'reports/report_deliveryslip.xml',
],
}
3 changes: 3 additions & 0 deletions foodhub_custom/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

from . import stock
79 changes: 79 additions & 0 deletions foodhub_custom/models/stock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-

from openerp import models, fields, api


class StockMove(models.Model):
_inherit = 'stock.move'

order_line_id = fields.Many2one(
comodel_name='sale.order.line',
string='Related Sale Line',
compute='_compute_related_order_line',
)

currency_id = fields.Many2one(
related='order_line_id.currency_id')
price_subtotal = fields.Monetary(
string='Subtotal',
related='order_line_id.price_subtotal')
price_taxes = fields.Monetary(
string='Taxes',
related='order_line_id.price_tax')
price_total = fields.Monetary(
string='Total',
related='order_line_id.price_total')

@api.multi
@api.depends('picking_id.origin')
def _compute_related_order_line(self):
for move in self:
origin = move.picking_id.origin
sale_order = (
self.env['sale.order']
.search([('name', '=', origin)])
)
order_line = (
sale_order.order_line
.filtered(
lambda line: line.product_id == move.product_id)
)
move.order_line_id = order_line


class StockPackOperation(models.Model):
_inherit = 'stock.pack.operation'

order_line_id = fields.Many2one(
comodel_name='sale.order.line',
string='Related Move Line',
compute='_compute_related_order_line',
)

currency_id = fields.Many2one(
related='order_line_id.currency_id')
price_subtotal = fields.Monetary(
string='Subtotal',
related='order_line_id.price_subtotal')
price_taxes = fields.Monetary(
string='Taxes',
related='order_line_id.price_tax')
price_total = fields.Monetary(
string='Total',
related='order_line_id.price_total')

@api.multi
@api.depends('picking_id.origin')
def _compute_related_order_line(self):
for operation in self:
origin = operation.picking_id.origin
sale_order = (
self.env['sale.order']
.search([('name', '=', origin)])
)
order_line = (
sale_order.order_line
.filtered(
lambda line: line.product_id == operation.product_id)
)
operation.order_line_id = order_line
34 changes: 34 additions & 0 deletions foodhub_custom/reports/report_deliveryslip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_delivery_document" inherit_id="stock.report_delivery_document">

<xpath expr="//table[@t-if='not o.pack_operation_ids']/thead/tr/th[1]" position="after">
<th><strong>Price</strong></th>
<th><strong>Taxes</strong></th>
<th><strong>Total</strong></th>
</xpath>

<xpath expr="//table[@t-if='not o.pack_operation_ids']/tbody/tr/td[1]" position="after">
<!-- in <tr t-foreach="o.move_lines" t-as="move"> -->
<td><span t-field="move.price_subtotal"/></td>
<td><span t-field="move.price_taxes"/></td>
<td><span t-field="move.price_total"/></td>
</xpath>

<xpath expr="//table[@t-if='o.pack_operation_ids']/thead/tr/th[1]" position="before">
<th><strong>Price</strong></th>
<th><strong>Taxes</strong></th>
<th><strong>Total</strong></th>
</xpath>

<xpath expr="//table[@t-if='o.pack_operation_ids']/tbody/tr/td[1]" position="after">
<!-- in <tr t-foreach="o.pack_operation_ids" t-as="pack_operation">-->
<td><span t-field="pack_operation.price_subtotal"/></td>
<td><span t-field="pack_operation.price_taxes"/></td>
<td><span t-field="pack_operation.price_total"/></td>
</xpath>

</template>
</data>
</openerp>
30 changes: 30 additions & 0 deletions hw_printer_network/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: https://www.gnu.org/licenses/lgpl
:alt: License: LGPL-3

==========================
Hardware Network Printer
==========================

Hardware Driver for Network pinters.

When print an order, the PosBox receives the network printer IP address and the receipt from client's POS.
If the IP address is not empty, it will be connected to the network printer by using this address, which in turn prints the receipt.

Credits
=======

Contributors
------------
* Dinar Gabbasov <[email protected]>
* Tom Blauwendraat <[email protected]>

Sponsors
--------
* `IT-Projects LLC <https://it-projects.info>`__

Maintainers
-----------
* `IT-Projects LLC <https://it-projects.info>`__


5 changes: 5 additions & 0 deletions hw_printer_network/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

def post_load():
from . import controllers
37 changes: 37 additions & 0 deletions hw_printer_network/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

{
"name": """Hardware Network Printer""",
"summary": """Hardware Driver for Network Printers""",
"category": "Point of Sale",
"images": [],
"version": "10.0.2.0.1",
"application": False,

"author": "IT-Projects LLC, Dinar Gabbasov",
"support": "[email protected]",
"website": "https://twitter.com/gabbasov_dinar",
"license": "LGPL-3",
"price": 59.00,
"currency": "EUR",

"depends": [
"hw_escpos",
],
"external_dependencies": {"python": [], "bin": []},
"data": [
],
"qweb": [
],
"demo": [],

"post_load": "post_load",
"pre_init_hook": None,
"post_init_hook": None,

"auto_install": False,
"installable": True,
}
4 changes: 4 additions & 0 deletions hw_printer_network/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from . import hw_printer_network_controller
Loading