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

16.0 staging #8

Merged
merged 14 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,021 changes: 1,021 additions & 0 deletions bankayma_account/i18n/he_IL.po

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions bankayma_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,17 @@ def _portal_create_vendor_bill(self, post_data, uploaded_files):
self.with_context(default_move_type="in_invoice").with_company(company)
) as invoice_form:
invoice_form.partner_id = self.env.user.partner_id
invoice_form.fiscal_position_id = self.env[
"account.fiscal.position"
].browse(int(post_data.get("fpos")))
with invoice_form.invoice_line_ids.new() as invoice_line:
invoice_line.name = post_data.get("description")
invoice_line.price_unit = post_data.get("amount")
invoice = invoice_form.save()
invoice.fiscal_position_id = self.env["account.fiscal.position"].browse(
int(post_data.get("fpos"))
)
invoice.invoice_line_ids.write({"bankayma_immutable": True})
attachments = self.env["ir.attachment"]
for uploaded_file in uploaded_files.getlist("upload"):
self.env["ir.attachment"].create(
attachments += self.env["ir.attachment"].create(
{
"res_model": self._name,
"res_id": invoice.id,
Expand All @@ -281,4 +282,11 @@ def _portal_create_vendor_bill(self, post_data, uploaded_files):
"name": uploaded_file.filename,
}
)
if attachments:
invoice.with_context(no_new_invoice=True).message_post(
body=_("Attachments"),
message_type="comment",
subtype_xmlid="mail.mt_comment",
attachment_ids=attachments.ids,
)
return invoice
48 changes: 48 additions & 0 deletions bankayma_account/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,41 @@
<field name="narration" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<field name="fiscal_position_id" position="attributes">
<attribute
name="attrs"
>{'invisible': [('move_type', '!=', 'in_invoice')]}</attribute>
</field>
<xpath
expr="//group[@id='header_right_group']/field[@name='date']"
position="attributes"
>
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//label[@for='invoice_date']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//label[@for='invoice_date'][2]" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<field name="invoice_date" position="attributes">
<attribute name="invisible">1</attribute>
</field>
<xpath
expr="//field[@name='invoice_date_due']/parent::div[hasclass('d-flex')]"
position="attributes"
>
<attribute name="invisible">1</attribute>
</xpath>
<xpath
expr="//label[@for='invoice_date_due']/parent::div[hasclass('o_td_label')]"
position="attributes"
>
<attribute name="invisible">1</attribute>
</xpath>
<field name="name" position="attributes">
<attribute name="readonly">1</attribute>
</field>
<xpath
expr="//field[@name='invoice_line_ids']//field[@name='tax_ids']"
position="attributes"
Expand Down Expand Up @@ -76,6 +111,19 @@
position="attributes"
>
<attribute name="domain">bankayma_product_domain</attribute>
<attribute name="string">Item</attribute>
</xpath>
<xpath
expr="//field[@name='invoice_line_ids']/tree/field[@name='name']"
position="attributes"
>
<attribute name="string">Description</attribute>
</xpath>
<xpath
expr="//field[@name='invoice_line_ids']/tree/field[@name='analytic_distribution']"
position="attributes"
>
<attribute name="string">Tag</attribute>
</xpath>
<field name="partner_id" position="after">
<field name="fiscal_position_id" position="move" />
Expand Down
12 changes: 12 additions & 0 deletions bankayma_account/views/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,17 @@
eval="[Command.link(ref('base.group_no_one')), Command.unlink(ref('base.group_user'))]"
/>
</record>
<menuitem
id="menu_bankayma_config_analytic_accounts"
action="analytic.action_account_analytic_account_form"
parent="bankayma_base.menu_bankayma_config"
sequence="10"
/>
<menuitem
id="menu_bankayma_config_analytic_plans"
action="analytic.account_analytic_plan_action"
parent="bankayma_base.menu_bankayma_config"
sequence="20"
/>

</odoo>
30 changes: 30 additions & 0 deletions bankayma_account/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@
>
<field name="branch_code" />
</xpath>
<xpath
expr="//field[@name='bank_ids']//field[@name='bank_id']"
position="before"
>
<field name="acc_number" position="move" />
</xpath>
<field name="vat" position="after">
<xpath
expr="//group[@name='fiscal_information']/field[@name='property_account_position_id']"
position="move"
/>
<field name="bank_ids" position="move" />
</field>
<xpath
expr="//field[@name='bank_ids']/tree/field[@name='allow_out_payment']"
position="attributes"
>
<attribute name="invisible">1</attribute>
</xpath>
<field name="bank_ids" position="attributes">
<attribute
name="context"
>{'default_allow_out_payment': True}</attribute>
</field>
<group name="fiscal_information" position="attributes">
<attribute name="invisible">1</attribute>
</group>
<group name="banks" position="attributes">
<attribute name="invisible">1</attribute>
</group>
</field>
</record>

Expand Down
9 changes: 9 additions & 0 deletions bankayma_account/views/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
name="upload"
id="upload"
multiple="multiple"
accept=".pdf,.jpg,.png"
/>
<div
t-out="request.env.user.partner_id.property_account_position_id.vendor_doc_description"
Expand All @@ -271,4 +272,12 @@
</t>
</template>

<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<p t-if="not is_html_empty(o.fiscal_position_id.note)" position="attributes">
<attribute
name="t-if"
>not is_html_empty(o.fiscal_position_id.note) and o.is_purchase_document(True)</attribute>
</p>
</template>

</odoo>
1 change: 1 addition & 0 deletions bankayma_base/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"web_responsive",
"web_select_all_companies",
"spreadsheet_dashboard_oca",
"spreadsheet_board",
],
"data": [
"security/bankayma_base.xml",
Expand Down
97 changes: 97 additions & 0 deletions bankayma_base/i18n/he_IL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * bankayma_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-13 17:58+0000\n"
"PO-Revision-Date: 2023-06-13 17:58+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: bankayma_base
#: model_terms:res.company,report_footer:bankayma_base.child_comp1
msgid "+1 (650) 555-0111 [email protected] http://www.example.com"
msgstr ""

#. module: bankayma_base
#: model_terms:ir.ui.view,arch_db:bankayma_base.view_res_users_form
msgid "/my/example"
msgstr ""

#. module: bankayma_base
#: model_terms:res.company,invoice_terms:bankayma_base.child_comp1
msgid "A note from the parent company<br>"
msgstr ""

#. module: bankayma_base
#: model:ir.model.fields,help:bankayma_base.field_res_users__login_redirect
msgid ""
"After login, the user will be redirected to this page instead of /web or /my"
msgstr ""

#. module: bankayma_base
#: model:ir.ui.menu,name:bankayma_base.menu_bankayma_root
msgid "BANKayma"
msgstr ""

#. module: bankayma_base
#: model:ir.module.category,name:bankayma_base.category
msgid "Bankayma"
msgstr ""

#. module: bankayma_base
#: model:res.company,name:bankayma_base.child_comp1
msgid "Child Company 1"
msgstr ""

#. module: bankayma_base
#: model_terms:ir.ui.view,arch_db:bankayma_base.external_layout_standard
msgid "Child logo"
msgstr ""

#. module: bankayma_base
#: model:ir.ui.menu,name:bankayma_base.menu_bankayma_contacts
msgid "Contacts"
msgstr ""

#. module: bankayma_base
#: model:ir.model.fields,field_description:bankayma_base.field_res_users__login_redirect
msgid "Login Redirect"
msgstr ""

#. module: bankayma_base
#: model_terms:ir.ui.view,arch_db:bankayma_base.external_layout_standard
msgid "Logo"
msgstr ""

#. module: bankayma_base
#: model:res.groups,name:bankayma_base.group_org_manager
msgid "Organization Manager"
msgstr ""

#. module: bankayma_base
#: model:res.groups,name:bankayma_base.group_manager
msgid "Project Manager"
msgstr ""

#. module: bankayma_base
#: model:res.groups,name:bankayma_base.group_user
msgid "Project User"
msgstr ""

#. module: bankayma_base
#: model:ir.model,name:bankayma_base.model_res_users
msgid "User"
msgstr ""

#. module: bankayma_base
#: model:res.groups,name:bankayma_base.group_vendor
msgid "Vendor"
msgstr ""
6 changes: 6 additions & 0 deletions bankayma_base/views/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
parent="menu_bankayma_root"
sequence="200"
/>
<menuitem
id="menu_bankayma_config"
parent="menu_bankayma_root"
sequence="1000"
name="Configuration"
/>

<!-- assign standard menus to debug user (= hide them) -->
<record id="mail.menu_root_discuss" model="ir.ui.menu">
Expand Down
1 change: 1 addition & 0 deletions bankayma_base/views/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
style="max-height: 45px;"
alt="Child logo"
/>
<div t-field="company.name" />
</div>
</div>
</xpath>
Expand Down
1 change: 1 addition & 0 deletions setup/spreadsheet_board/odoo/addons/spreadsheet_board
6 changes: 6 additions & 0 deletions setup/spreadsheet_board/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
35 changes: 35 additions & 0 deletions spreadsheet_board/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**This file is going to be generated by oca-gen-addon-readme.**

*Manual changes will be overwritten.*

Please provide content in the ``readme`` directory:

* **DESCRIPTION.rst** (required)
* INSTALL.rst (optional)
* CONFIGURE.rst (optional)
* **USAGE.rst** (optional, highly recommended)
* DEVELOP.rst (optional)
* ROADMAP.rst (optional)
* HISTORY.rst (optional, recommended)
* **CONTRIBUTORS.rst** (optional, highly recommended)
* CREDITS.rst (optional)

Content of this README will also be drawn from the addon manifest,
from keys such as name, authors, maintainers, development_status,
and license.

A good, one sentence summary in the manifest is also highly recommended.


Automatic changelog generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`HISTORY.rst` can be auto generated using `towncrier <https://pypi.org/project/towncrier>`_.

Just put towncrier compatible changelog fragments into `readme/newsfragments`
and the changelog file will be automatically generated and updated when a new fragment is added.

Please refer to `towncrier` documentation to know more.

NOTE: the changelog will be automatically generated when using `/ocabot merge $option`.
If you need to run it manually, refer to `OCA/maintainer-tools README <https://github.com/OCA/maintainer-tools>`_.
1 change: 1 addition & 0 deletions spreadsheet_board/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
33 changes: 33 additions & 0 deletions spreadsheet_board/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2023 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)

{
"name": "Spreadsheet in traditional dashboard",
"summary": "Add spreadsheets to traditional dashboards",
"version": "16.0.1.0.0",
"development_status": "Alpha",
"category": "Productivity",
"website": "https://github.com/moshchot/BANKayma",
"author": "Hunki Enterprises BV, Moshchot Coop, Odoo Community Association (OCA)",
"maintainers": ["hbrunn"],
"license": "AGPL-3",
"application": False,
"installable": True,
"preloadable": True,
"depends": [
"spreadsheet_dashboard_oca",
"board",
],
"data": [
"views/spreadsheet_dashboard.xml",
],
"demo": [],
"assets": {
"web.assets_backend": [
"spreadsheet_board/static/src/BoardController.esm.js",
"spreadsheet_board/static/src/BoardController.xml",
"spreadsheet_board/static/src/SpreadsheetBoard.esm.js",
"spreadsheet_board/static/src/SpreadsheetBoard.xml",
],
},
}
Empty file added spreadsheet_board/i18n/.empty
Empty file.
1 change: 1 addition & 0 deletions spreadsheet_board/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import spreadsheet_dashboard
Loading