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][ADD] account_move to filter and group by on is_supplier on acc… #1910

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion partner_manual_rank/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"installable": True,
"maintainers": ["luisg123v", "frahikLV"],
"depends": ["account"],
"data": ["views/res_partner.xml"],
"data": [
"views/account_move.xml",
"views/res_partner.xml",
],
}
44 changes: 35 additions & 9 deletions partner_manual_rank/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,72 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-05-02 11:33+0000\n"
"Last-Translator: Hughes Damry <[email protected]>\n"
"Language-Team: none\n"
"Language: fr\n"
"POT-Creation-Date: 2024-12-02 09:23+0000\n"
"PO-Revision-Date: 2024-12-02 09:23+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: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.14.1\n"
"Plural-Forms: \n"

#. module: partner_manual_rank
#: model:ir.model.fields,field_description:partner_manual_rank.field_account_move__assigned_attachment_ids
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_partner__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr ""

#. module: partner_manual_rank
#: model:ir.model,name:partner_manual_rank.model_res_partner
msgid "Contact"
msgstr "Contact"
msgstr ""

#. module: partner_manual_rank
#: model_terms:ir.ui.view,arch_db:partner_manual_rank.view_res_partner_filter
msgid "Customers"
msgstr "Clients"

#. module: partner_manual_rank
#: model_terms:ir.ui.view,arch_db:partner_manual_rank.view_account_invoice_filter
msgid "Is Supplier"
msgstr "Est un Fournisseur"

#. module: partner_manual_rank
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_brand__is_customer
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_partner__is_customer
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_users__is_customer
msgid "Is a Customer"
msgstr "Client"

#. module: partner_manual_rank
#: model:ir.model.fields,field_description:partner_manual_rank.field_account_bank_statement_line__is_supplier
#: model:ir.model.fields,field_description:partner_manual_rank.field_account_move__is_supplier
#: model:ir.model.fields,field_description:partner_manual_rank.field_account_payment__is_supplier
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_brand__is_supplier
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_partner__is_supplier
#: model:ir.model.fields,field_description:partner_manual_rank.field_res_users__is_supplier
msgid "Is a Supplier"
msgstr "Fournisseur"
msgstr "Est un Fournisseur"

#. module: partner_manual_rank
#: model_terms:ir.ui.view,arch_db:partner_manual_rank.view_account_invoice_filter
msgid "Is supplier"
msgstr "Est un Fournisseur"

#. module: partner_manual_rank
#: model:ir.model,name:partner_manual_rank.model_account_move
msgid "Journal Entry"
msgstr "Pièce comptable"

#. module: partner_manual_rank
#. odoo-python
#: code:addons/partner_manual_rank/models/res_partner.py:0
#: code:addons/partner_manual_rank/models/res_partner.py:0
#, python-format
msgid "Operation not supported"
msgstr "Opération non supportée"

#. module: partner_manual_rank
#: model_terms:ir.ui.view,arch_db:partner_manual_rank.view_res_partner_filter
msgid "Suppliers"
msgstr "Fournisseurs"
msgstr "Fournisseurs"
1 change: 1 addition & 0 deletions partner_manual_rank/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import account_move
from . import res_partner
11 changes: 11 additions & 0 deletions partner_manual_rank/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 Akretion France (http://www.akretion.com/)
# @author: Mathieu Delva <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class AccountMove(models.Model):
_inherit = "account.move"

is_supplier = fields.Boolean(related="partner_id.is_supplier", store=True)
12 changes: 7 additions & 5 deletions partner_manual_rank/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -421,7 +421,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down
25 changes: 25 additions & 0 deletions partner_manual_rank/views/account_move.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<odoo>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account.move.search</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter" />
<field name="arch" type="xml">
<filter name="due_date" position="after">
<separator />
<filter
name="is_supplier"
string="Is supplier"
domain="[('is_supplier', '=', True)]"
/>
</filter>
<xpath expr="//search/group/filter[@name='status']" position="after">
<filter
string="Is Supplier"
name="is_supplier"
context="{'group_by': 'is_supplier'}"
/>
<separator />
</xpath>
</field>
</record>
</odoo>
Loading